chipKIT® Development Platform

Inspired by Arduino™

internet control of max32 + network shield + basic i/o shiel

Created Fri, 06 Sep 2013 20:57:41 +0000 by DandyDon


Fri, 06 Sep 2013 20:57:41 +0000

I have a project that needs to control some relays & switches remotely. I have a max32, network shield, & basic i/o shield. I looked thru some of the documentation, but can't figure out the best way to do this.

Do I run the sketch WebClient? or is it WebServer?

Thanks in advance for any help!


Wed, 18 Sep 2013 19:08:57 +0000

I got something working...

I uploaded the WebServer demo & connected to my boards thru Ethernet. I can see the potentiometer changing in the web page as I hit refresh & adjust the pot.


Wed, 18 Sep 2013 21:29:43 +0000

Great! Glad to hear that you got it working...



Fri, 20 Sep 2013 17:43:36 +0000

OK. I can play around with the code & see the pot value change on the web page using the chipKITWebServer code.

Is there a way to get data into the chipKIT from the web page? For example, click on a button in the web page & that turns on one of the LEDs on the Basic I/O shield...


Fri, 20 Sep 2013 21:05:20 +0000


You can do that but it requires you to know a bit about HTTP. So instead I have included some example code that might help you with how to write HTTP Servers. You will need to download the Digilent Network libraries from,892,942&Prod=CHIPKIT-NETWORK-SHIELD

in order for these examples to run.

These sketches depend on the DNETcK network libraries.


Tue, 24 Sep 2013 14:47:06 +0000

AWESOME! Thanks! I'll give this a try...


Tue, 24 Sep 2013 19:26:21 +0000

Thanks, Keith! I got it working... for a little while. I tried changing the code a little to see what I could do & now it doesn't work. I can't ping the board, the web page doesn't come up, nothing.

I did not fry any boards--I can load the chipKITWebServer.pde & it works. I can ping the board when using that sketch.

I tried power cycling the boards. No change.

I pulled the Ethernet cable out & plugged it back in. No change.

I went back to the original code from your zip file. No change.


I am confused a little about how to define the MAC address. I am using the Max32, chipKIT Network Shield, & chipKIT Basic I/O Shield. In your sketch, there is a section for defining the MAC:

#if defined(PMODNIC_H)
#define SPECIFY_MAC    1    // 0 -> Use hardware MAC (usual case), 1 -> Specify the MAC (PmodNIC)

MAC useMAC = {0x00,0x04,0xA3,0x00,0x00,0x01};
//MAC useMAC = {0x00,0x04,0xA3,0x00,0x00,0x02};
//MAC useMAC = {0x00,0x04,0xA3,0x00,0x00,0x03};

#else // NOT PmodNIC
#define SPECIFY_MAC    0    // 0 -> Use hardware MAC (usual case), 1 -> Specify the MAC (PmodNIC)
#endif  // End PmodNIC

Since I'm not using the PmodNIC, how do I define the MAC? I tried tracing the code, but got lost...


Tue, 24 Sep 2013 19:56:32 +0000

OK. I got it working again... Not sure what happened.

I'll start playing with the web page code again to see if it breaks.

I notice that the web page shows 2 of the switches as '1' when they are off. I looked thru the code & can't figure out how to fix this...


Fri, 27 Sep 2013 20:15:05 +0000

Still can't figure out why SW3 & SW4 are showing 1 when they are off. Also, LED3 (3rd LED from center of Basic I/O Shield) is on all the time...

I checked the schematics for the boards & can't find anything. Has anyone seen this before?