Robostix samples
From GumstixDocsWiki
Here are some sample files for working with the Robostix. These can be browsed online using websvn.
You can also fetch them from SVN using the following commands:
cd to the directory containing gumstix-buildroot (not gumstix-buildroot, but the parent of gumstix-buildroot) svn co http://svn.gumstix.com/gumstix-buildroot/branches/projects/robostix robostix
Contents |
Simple samples
Some of the files used for the samples:
| Common/a2d.h | Header file for A/D function |
| Common/a2d_8.c | 8 bit A/D conversion function |
| Common/CBUF.h | Power of 2 Circular Buffer routines |
| Common/Delay.c | Busy Wait Delay routines, plus a 1 msec interrupt timer |
| Common/Delay.h | Header file for delay routines |
| Common/Timer.h | Constants for manipulating timer clocks |
| Common/UART.c | Interrupt driven UART code for two channels |
| Common/UART.h | Header files for UART routines |
| Flash-LED/Config.h | Flash-LED configuration file |
| Flash-LED/Flash-LED.c | More complicated LED Flasher |
| Flash-LED/Hardware.c | Hardware initialization |
| Flash-LED/Hardware.h | Definitions for register initialization |
| Flash-LED/Makefile | Makefile to build Flash-LED |
| Rules.mk | Common makefile rules |
| Simple-Flasher/Config.h | Configuration file for Simple-Flasher |
| Simple-Flasher/Makefile | Makefile to build Simple-Flasher |
| Simple-Flasher/Simple-Flasher.c | Original LED Flasher |
Here are some pre-compiled versions of the programs:
Simple-Flasher just cycles through the Red/Blue/Yellow LEDs once per second.
Flash-LED does basically the same thing, but brings in the UART. If also shows how to connect up I/O routines to the avr-libc file I/O subsystem. In this example, UART-0 is connected to stdout, so that printf's will go to that UART. Key presses will be reported, and the space bar will pause the LED flashing.
The serial port should be configured for 38400 baud, 1 stop bits, 8 data bits, no flow control.
Args
Robostix args shows a method that arguments could be passed into the robostix.
Tachometer
Robostix tachometer shows one way that a tachometer function could be implemented.
Simple Servo
Robostix simple servo shows one way that R/C servos can be controlled from the robostix.
Interfacing an LCD
The Robostix LCD page shows how common character mode LCDs can be interfaced to the robostix.
Reading RC input
The Robostix RC input page shows how to process multiple channels from an RC receiver using a single input pin on the robostix.
Quadrature decoding
The Robostix quadrature decode page describes how you can use quadrature decoding on the robostix.
Using i2c with the gumstix and robostix
You can use the i2c-BootLoader on an ATMega device (including the robostix), in conjunction with i2c-load to download programs over the i2c bus.
You can also manipulate GPIO pins and read the ADC lines on the robostix using i2c-io.
The i2c-slave page describe how to use the i2c-slave code (which is used by i2c-io and the i2c-BootLoader).
Using S.N.A.P. with robostix
The Robostix SNAP page shows how to connect multiple robostix to a gumstix with as much separation as you need. This example includes low level Dallas Semiconductor 1-Wire code to read temperature.

