Author Topic: Updated: posting data on wifi server example  (Read 3446 times)

dbell

  • Newbie
  • *
  • Posts: 44
Updated: posting data on wifi server example
« on: December 25, 2013, 01:19:04 pm »
Off for the holidays, so I revisited this and expanded on the server I posted a while back.

It now allows you to fiddle with all reasonable pins of the DigiX.
You can modify which pins are available by setting or clearing bits in lines 10 & 11 of the sketch.
When connected in your browser, the page is divided into three parts.

In the top section, all active pins are displayed, indicating whether they are INPUT or OUTPUT mode, and the line state (1/0).
Clicking on any pin's indicator will toggle it between INPUT and OUTPUT.

In the second section, Analog input pins 0-11 are displayed, normalized to 5.000V full scale.

In the bottom section, all currently OUTPUT pins are displayed, with up and down arrows to Set or Clear the bit.
Clicking on the state icon between the arrows toggles the state.

Dave

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Updated: posting data on wifi server example
« Reply #1 on: December 25, 2013, 11:47:24 pm »
very cool update Dave - one comment - all pins on the DigiX (without the level shifter) are not 5v tolerant - so I imagine the Analog pins should be on a 0-3.3v scale - unless you are using the level shifter with it

dbell

  • Newbie
  • *
  • Posts: 44
Re: Updated: posting data on wifi server example
« Reply #2 on: December 26, 2013, 09:08:55 am »
D'oh!!  You're right, of course!
Change the line in function dispApin() to
  buf += String(pin) + "=" + fltString(analogRead(pin)/310.0,3) + " ";

Thanks,

Dave