Hey folks,
I'd assume I'm having a basic electrical engineering brain cramp here but could use some debugging advice.
I have the brake switch input wired through a 10K resistor into GPPIO(1). this is mapped to a virtual channel Brake_stat.
When I press the brake, Brake_stat immediately goes to 1 - but when I release it, it's taking around 5 seconds to reset back to zero. I'm assuming I screwed up on my resistor choice or wiring and have some weird voltage decay but does anyone have an explanation for this phenomena?
Lua code follows:
brake_status = addChannel("Brake_stat", 10, 0)
(inside on tick)
if getGpio(1) == 0 then
setChannel(brake_status,0)
else
setChannel(brake_status,1)
end
Slow response on digital brake input?
Moderators: JeffC, rdoherty, stieg