1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Run new astyle formatter against all the examples

This commit is contained in:
Federico Fissore
2013-10-21 09:58:40 +02:00
parent 3c6ee46828
commit b4c68b3dff
259 changed files with 5160 additions and 5217 deletions

View File

@ -1,25 +1,25 @@
/* Motor Board IR Array Test
This example of the Arduno robot's motor board returns the
values read fron the 5 infrared sendors on the bottom of
This example of the Arduno robot's motor board returns the
values read fron the 5 infrared sendors on the bottom of
the robot.
*/
// include the motor board header
// include the motor board header
#include <ArduinoRobotMotorBoard.h>
String bar; // string for storing the informaton
void setup(){
void setup() {
// start serial communication
Serial.begin(9600);
// initialize the library
RobotMotor.begin();
}
void loop(){
bar=String(""); // empty the string
void loop() {
bar = String(""); // empty the string
// read the sensors and add them to the string
bar=bar+RobotMotor.IRread(1)+' '+RobotMotor.IRread(2)+' '+RobotMotor.IRread(3)+' '+RobotMotor.IRread(4)+' '+RobotMotor.IRread(5);
bar = bar + RobotMotor.IRread(1) + ' ' + RobotMotor.IRread(2) + ' ' + RobotMotor.IRread(3) + ' ' + RobotMotor.IRread(4) + ' ' + RobotMotor.IRread(5);
// print out the values
Serial.println(bar);
delay(100);

View File

@ -1,18 +1,18 @@
/* Motor Core
This code for the Arduino Robot's motor board
is the stock firmware. program the motor board with
is the stock firmware. program the motor board with
this sketch whenever you want to return the motor
board to its default state.
*/
#include <ArduinoRobotMotorBoard.h>
void setup(){
void setup() {
RobotMotor.begin();
}
void loop(){
void loop() {
RobotMotor.parseCommand();
RobotMotor.process();
}