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

@ -3,7 +3,7 @@
Makes the RGB LED bright and glow as the joystick or the
slider are moved.
Created on 22 november 2012
By Enrico Gueli <enrico.gueli@gmail.com>
Modified 22 Dec 2012
@ -21,12 +21,12 @@ void loop() {
int xAxis = Esplora.readJoystickX();
int yAxis = Esplora.readJoystickY();
int slider = Esplora.readSlider();
// convert the sensor readings to light levels:
byte red = map(xAxis, -512, 512, 0, 255);
byte green = map(yAxis, -512, 512, 0, 255);
byte blue = slider/4;
byte blue = slider / 4;
// print the light levels:
Serial.print(red);
Serial.print(' ');
@ -34,9 +34,9 @@ void loop() {
Serial.print(' ');
Serial.println(blue);
// write the light levels to the LED.
// write the light levels to the LED.
Esplora.writeRGB(red, green, blue);
// add a delay to keep the LED from flickering:
// add a delay to keep the LED from flickering:
delay(10);
}