Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HTTPClient WIZnetInterface mbed
Fork of dweetIo_CloudService_Helloworld_WIZwiki-W7500 by
Revision 1:c212e07d1f23, committed 2015-09-14
- Comitter:
- eunkyoungkim
- Date:
- Mon Sep 14 05:48:57 2015 +0000
- Parent:
- 0:d372849df255
- Child:
- 2:4d82eafe860d
- Commit message:
- dweet.io
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WIZnetInterface.lib Mon Sep 14 05:48:57 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/WIZnet/code/WIZnetInterface/#d8773cd4edc5
--- a/WIZnet_Library.lib Thu May 07 02:19:12 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/teams/WIZnet/code/WIZnet_Library/#ca8405b9564d
--- a/main.cpp Thu May 07 02:19:12 2015 +0000
+++ b/main.cpp Mon Sep 14 05:48:57 2015 +0000
@@ -1,20 +1,14 @@
#include "mbed.h"
-#include "WIZnetInterface.h"
+#include "EthernetInterface.h"
#include "HTTPClient.h"
-#define USE_DHCP 0
-
-const char * IP_Addr = "222.98.173.212";
-const char * IP_Subnet = "255.255.255.192";
-const char * IP_Gateway = "222.98.173.254";
+#define USE_DHCP 1
unsigned char MAC_Addr[6] = {0x00,0x08,0xDC,0x12,0x34,0x56};
-
+char IP_Addr[] = "192.168.0.100";
+char IP_Subnet[] = "255.255.255.0";
+char IP_Gateway[] = "192.168.0.1";
Serial pc(USBTX, USBRX);
-#ifdef TARGET_LPC11U68
-SPI spi(P0_9,P0_8,P1_29);
-WIZnetInterface ethernet(&spi,P0_2,P1_13);
-AnalogIn CDSSensor(P1_9);//Analog A0 input. pgm5537 CDS sensor and 10k resistor.
/******************
VCC A0 GND
| | |
@@ -23,11 +17,15 @@
| | |
--10k-----CDS---
*******************/
-#endif
+
+EthernetInterface ethernet;
+
+AnalogIn CDSSensor(A0);
int main() {
- mbed_mac_address((char *)MAC_Addr); //Use mbed mac addres
+
+ /// mbed_mac_address((char *)MAC_Addr); //Use mbed mac addres
pc.baud(115200);
#if USE_DHCP
int ret = ethernet.init(MAC_Addr);
@@ -55,7 +53,7 @@
/*
http://dweet.io/follow/nameYouWant
*/
- char nameYouWant[] = "nameYouWant";
+ char nameYouWant[] = "sep152015test";
while(1)
{
sprintf(get_msg,"http://dweet.io/dweet/for/%s?a0=%d",nameYouWant,(int)(CDSSensor.read()*1000));
--- a/mbed.bld Thu May 07 02:19:12 2015 +0000 +++ b/mbed.bld Mon Sep 14 05:48:57 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/ba1f97679dad \ No newline at end of file
