Want to make a car.
The following function desired.
In the run to the right, the left wheels run more slowly than the right wheel.
In the run to the left wheels run faster than the right wheel.
At run straight on both wheels run the same speed.
The same goes straight backwards.
Will use Receiver:
http://www.banggood.com/Wholesale-FS-R6 ... 68604.html
Is there some here that will help with some code for the Arduino Board Mega2560 R3.
Do have absolutely no experience with C ++
But I can do some code in FlowCode but not enough to get my car to,
running from Turnigy 9XR PRO Radio Transmitter.
Turnigy 9XR PRO is code for car management !
Basic code
- CODE: SELECT_ALL_CODE
/* PWM input mode with microcontroller (Independent Both), DIP switch 1 0 1 1 0 1 1 0
User: Arduino Board Mega2560 R3
With PWM out to left and right.
SmartDriveDuo60 - MDDS60
Run with RC Mode with RC Transmitter/Receiver, DIP Switch
*/
#include<math.h>
int dig1=A2; //pin signal for motor left
int dig2=A3; //pin signal for motor right
int an1= D2; //pin pwm for motor left
int an2= D3; //pin pwm for motor right
void setup()
{
delay(100);
pinMode(dig1,OUTPUT); //initialize for all the input and output
pinMode(dig2,OUTPUT);
pinMode(an1,INPUT);
pinMode(an2,INPUT);
Serial.begin(9600);
analogWrite(an1,0); //Based on the datasheet,
the MDDS60 analog pin should get 0 input upon start
analogWrite(an2,0); //thus we need to send 0 value at the beginning delay(1000);
}
Yours sincerely
Monie Jacobsen