Things used in this project

Hardware components:
11113 01
SparkFun Arduino Pro Mini 328 - 5V/16MHz
×1
12780 01
SparkFun ZX Distance and Gesture Sensor
I used the HC-SR04
×1
Pmod gyro  90476.1456866490.1280.1280
Digilent Pmod GYRO
Needed only if you want it on two wheels
×1
Rg cont a
RobotGeek Continuous Rotation Servo
Need only be a suitable 360 rotation servo, the faster the better.
×2
Adafruit industries ada258 image 75px
Li-Ion Battery 1000mAh
I used a 2000mAh cell phone battery, nice and flat.
×1
Double%20v%20wheel%e2%84%a2%20kit
OpenBuilds Delrin V Wheel Kit
I used the wheels from a spectacular model F4U-1 Corsair aircraft crash.
×1
Software apps and online services:
Ide web
Arduino IDE
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)
plastic saw
Hy gluegun
Hot glue gun (generic)

Code

MEGA BREAD - Cutsie Whun Arduino CodeArduino
A simple turn the wheels for 3 seconds in different directions as a test bed.
No code for 2 wheeled operation.
/* Sweep
  by BARRAGAN <http://barraganstudio.com>
  This example code is in the public domain.

  modified 8 Nov 2013
  by Scott Fitzgerald
  http://www.arduino.cc/en/Tutorial/Sweep

UPDATED BY -- MEGA BREAD _ MINI BOT 1
This will do a VERY VERY basic wheel spin changing
the direction of wheel spin every 3 seconds

Auto Navigation not yet implemented
*/

#include <Servo.h>

Servo myservo1;  // create servo object to control a servo
Servo myservo2;

// twelve servo objects can be created on most boards

int pos = 90;   // variable to store the servo position
int maxLow = 1;
int maxHigh = 179;
int servoSpeed = 2;

void setup() {
  myservo1.attach(10);
  myservo2.attach(12);
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(10, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);
  myservo1.write(maxLow);
  myservo2.write(maxHigh);
  delay(3000);
  digitalWrite(13, LOW);
  myservo1.write(maxHigh);
  myservo2.write(maxLow);
  delay(3000);
  digitalWrite(13, HIGH);
  myservo1.write(maxHigh);
  myservo2.write(maxHigh);
  delay(3000);
  digitalWrite(13, LOW);
  myservo1.write(maxLow);
  myservo2.write(maxLow);
  delay(3000);
  myservo1.write(pos);
  myservo2.write(pos);
  delay(3000);
}

Credits

Pigeon kicker
Pigeon-Kicker
13 projects • 9 followers
Computer guru from the 80's, currently disabled veteran. Building this stuffs for my son to learn robotics.
Contact
Thanks to Mini Pigeon.

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login