Master Program

Dependencies:   BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG mbed

Files at this revision

API Documentation at this revision

Comitter:
GabDiSi
Date:
Mon Nov 16 19:59:28 2015 +0000
Parent:
2:b05f40331fc3
Commit message:
v0.1

Changed in this revision

TS_DISCO_F746NG.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r b05f40331fc3 -r 2d2c2f2044b4 TS_DISCO_F746NG.lib
--- a/TS_DISCO_F746NG.lib	Sun Nov 01 00:36:00 2015 +0000
+++ b/TS_DISCO_F746NG.lib	Mon Nov 16 19:59:28 2015 +0000
@@ -1,1 +1,1 @@
-TS_DISCO_F746NG#ecae68a77c28
+https://developer.mbed.org/users/GabDiSi/code/TS_DISCO_F746NG/#ecae68a77c28
diff -r b05f40331fc3 -r 2d2c2f2044b4 main.cpp
--- a/main.cpp	Sun Nov 01 00:36:00 2015 +0000
+++ b/main.cpp	Mon Nov 16 19:59:28 2015 +0000
@@ -110,7 +110,17 @@
     led1 = 1;
     lcd.SetTextColor(LCD_COLOR_BLUE); //request button
     lcd.FillCircle(425, 230, 25);
-    lcd.SetTextColor(LCD_COLOR_BLACK); //reset button
+    
+    lcd.SetTextColor(LCD_COLOR_RED); //request button
+    lcd.FillCircle(350, 230, 25);
+    
+    lcd.SetTextColor(LCD_COLOR_YELLOW); //request button
+    lcd.FillCircle(275, 230, 25);
+    
+    lcd.SetTextColor(LCD_COLOR_GREEN); //request button
+    lcd.FillCircle(200, 230, 25);
+    
+    lcd.SetTextColor(LCD_COLOR_BLACK); 
 };
 
 void ESP8266get(char* domain, char* url, char* response) {
@@ -179,7 +189,28 @@
                 if ((x>400)&&(x<450)&&(y>205)&&(y<255)) {  
                     char response[ESP8266limitResponse];
                     char domain[] = "gabrieledisimone.it";
-                    char url[] = "";
+                    char url[] = "neapolis.php?button=4";
+                    
+                    ESP8266get(domain, url, response);
+                    pc.printf("response:\r\n%s", response);
+                } else if ((x>325)&&(x<375)&&(y>205)&&(y<255)) {  
+                    char response[ESP8266limitResponse];
+                    char domain[] = "gabrieledisimone.it";
+                    char url[] = "neapolis.php?button=3";
+                    
+                    ESP8266get(domain, url, response);
+                    pc.printf("response:\r\n%s", response);
+                } else if ((x>250)&&(x<300)&&(y>205)&&(y<255)) {  
+                    char response[ESP8266limitResponse];
+                    char domain[] = "gabrieledisimone.it";
+                    char url[] = "neapolis.php?button=2";
+                    
+                    ESP8266get(domain, url, response);
+                    pc.printf("response:\r\n%s", response);
+                } else if ((x>175)&&(x<225)&&(y>205)&&(y<255)) {  
+                    char response[ESP8266limitResponse];
+                    char domain[] = "gabrieledisimone.it";
+                    char url[] = "neapolis.php?button=1";
                     
                     ESP8266get(domain, url, response);
                     pc.printf("response:\r\n%s", response);