rumble bee?

well since i put my other prototype on the side, i have decided to build my little rumble bee? its a $20 USD RC car from New Bright (cheap generic brand), which was suprisingly moduler constuction, i didng have to break any plastic or destroy the RF reciever which i may use in another project. so far it will go forward till it sees something that is 15 inches away, then back up,

still working on the turning, it seems that the gears are sliping when trying to turn so i may have to fasion a new turing system, so far i really like the ping sensor, because of how easy it was to get it to work with the arduino in less then 10 mins....i also decided to go with the ladyadas Motor sheild for ease of use, later on i will build more H bridges based on her designfor other projects,

i am still palning on adding headlights back up lights and turn signals. i am also planning on making a motion tracker on top of the bed

more to come when i get the steering corrected and some better video with better light

 

my sample cod so far, i will be using my own custom header file soon enough to stream line the code but for the moment i will use the AFmotor.h header so far the code after it compiles takes 4.5kb

#include <AFMotor.h>

AF_DCMotor motor(4, MOTOR12_64KHZ);
AF_DCMotor turn(2, MOTOR12_64KHZ);
int pingPin = 9;

void setup()
{
Serial.begin(9600);
motor.setSpeed(200);
turn.setSpeed(0);
}

void loop()
{
long duration, inches, cm;

// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
// We give a short LOW pulse beforehand to ensure a clean HIGH pulse.
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);

// The same pin is used to read the signal from the PING))): a HIGH
// pulse whose duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);

// convert the time into a distance
inches = microsecondsToInches(duration);



delay(100);
if (inches > 15) {

motor.run(FORWARD);
turn.run(RELEASE);
}
else {
motor.run(BACKWARD);
turn.run(BACKWARD);
delay(400);

}
}

long microsecondsToInches(long microseconds)
{
// According to Parallax's datasheet for the PING))), there are
// 73.746 microseconds per inch (i.e. sound travels at 1130 feet per
// second). This gives the distance travelled by the ping, outbound
// and return, so we divide by 2 to get the distance of the obstacle.
// See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
return microseconds / 74 / 2;
}

roll around and chase the cats

  • Actuators / output devices: 2 9v DC moters
  • Control method: autonomous
  • CPU: Arduino
  • Power source: 9.6v nicd 1000mA
  • Programming language: C/wire
  • Sensors / input devices: Ping))) Ultra Sound, more to add later
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/rumble-bee

lol its drunk!

That thing keeps running into ■■■■■ lol I give it a 5 for effort. j/k I do give it a 5 though. You just need some motor control and you will be good!

 

good job man!

 

:stuck_out_tongue:

You may have interest in
You may have interest in this: Programming 3-point turns

i have motor control but i
i have motor control but i dont have any restraint when it comes to fast moving toys …the faster the better

i dont have any restraint

i dont have any restraint when it comes to fast moving toys …the faster the bettet

You don’t say !

Neat toy though

Mike

i am deffinetly going to use
i am deffinetly going to use that as a base for my turning and getting out of bad corners