A simple Pong game with STM32F407VET6 black board (Seeed Arch Max) and ILI9341 320x240 TFT display.
Dependencies: mbed ILI9341_STM32F4
Racket.h
00001 #ifndef RACKET_H 00002 #define RACKET_H 00003 00004 #include "mbed.h" 00005 #include "tft.h" 00006 00007 class Racket 00008 { 00009 public: 00010 Racket(int w = 20, int h = 40, uint16_t clr = TFT_WHITE); 00011 void home(); 00012 void move(DigitalIn* btnUp, DigitalIn* btnDown); 00013 void paint(); 00014 00015 int width; 00016 int height; 00017 int xPos; 00018 int yPos; 00019 int yPosOld; 00020 float velocity; 00021 int xDir; 00022 int yDir; 00023 bool moved; 00024 uint16_t color; 00025 }; 00026 #endif // RACKET_H
Generated on Mon Jul 25 2022 11:48:50 by 1.7.2