Hauptprogramm
Dependencies: ILI9340_Driver_Lib PM2_Libary Lib_DFPlayerMini
Diff: main.cpp
- Revision:
- 15:babdd038715a
- Parent:
- 14:153f377f4030
- Child:
- 16:f0480e9c5039
--- a/main.cpp Sat Apr 17 13:20:05 2021 +0000 +++ b/main.cpp Mon Apr 19 14:10:40 2021 +0000 @@ -1,10 +1,14 @@ #include "mbed.h" -//#include "mbed_rtc_time.h" //Eigene Header einbinden #include "realtimer.h" +//LED Anzeige +#include "Adafruit_LEDBackpack.h" +#include "Adafruit_GFX.h" +#include "glcdfont.h" + using namespace std::chrono; @@ -21,8 +25,13 @@ void button_rise(); +I2C i2c(D14, D6); +Adafruit_8x8matrix matrix = Adafruit_8x8matrix(&i2c); + int main() { + matrix.begin(0x70); + set_time(1618332129); //Zeit setzen int i = 0; @@ -35,7 +44,14 @@ loop_timer.reset(); - + matrix.clear(); + for (int i = 0; i < 8; i++) { + for (int j = 0; j < 8; j++) { + matrix.drawPixel(i, j, LED_ON); + } + } + matrix.writeDisplay(); // write the changes we just made to the display + wait(60); @@ -53,8 +69,6 @@ else{ i=0; } - - i += 5; led = !led;