Tracey Winey
Published © CC BY

Iron Camel

Our car can turn with the Arduino servo and Redboard and drive with Lego MindStorms.

IntermediateWork in progress5 hours587
Iron Camel

Things used in this project

Story

Read more

Code

Code

Arduino
Control the car
#include <Servo.h>
Servo myservo;
int potpin = 0; 
int val; 
void setup()
{
myservo.attach(9);
}
void loop()
{
val = analogRead(potpin);
// 0 and 1023)
val = map(val, 0, 1023, 0, 179);
// 180)
myservo.write(val);
delay(15);
}


  

Credits

Tracey Winey
1 project • 0 followers
Contact
Thanks to Mason, Isaiah, Johnny.

Comments

Please log in or sign up to comment.