Bhakti Khandagale
/
K64F_Bluetooth_RC522RFID_ESP8286WIFI_Full
Smart Fridge code
Revision 4:834deb7037ff, committed 2019-04-20
- Comitter:
- bkhandag
- Date:
- Sat Apr 20 17:18:17 2019 +0000
- Parent:
- 3:11a68fb3886f
- Commit message:
- v2
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 11a68fb3886f -r 834deb7037ff main.cpp --- a/main.cpp Sat Apr 20 15:00:03 2019 +0000 +++ b/main.cpp Sat Apr 20 17:18:17 2019 +0000 @@ -10,8 +10,8 @@ #define APIKEY XE2W5EIXWN6LA234 //Put "Write key" of your channel in thingspeak.com #define IP "184.106.153.149" // IP Address of "api.thingspeak.com\" -#define WIFI_SSID "Sheelu" -#define WIFI_PASS "Barbie123" +#define WIFI_SSID "RajasiPhone" +#define WIFI_PASS "youcantguessmypassword" Serial pc(USBTX,USBRX); @@ -41,15 +41,15 @@ int main(void) { blue.baud(9600); - //pc.baud(9600); - printf("Welcome to RFID Tag Reader Using FRDM K64F...\n\r"); + pc.baud(115200); + pc.printf("Welcome to RFID Tag Reader Using FRDM K64F...\n\r"); blue.printf("Welcome to RFID Tag Reader Uing FRDM K64F...\n\r"); - printf("Bluetooth Enable\r\n"); + pc.printf("Bluetooth Enable\r\n"); blue.printf("Bluetooth Enable\r\n"); RfChip.PCD_Init(); - pc.baud(115200); // Baud rate used for communicating with Tera-term on PC + //pc.baud(115200); // Baud rate used for communicating with Tera-term on PC pc.printf("START\r\n"); // Starting point @@ -77,11 +77,11 @@ int a=0; // Print Card UID - printf("Card UID:"); + pc.printf("Card UID:"); blue.printf("Card UID:"); for (uint8_t i = 0; i < RfChip.uid.size; i++) { - printf(" %X02 ", RfChip.uid.uidByte[i]); + pc.printf(" %X02 ", RfChip.uid.uidByte[i]); blue.printf(" %X02 ", RfChip.uid.uidByte[i]); a = RfChip.uid.uidByte[0]; } @@ -91,12 +91,12 @@ if(a==73) { if(counter1 == 0){ - printf("\r\nMilk is in the fridge"); + pc.printf("\r\nMilk is in the fridge"); blue.printf("\r\nMilk is in the fridge"); counter1 = 1; } else if(counter1 == 1){ - printf("\r\nMilk is out of the fridge"); + pc.printf("\r\nMilk is out of the fridge"); blue.printf("\r\nMilk is in out of the fridge"); counter1 = 0; esp_send();