Manual
18 | P a g e
Support
Tech support: techsupport@dfrobot.com
Customer Service: sales@dfrobot.com
Arduino Code
The following demo code is compiled in the Arduino IDE (www.arduino.cc) and uses
two subroutines. You are free to copy/paste the code into the Arduino compiler.
Ensure the motor controller is connected properly before use.
Bluetooth Remote Control
//This code is just for Cellbots in android market.
#include <Metro.h>//version 0.1
#define LF 0
#define RT 1
#define FORW 1 // forward
#define BACK 0 // back
Metro MotorGap = Metro(30,true);
Metro printGap = Metro(100,true);
#define EN1 6 // right motor enable pins
#define IN1 7 // right motor direction of the pin
#define EN2 5 // left motor enable pins
#define IN2 4 // left motor direction of the pin
int lr = 0;
int rr = 0;
int left = 0;
int right = 0;
void setup(){
int i;
for(i = 4;i <= 7;i++) pinMode(i, OUTPUT);
Serial.begin(9600); //Set Baud Rate