![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
k
Dependencies: TFT-RFID_Finish3ja mbed MFRC522 UniGraphic
Diff: main.cpp
- Revision:
- 12:09c678c7e70a
- Parent:
- 11:7f4df462b2a5
--- a/main.cpp Tue Dec 18 12:42:00 2018 +0000 +++ b/main.cpp Tue Dec 18 22:28:26 2018 +0000 @@ -13,6 +13,8 @@ #define MF_RESET PC_6 Serial pc(SERIAL_TX, SERIAL_RX); Serial esp(PA_15,PB_7); +//DigitalIn button1(D2); +//DigitalIn button2(D3); MFRC522 RfChip (SPI_MOSI, SPI_MISO, SPI_SCK, SPI_CS, MF_RESET); PinName buspins[] = { PA_9, PC_7, PA_10, PB_3, PB_5, PB_4, PB_10, PA_8 }; TFT_MIPI myLCD(BUS_8, buspins, A3, A4, A2, A1, A0, "myLCD"); @@ -35,6 +37,8 @@ int queueB = 0; int queueC = 0; int queueD = 0; +int buttonA = 0; +int buttonB = 0; int main(){ pc.baud(9600); esp.baud(9600); @@ -51,6 +55,8 @@ myLCD.cls(); while(1){ + //if(button1 == 1){buttonA+=1;} +// if(button2 == 1){buttonB+=1;} if(Pagejawjiw == 0){ myLCD.background(backgroundcolor); myLCD.foreground(foregroundcolor); @@ -75,6 +81,8 @@ pc.printf("%s\n",StudentID);Pagejawjiw = 1;myLCD.cls(); char b[] = "X"; esp.putc(b[0]); + char id = esp.putc(b[0]); + pc.printf("id %c\n",id); } else if (UIDCard[0]==60 and UIDCard[1]==135 and UIDCard[2]==56 and UIDCard[3]==59){StudentID = "60340500066";