File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 11/* Motor Board IR Array Test
2-
3- This example of the Arduno robot's motor board returns the
4- values read fron the 5 infrared sendors on the bottom of
2+
3+ This example of the Arduno robot's motor board returns the
4+ values read fron the 5 infrared sendors on the bottom of
55 the robot.
66
77*/
8- // include the motor board header
8+ // include the motor board header
99#include < ArduinoRobotMotorBoard.h>
1010
1111String bar; // string for storing the informaton
1212
13- void setup (){
13+ void setup () {
1414 // start serial communication
1515 Serial.begin (9600 );
1616 // initialize the library
1717 RobotMotor.begin ();
1818}
19- void loop (){
20- bar= String (" " ); // empty the string
19+ void loop () {
20+ bar = String (" " ); // empty the string
2121 // read the sensors and add them to the string
22- bar= bar+ RobotMotor.IRread (1 )+ ' ' + RobotMotor.IRread (2 )+ ' ' + RobotMotor.IRread (3 )+ ' ' + RobotMotor.IRread (4 )+ ' ' + RobotMotor.IRread (5 );
22+ bar = bar + RobotMotor.IRread (1 ) + ' ' + RobotMotor.IRread (2 ) + ' ' + RobotMotor.IRread (3 ) + ' ' + RobotMotor.IRread (4 ) + ' ' + RobotMotor.IRread (5 );
2323 // print out the values
2424 Serial.println (bar);
2525 delay (100 );
Original file line number Diff line number Diff line change 11/* Motor Core
22
33 This code for the Arduino Robot's motor board
4- is the stock firmware. program the motor board with
4+ is the stock firmware. program the motor board with
55 this sketch whenever you want to return the motor
66 board to its default state.
7-
7+
88*/
99
1010#include < ArduinoRobotMotorBoard.h>
1111
12- void setup (){
12+ void setup () {
1313 RobotMotor.begin ();
1414}
15- void loop (){
15+ void loop () {
1616 RobotMotor.parseCommand ();
1717 RobotMotor.process ();
1818}
You can’t perform that action at this time.
0 commit comments