test

Dependencies:   BH1750 DHT DS1820 W5500Interface MQ135 NTPClient SENSOR WebSocketClient mbed

Files at this revision

API Documentation at this revision

Comitter:
readysteadygo2006
Date:
Mon Sep 19 18:53:09 2016 +0000
Parent:
1:f5d4623472b7
Commit message:
Updated with w5500

Changed in this revision

ESP8266Interface.lib Show diff for this revision Revisions of this file
HTTPClient-SSL.lib Show diff for this revision Revisions of this file
W5500Interface.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
mbed-rtos.lib Show diff for this revision Revisions of this file
--- a/ESP8266Interface.lib	Thu Sep 08 14:14:58 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/teams/ESP8266/code/ESP8266Interface/#03fd9333670d
--- a/HTTPClient-SSL.lib	Thu Sep 08 14:14:58 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/users/sarahmarshy/code/HTTPClient-SSL/#a18a06b000f3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/W5500Interface.lib	Mon Sep 19 18:53:09 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/EthernetInterfaceW5500-makers/code/W5500Interface/#af0ed4fbca02
--- a/main.cpp	Thu Sep 08 14:14:58 2016 +0000
+++ b/main.cpp	Mon Sep 19 18:53:09 2016 +0000
@@ -18,6 +18,11 @@
 int main() {
     pc.baud(921600);
 
+#if defined(TARGET_NUCLEO_F401RE)
+    SPI spi(PB_15, PB_14, PB_13); // mosi, miso, sclk
+    EthernetInterface eth(&spi, PB_1, PB_2); // spi, cs, reset
+    #warning "setup for F401RE"
+#endif
 
     //Create sensors
 //    pc.printf("Creating sensor 0\n\r");
@@ -58,9 +63,11 @@
     sensorStatus sensor_status;
     sensorType sensor_type;
         
-    wifi.init(); //Reset
-    wifi.connect(); //Use DHCP
-    pc.printf("IP Address is %s\n\r", wifi.getIPAddress());
+    pc.printf("pre init eth\r\n", eth.getMACAddress());
+    eth.init("192.168.1.202", "255.255.255.0", "192.168.1.254"); //Use DHCP
+    pc.printf("Initialized, MAC: %s\r\n", eth.getMACAddress());
+    eth.connect();
+    pc.printf("Connected, IP: %s, MASK: %s, GW: %s\r\n",eth.getIPAddress(), eth.getNetworkMask(), eth.getGateway());
 
 /*
     if (ntp.setTime("0.uk.pool.ntp.org") == 0)
--- a/mbed-rtos.lib	Thu Sep 08 14:14:58 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#3da5f554d8bf