Thursday, March 5, 2009

Tattoo Ideas For Skinny Guys

Serial Communication in Java


young druggies Hello, in this post we will talk about a very interesting topic that can be quite useful for many of you. We refer to the serial communication using JAVA programming language. At the entrance

"MIDI naked (Part 3) " define the communication between the microcontroller interface and robot master would serially. This is mainly due to the ease and simplicity of operation compared to the USB protocol.

is true that we are using a USB-Serial adapter , but for the computer that is transparent, ie, the machine is an adapter cable ordinary COM port.

Having said that, let's the interesting part. How to manipulate the flow of data through a COM port using Java? Well, first of all we must install a few libraries that can be found in www.rxtx.org

rxtxSerial Installation (www.rxtx.org) in Linux

Lower package rxtx-2.1-7 -bins-r2.zip (Final) "
librxtxSerial.so copy to / usr / lib
RXTXcomm.jar copy to [JDK-directory] / jre / lib / ext /

rxtxSerial Installation ( www.rxtx.org) in Windows

Lower package rxtx-2.1-7-bins-r2.zip (Final) "
rxtxSerial.dll copy to [JDK-directory] \\ jre \\ bin \\ rxtxSerial.dll
RXTXcomm.jar copy to [JDK-directory] \\ jre \\ lib \\ ext \\ RXTXcomm.jar

And that's it, now I just have to make sure you add the appropriate Imports to the top of its agenda. We recommend you visit the wiki RXTX project, there are a lot of information with many examples and projects to download.

Here is the example on which we rely to jump-start our user interface. This Java program shows how to write the classic "Hello World" on serial port . Remember that both a Java compiler RXTX libraries must be installed on your computer to make this application work.

Wednesday, March 4, 2009

Conceited Cocky Quotes

stepping motor

an option to control the movement of actuators via the keyboard is the use of stepper motors. The advantage of using stepper motors is the high accuracy and repeatability in terms of positioning these possess. Besides, the gods of Middle Earth have blessed us with two copies of large potential.

Motor common steps.

stepper motors are electromechanical devices that convert a series of electrical impulses in discrete angular displacements, ie they are able to move angularly depending on its control inputs (wiki) .

These motors have a torque of detention, a feature not found in a DC motor, this attribute allows the stepper motor is held firmly in place when not turning, as long as it energized.

In contrast to a conventional direct current motor, the control of a stepper motor is not performed by applying a voltage in the coils. These engines have several coils to produce a step forward, need to be fed in a particular sequence. In this way is as following a certain sequence occurs rotation of the motor and applying reverse logic ensures that the motor rotates in the opposite direction. If feeding sequence is incorrect the motor will move randomly without obtaining the expected results.

Sequence of a bipolar stepper motor.

The MC3479 is an integrated circuit designed to drive stepper motors two-phase bipolar mode. This integrated circuit is formed by a series of logic inputs, a decoding and sequencing section, two sections for handling coils engine also has the output terminal phase A.

Diagram MC3479 controller.

The operating characteristics of this IC are as follows:
  • Food: 7.2 to 16.5 V.
  • Supports up to 350 mA / coil.
  • can select the direction of the steps CW / CCW, and controls the sequence of operation Full / Half Step. Tickets
  • compatible with TTL and CMOS families.
  • get hot as hell .

Tuesday, March 3, 2009

Sample Congratulatory Messages For Weddings

MIDI naked (Part 3)

Hello everyone, this day will We have prepared an interesting update on the user interface of the robot.

As mentioned in previous posts, the Orcobot will perform musical pieces previously "loaded" in his memory. However, this process is much more complex than it seems. Try to be very clear to explain.

First, a MIDI file is loaded into the user interface, the interface is responsible for decoding and interpreting MIDI messages (see MIDI input nude 1). Once done, the values \u200b\u200bextracted from each message (statement, note, velocity, etc.) Are sent serially to the microcontroller master, which stores them in its FLASH memory.

El programa del maestro va a ejecutar las instrucciones almacenadas en memoria y buála!! Let’s Rock!!

¿Pero como diablos le vamos a hacer para entender y descifrar un archivo MIDI?

Afortunadamente, existe bastante documentación sobre este estándar y hemos trabajado mucho en comprenderlo. Además, encontramos en la red varios códigos de prueba que nos permiten hacer la decodificación e interpretación del protocolo (Ver entrada MIDI al desnudo 2 ).

Impresión de pantalla de la interfaz de usuario.

Hicimos nuestra interfaz de usuario utilizando dos de estos ejemplos basis (DumpReceiver.java and DumpSequence.java). As you can see in the picture, the decoded data are displayed in the interface, ie, we already have the notes of the song and the speed to be executed.

based programs to interface:

DumpSequence.java
DumpReceiver.java

displays the contents of a MIDI file decoded
Usage: java dumpSequence midifile
We leave pending the transmission
serial data for another entry.

Finally, we thank a very special PiKoS_NaN . Valuable help in the design process and software development made possible this interface.