Gizmo your first steampunk robot
Dear: LMR
Just to let you know I have been developing for the past month a steampunk robot. I have finished the mechanical and moving onto electrical and software. I am using arduino uno and arduino and the following materials.
List of materials.
- 2 * Red LED
- 3 * Green LED
- 1 * 9" by 9" cardboard sheet.
- 1 * 3" by 3" cardboard sheet.
- Lots of gears.
- Lots of bolts and nuts.
- Tape
So wish me good luck and enjoy the video.
*****UPDATE 4/18/2015*****
Dear: LMR
You should know my progress is coming along fine. Just to let you know I am very sorry it took me so long to get as far as I did. In my defense this is my first robot and I ran into a lot of problems sourcing parts, building the robot, and remaining on task and for that I hope you don't hold against me for that. Anyways I finished the code and some of the electronics. The only problem is I am running into power issues which I am sure I can figure out. Enjoy!!!
From: Noah
#include <Servo.h>
#include <IRremote.h>
int IRpin = A0;
IRrecv irrecv(IRpin);
decode_results results;
Servo myServoLeft;
Servo myServoRight;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("IR Results");
irrecv.enableIRIn();
}
void loop() {
// put your main code here, to run repeatedly:
if (irrecv.decode(&results))
{
translateIR();
Serial.println(results.value, DEC);
irrecv.resume();
}
}
void translateIR()
{
switch (results.value)
{
case 3459683302:
Serial.println("Robot Pause");
RobotStop(true,true);
break;
case 1400905448:
Serial.println("Robot Move Right");
RobotMove(180,180);
break;
case 3305092678:
Serial.println("Robot Move Backwards");
RobotMove(0, 180);
break;
case 1972149634:
Serial.println("Robot Move Left");
RobotMove(0,0);
break;
case 3261853764:
Serial.println("Robot Move Forward");
RobotMove(180,0);
break;
}
}
void RobotMove(int directionRight, int directionLeft)
{
if (!myServoLeft.attached())
{
myServoLeft.attach(12);
}
if (!myServoRight.attached())
{
myServoRight.attach(13);
}
myServoLeft.write(directionLeft);
myServoRight.write(directionRight);
}
void RobotStop(bool rightServoAttached, bool leftServoAttached)
{
if (myServoLeft.attached() && leftServoAttached == true)
{
myServoLeft.detach();
}
if (myServoRight.attached() && rightServoAttached == true)
{
myServoRight.detach();
}
}
Looks cool and is RC!!!