
This page contains information and links related to a series of workshops offered summer 2009 entitled An Introduction to Embedded Controllers with Robots.
Part I - Introduction to Robotics, Electronics and Embedded Microcontrollers.
Part II - The Core Topics of Microcontrollers.
So You Want To Build A Robot? - my version of a "Start Here".
Choosing Sensors for Your Robot - covers most major sensor groups.
Introduction To Interrupts - includes a discussion of Pin Change Interrupts.
Materials for Your Robot - structural materials for your bot.
Power Supply Basics - very basic coverage of power supply parts.
AVR Basics - this goes more into depth about the AVR registers (still a work in progress).
These should copy directly into the Arduino Environment without issue.
// AVRRA Mini Demonstration Code // This code will blink an LED tied between PB1/D9 and GND. void setup(){ // this is called once pinMode(9,OUTPUT); } void loop(){ // while(1){loop();}; digitalWrite(9,HIGH); delay(500); // this halts the proc digitalWrite(9,LOW); delay(500); // for half a sec. }
// AVRRA Mini Demonstration Code // This code will use a switch to turn off an LED // Wire switch between PC2/A2 and ground void setup(){ // this is called once pinMode(9,OUTPUT); pinMode(16,INPUT); // turn on pull-up resistor! digitalWrite(16,HIGH); } void loop(){ // while(1){loop();}; digitalWrite(9,digitalRead(16)); delay(25); }
// AVRRA Mini Demonstration Code // Testing serial port using XBEE radio. void setup(){ // this is called once Serial.begin(38400); } void loop(){ // while(1){loop();}; Serial.print('Hello World\n'); delay(2000); }
// AVRRA Mini Demonstration Code // See output of GP2D120 #include <SharpIR.h> // This is a C++ class instance SharpIR frontIR = SharpIR(GP2D120,0); void setup(){ // this is called once Serial.begin(38400); } void loop(){ // while(1){loop();}; Serial.print(frontIR.getData()); delay(2000); } // SharpIR is located in // /usr/arduino/hardware/libraries/
// AVRRA Mini Demonstration Code // Drive robot around a little bit #include <Motors.h> Motors drive = Motors(); void setup(){ // this is called once Serial.begin(38400); // drive.set(left speed, right speed) drive.set(150,150); delayms(2000); drive.set(-150,150); delayms(2000); drive.set(0,0); } // Motors is located in // /usr/arduino/hardware/libraries/
These should copy directly into the Arduino Environment without issue.