EspruinoWifi - digitalWrite triggers setWatch event #4534
Replies: 1 comment
-
Posted at 2017-11-09 by @gfwilliams How are you driving the relay? Does it have its own transistor? If you're driving it direct then I could imagine that the voltage spike from the relay coil could definitely affect surrounding pins (I imagine it would be out of spec for the chip). The other problem could be that while the pins are 5v tolerant as inputs, they only produce a 3.3v output voltage - so if you're powering the relay off 5v, and you output To fix that you could try setting the output type if A5 to Posted at 2017-11-09 by Sacha Hi Gordon Sacha Posted at 2017-11-09 by @gfwilliams I'd be pretty sure its what I'd said then - I've had issues with that in the past. Either setting
will probably fix it |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-11-08 by Sacha
Hi Gordon
SetWatch:
pinMode(A6, "input_pulldown");
setWatch(function(e) { do something }
Relay:
When i switch the relay width "digitalWrite(A5,1)" on, relay will be triggered as expected.
Sometimes the A6 setWatch is triggered in the same moment as the relay is triggered. Not allways, it is reproduceable out of 25 on/off switches of the relay.
I was not able to reproduce it when i have the setWatch on A1.
I was also not able to reproduce it then i powered the EspruinoWifi by USB.
Is this becuase A5 and A6 are neighbors ?
Thanks
Sacha
Beta Was this translation helpful? Give feedback.
All reactions