Changes between Version 9 and Version 10 of wade/embedded/arduino/example/example_7_1_ethernet_web_admin
- Timestamp:
- Aug 22, 2010, 3:42:41 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
wade/embedded/arduino/example/example_7_1_ethernet_web_admin
v9 v10 8 8 9 9 /* 10 * Web Admin 透過 web service 提供網頁監控功能。透過 GET 送命令取回 http 資料。 10 * Web Admin will let you control Arduino and get information from web, http request = GET 11 * you must use W5100 Ethernet model. 11 12 * 接法: 12 13 * digital pin2:DC SWITCH … … 17 18 * analog pin1:CT sersor 18 19 * GET 命令: 19 * b=00: 第一行傳現在裝置狀態20 * b=00:get all information 20 21 * b=01:DC on 21 22 * b=02:DC off 22 23 * b=03:AC on 23 24 * b=04:AC off 24 * b=05: 換IP:192.168.1.25125 * b=06: 換IP:192.168.1.25025 * b=05:change IP:192.168.1.251 26 * b=06:change IP:192.168.1.250 26 27 */ 27 28 28 29 #include <Ethernet.h> 29 #include <NewSoftSerial.h>30 //#include <NewSoftSerial.h> 30 31 //#include <string.h> 31 32 … … 36 37 37 38 // set pin 9 as RX 38 uint8_t ssRX = 6;39 //uint8_t ssRX = 6; 39 40 // set pin 10 as TX 40 uint8_t ssTX = 7;41 //uint8_t ssTX = 7; 41 42 // enable soft serial nss 42 NewSoftSerial nss(ssRX, ssTX);43 //NewSoftSerial nss(ssRX, ssTX); 43 44 44 45 // initial … … 57 58 server.begin(); 58 59 Serial.begin(9600); 59 nss.begin(9600);60 //nss.begin(9600); 60 61 pinMode(DC_control, OUTPUT); 61 62 pinMode(AC_control, OUTPUT);