Let's Make Robots! | RobotShop

Little Runt Rover Robot Project


Description

This is my robot so far. It is a Runt Rover I bought yesterday at a place in Mass. known as "You Do It Electronics" and I have assembled and soldered him under 2 hours. I even have programmed him a bit. The code is written below. This is a test code I have made to see if he can work and he does. I am hoping to turn this robot into a ledge avoiding and obstacle avoding robot. Wish me good luck!!!

Test Code

void setup() {

  // put your setup code here, to run once:
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(6, OUTPUT);
}

void loop() {  // put your main code here, to run repeatedly:  Forward(255);  delay(1000);  Stop();  delay(500);  Backward(255);  delay(1000);  Stop();  delay(500);  CCW(255);  delay(1000);  Stop();  delay(500);  CW(255);  delay(1000);  Stop();  delay(500); } void Forward(int Speed) {  digitalWrite(9, LOW);  digitalWrite(10, LOW);  digitalWrite(13, HIGH);  digitalWrite(12, HIGH);  analogWrite(11, Speed);  analogWrite(6, Speed); } void Backward(int Speed) {  digitalWrite(11, LOW);  digitalWrite(6, LOW);  digitalWrite(13, HIGH);  digitalWrite(12, HIGH);  analogWrite(9, Speed);  analogWrite(10, Speed); } void CCW(int Speed) {  digitalWrite(9, LOW);  digitalWrite(11, LOW);  digitalWrite(13, HIGH);  digitalWrite(12, HIGH);  analogWrite(10, Speed);  analogWrite(6, Speed); } void CW(int Speed) {  digitalWrite(6, LOW);  digitalWrite(10, LOW);  digitalWrite(13, HIGH);  digitalWrite(12, HIGH);  analogWrite(11, Speed);  analogWrite(9, Speed); } void Stop() {  digitalWrite(13, LOW);  digitalWrite(12, LOW); }

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I like this so far.  It looks like it is going to be really neat.

Thanks!!! That is very kind of you.

I’m positive you will be great at programming him to avoid obstacle and ledges, and I can’t wait to see you what will do with him next. I wish you the best.

Thanks!!! You are awesome!!!