Automated Gyro Wheel Toy

1,413

18

3

About: I am an American teaching English at Shangluo University, Shaanxi. I like making machines that do interesting but fairly useless things - I call them Quixotic Machines.

I had a simple gyro wheel toy and decided I wanted to automate it. Took a single servo, attached it to an axle and attached the toy to the axle. Then made a simple magnetic switch with a ball point pen spring, hooked that and the servo to and Arduino Uno. The program is very short and simple. But I have future plans to make it more interesting. Stay tuned for Version 2 and 3.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1:

Arduino Code:


#include
Servo servo1;

int servangle = 0;// servo angle variable

int potPin = 2; // select the input pin for the potentiometer

int ledPin = 13; // select the pin for the LED

//Analog read pins const

int buttonPin = 2;

void setup()

{ Serial.begin(9600);

pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT

pinMode(buttonPin,INPUT);

servo1.attach(9);

delay(1000);

servo1.write(90);

delay(5000);

servo1.write(172); }

void loop() {

if (digitalRead(buttonPin) == HIGH) {

digitalWrite(ledPin,HIGH);

servo1.write(90);

delay(1200);

servo1.write(172);

digitalWrite(ledPin,LOW);

}

}


Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    3 Discussions

    cool now that robot live the dream of all 10 year olds across the world for ever until a 10 year old touches it and brakes it. grate project love the idea of making it be able to make it go both ways that would be cool if if would switch off left then right automaticly!

    None
    JimRD

    5 years ago on Introduction

    Thank you so much. It is kind of useless at this point but I hope to make it more purposeful in the future. But I think useless machines can also make life more interesting. At the very least they show us what our lives shouldn't be like; I should put a sign on it "Don't Live Life Like This!"

    None
    apburner

    5 years ago on Introduction

    Wow. That is one of the coolest little arduino machines I have ever seen. Great idea and implementation. Well done.