pong game added to the main sketch

Dependencies:   RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor

Fork of MainSketch by IoT Ox

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "libs.h"
00002 int f_state, f_button;
00003 //DigitalOut led(LED1);
00004 bool f_alarm;
00005 //DigitalIn sw_w(SW3);
00006 
00007 void main()
00008 {
00009     TFT.claim(stdout);        // send stdout to the TFT display
00010     TFT.set_orientation(1);
00011     TFT.background(Black);    // set background to black
00012     TFT.foreground(White);    // set chars to white
00013     TFT.cls();
00014     // pc.baud(115200);
00015     /*int i = 0;
00016     while (true) {
00017         i = (i % 3) + 1;
00018         draw_state(i);
00019         wait(1);
00020     }*/
00021     draw_state(4);
00022 
00023 
00024 
00025 
00026 }