Webduino Web_Demo - setting digital output does not work

197 views
Skip to first unread message

André Füchsel

unread,
Dec 21, 2011, 5:27:39 AM12/21/11
to webd...@googlegroups.com
I am confused a little bit. I installed the current version of Webduino along with Arduino 1.0 and after the necessary modifications of the write methods in Webserver.h everything worked as expected - nearly. I connected an LED with the usual resistor to D7 and tried to switch it on on the web page http://host/demo/form. I select the radio button "ON" for Digital 7 and press "Submit". The page is reloaded and the Digital 7 pin is shown - as Off.

I added some debugging statements into the code and if I issued a digitalRead(pin) right after the digitalWrite(), the pin is - for some strange reason - indeed reset to LOW immediately. Now comes the strage part. If I disconnect my LED, everything works as expected. I have no clue about the source of this problem, but if I just upload a simple blink example to the arduino, the LED connected to this pin is blinking, so there is probably no electrical problem.

The described behaviour is the same for all other pins.

Any idea?

Ben Combee

unread,
Dec 21, 2011, 10:47:12 AM12/21/11
to Webduino
You may need to add a pinMode(7, OUTPUT) command in the setup code. I
think that pin defaults to input, which means that digitalWrite()
commands to the pin change the pull-down resistor setting instead of
setting the output.

On Dec 21, 4:27 am, André Füchsel <afuech...@gmail.com> wrote:
> I am confused a little bit. I installed the current version of Webduino
> along with Arduino 1.0 and after the necessary modifications of the write
> methods in Webserver.h everything worked as expected - nearly. I connected
> an LED with the usual resistor to D7 and tried to switch it on on the web
> pagehttp://host/demo/form. I select the radio button "ON" for Digital 7

Cristoforo Capriglione

unread,
Oct 3, 2012, 9:56:57 AM10/3/12
to webd...@googlegroups.com
I've experimented the same exact issue (and obviously pinmode was added in the setup code). Switched to regular webserver - although WebDuino seems to be well conceived.

Has someone ideas regarding this issue? (any problem is Arduino v1.0 or v1.0.1?)
Reply all
Reply to author
Forward
0 new messages