mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-01 03:47:23 +03:00
Run new astyle formatter against all the examples
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
/*
|
||||
Speed by Potentiometer
|
||||
|
||||
|
||||
Control the robot's speed using the on-board
|
||||
potentiometer. The speed will be printed on
|
||||
the TFT screen.
|
||||
|
||||
the TFT screen.
|
||||
|
||||
Circuit:
|
||||
* Arduino Robot
|
||||
|
||||
|
||||
created 1 May 2013
|
||||
by X. Yang
|
||||
modified 12 May 2013
|
||||
by D. Cuartielles
|
||||
|
||||
|
||||
This example is in the public domain
|
||||
*/
|
||||
|
||||
@ -28,12 +28,12 @@ void setup() {
|
||||
|
||||
void loop() {
|
||||
// read the value of the potentiometer
|
||||
int val=map(Robot.knobRead(), 0, 1023, -255, 255);
|
||||
int val = map(Robot.knobRead(), 0, 1023, -255, 255);
|
||||
|
||||
// print the value to the TFT screen
|
||||
Robot.debugPrint(val);
|
||||
|
||||
// set the same speed on both of the robot's wheels
|
||||
Robot.motorsWrite(val,val);
|
||||
Robot.motorsWrite(val, val);
|
||||
delay(10);
|
||||
}
|
||||
|
Reference in New Issue
Block a user