pong game added to the main sketch
Dependencies: RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor
Fork of MainSketch by
main.cpp
- Committer:
- mlin
- Date:
- 2017-05-24
- Revision:
- 10:9d9b3b9b28b8
- Parent:
- 9:eee503060d69
- Child:
- 11:1da15361a35b
File content as of revision 10:9d9b3b9b28b8:
#include "libs.h" int f_state, f_button; bool f_alarm; DigitalIn sw_w(SW3); void main() { TFT.claim(stdout); // send stdout to the TFT display TFT.set_orientation(1); TFT.background(Black); // set background to black TFT.foreground(White); // set chars to white TFT.cls(); // pc.baud(115200); int i = 0; while (true) { i = (i % 3) + 1; draw_state(i); wait(1); } }