There are many ways to control / monitor the real world by computer. In this course we will focus on using the Arduino AVR/ARM framework due to its simplicity, robustness, availability, large supporting community and low price. Arduino AVR/ARM microcontroller development kits are assumed to be so simple to use that even musician and artist have shown to manage computer IO via simple C++ (C) programming using this framework.
The standard Arduino way of simplified C++ (C) programming may be limited when it comes to utilizing the low level functionality of the AVR/ARM processors, but by adding simple (one line) register commands to the Arduino C++ code, we have access to all low level functionality and the full speed of the AVR/ARM processor.
To get Arduino up and go:
How to start programming the microcontroller
Atmel DUE SAM3X8E register programming examples (if you really need to)
|Computer / microcontrollers communication software|
In many cases computer - AVR/ARM communication is carried out by the use of serial communication over the USB bus. Virtual serial communication may also be the basis for other types of communications, for example different types of wireless communication. Any program able to talk with the (virtual) serial port on the computer may be used to communicate with the AVR/ARM processor.
In this course programs written on the computer may be rather small and to make things simple we use the Java based Processing development environment. The Prosessing development environment is made to offer a maximum simple / fast way of getting small Java programs up and running with access to hardware communication, simplified GUI, and easy to use OpenGL (3D rendering). If you are used to other programming environments, for example Eclipse, you may use it directly or in even in combination with Processing, but be aware of possible practical problems with various versions of libraries that may stop you from accessing the serial port on the computer you are working on.
To start programming in Processing:
To directly control electrical motors we need much higher current (voltage) than the microcontroller output can provide. Tips:
|Dynamixel servos - a fully integrated solution|
A very simple way to implement high quality motion is by using the Dynamixel servos from Robotis