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,24 +1,24 @@
/*
Arduino TFT Bitmap Logo example
This example reads an image file from a micro-SD card
and draws it on the screen, at random locations.
In this sketch, the Arduino logo is read from a micro-SD card.
There is a .bmp file included with this sketch.
There is a .bmp file included with this sketch.
- open the sketch folder (Ctrl-K or Cmd-K)
- copy the "arduino.bmp" file to a micro-SD
- put the SD into the SD slot of the Arduino TFT module.
This example code is in the public domain.
Created 19 April 2013 by Enrico Gueli
http://arduino.cc/en/Tutorial/TFTBitmapLogo
*/
// include the necessary libraries
#include <SPI.h>
#include <SD.h>
@ -28,13 +28,13 @@
#define sd_cs 4
#define lcd_cs 10
#define dc 9
#define rst 8
#define rst 8
// pin definition for the Leonardo
//#define sd_cs 8
//#define lcd_cs 7
//#define dc 0
//#define rst 1
//#define rst 1
TFT TFTscreen = TFT(lcd_cs, dc, rst);
@ -55,8 +55,8 @@ void setup() {
TFTscreen.println("Open serial monitor");
TFTscreen.println("to run the sketch");
// initialize the serial port: it will be used to
// print some diagnostic info
// initialize the serial port: it will be used to
// print some diagnostic info
Serial.begin(9600);
while (!Serial) {
// wait for serial line to be ready
@ -64,7 +64,7 @@ void setup() {
// clear the GLCD screen before starting
TFTscreen.background(255, 255, 255);
// try to access the SD card. If that fails (e.g.
// no card present), the setup process will stop.
Serial.print("Initializing SD card...");
@ -73,7 +73,7 @@ void setup() {
return;
}
Serial.println("OK!");
// initialize and clear the GLCD screen
TFTscreen.begin();
TFTscreen.background(255, 255, 255);
@ -91,7 +91,7 @@ void loop() {
if (logo.isValid() == false) {
return;
}
Serial.println("drawing image");
// get a random location where to draw the image.