Sunday, October 4, 2009

The Arduino Mega

It has been a while since my last blog update. It has been busy days working on the code development. In this periode I have mainly worked on two things: the Arduino Mega and CyberRobot plugin. CyberRobot plugin will be discussed in a separate subject.

Arduino Mega(AM) is an open source board developed by a company in Italy. This board will be used on the Robot to control the drive motors via an H-bridge. It has an Atmega microprocessor, PWM output, Digitial output and Analog input onboard. But the most useful thing about AM is that it is equipped with FTDI chip which makes the direct usb input possible. Otherwise a usb-serial converter should be used.


Above: the AM. Click to enlarge.

An Arduino Alpha program is developed by some programmers which users can directly code in java and compile and upload their program in AM. So that is also a plus point for me, although the main language for programming such boards and chips is assembly and C.

In an our I managed to install the whole thing and write my very first "Hello World" proggy and upload it on the AM. The Next step was to manage the communication between the pc and the AM, so I could use the communication for later purposes. The next day I could write a little program for AM to confirm a handshake. The handshake is very important because the AM should be recognized automatically by program. What is does now is that it sends a message to the device which tries to connect. With the help of that message the program on the device can decide wether to attach to AM or not.

The next step was to manage and play with some leds on AM. Because if the leds can be controlled, the same signal can be used later to control the drive Motors via H-bridge.

Also a little proggy is developed in java to work in the PC to recognize and attach to the AM. It goes through all available ports and waits for the handshake. When the handshake is received the program remains attach to that port.


Above: The proggy developed in java to control the AM. Click to enlarge.
Down: AM attached to my PC. Click to enlarge.




1 comment: