SRS Labs SRS Robot Level 1 Kit manual Sample Programs, Creating New Programs

Page 27

Sample Programs

Sample Programs

There are sample programs available from http://www.seattlerobotics.org/WorkshopRobot/Level1/ (or the Workshop CD’s “Samples” folder). There are versions for BASCOM (BASIC) and C. The program files contain descriptive comments to explain what the code is doing.

The programming concepts are explained in the slides in the “ATmega16 Programming” section. The “Program Descriptions” section below describes the programs that are listed at the end of each section of slides. The extensions are suggestions for modifications you can make to the code to experiment and learn. The challenges are optional, harder modifications.

Please see the “AVR Robot Controller 1.1 Software Tools” section for instructions on installing and using the software to program the microcontroller.

Please see the “AVR Robot Controller 1.1 Hardware Description” section for details on the I/O pins used by the SRS Robot.

Creating New Programs

For some of the challenges, you may wish to create a new program instead of modifying one of the sample programs.

11-3-2005

27

Image 27
Contents SRS Robot Level 1 Kit USB port with a USB-to-serial converter Getting StartedComputer Requirements Recommended EquipmentKit Contents ARC Board Connection Kit Vendor InformationQty Vendor Part AVR Robot Controller 1.1 Assembly Instructions PreparationSoldering Overview ‰ Resistors and diode Prepare BoardsController Solder Components‰ Small capacitors and LEDs ‰ Switch and resonator‰ Large capacitors Cleaning and InspectionAttach Connector to Battery Holder ‰ Sockets, headers, and jumperSerial Cable Install ChipsProgramming Cable AVR Robot Controller 1.1 Software ToolsTool Options Bascom on WindowsWinAVR avr-gcc on Windows Avr-gcc on Mac OS Customizing the MicrocontrollerHttp//sourceforge.net/projects/winavr ResourcesMotors Chassis AssemblyBottom Plate Light SensorsTop Plate Final Assembly Leftover Parts Wiring ConnectionsPart ATmega16 ProgrammingATmega16 Programming 11-3-2005 Part ATmega16 Programming 11-3-2005 Part ATmega16 Programming 11-3-2005 ATmega16 Programming 11-3-2005 Part Creating New Programs Sample ProgramsProgramming Program DescriptionsProgram RemoteControl BumpNGoProgram Turn Physical Functional Input Connection Pin Name Output Header PowerPins AVR Robot Controller 1.1 Hardware DescriptionLeft, Center, and Right Floor Sensor Inputs Left and Right Motor ConnectorsExpansion Headers JP3 and JP10 Left and Right Analog InputsServo output Power SourceIn-System Programming and Option Select Program LED outputAVR Robot Controller 1.1 Schematic