Demonstration of behaviour based robotics using the Atmel AVR microcontroller on the Sumovore ATmega8 brainboard.
The code here is for illustrating how to program the Atmel AVR microcontroller on the Sumovore ATmega8 brainboard.
Standard features of the Atmel AVR Microcontroller are utilised, such as pulse-width modulation (PWM),
analog to digital conversion (ADC), timer interrupts, and IO ports.
These are used to provide access to the sensors and actuators on the Solarbotics Sumovore robot,
and demonstrate how to implement simple behaviour-based robotics.
Important Note: I fully expect that some of the details below are out of date as they are based on 2005 versions.
Nevertheless, they are provided for illustrative and historical purposes.
Additionally, a generated Makefile is provided, only the TARGET = wanderer
line needs to be modified to match the filename.
This code was developed on Windows XP in 2005 and used the following software development tools:
The code was compiled using GNU GCC with avr-libc 1.2.3 (from WinAVR-20050214).
It may, or may not, require modifications to run on newer versions.
giveio
is required to access lpt1, and can be installed by either:
To create the Makefile:
AVRDUDE_PROGRAMMER = sp12
AVRDUDE_PORT = lpt1
AVRDUDE_WRITE_FLASH = ...
lineAVRDUDE_WRITE_EEPROM = ...
lineMCU = atmega8
F_CPU = 1000000
At the command line enter “make all”, this will compile the code and create a .hex
file for downloading to the
Sumovore, a .elf
file which can be loaded by AVR Studio for simulation, and several other files that aren’t used here.
To download the program to the Sumovore:
Once the program has been downloaded to the Sumovore, to run the program, turn the Sumovore on.
Line following behaviour is based on Solarbotics Sumoline.c by Bob Cook
(based on original by Grant McKee), http://www.solarbotics.com, 2005.
The makefile is generated from the WinAVR Sample makefile written by Eric B. Weddington, Jörg Wunsch, et al.
http://winavr.sourceforge.net/, 2005.