PDA

View Full Version : storing State of a Push Button in SIOC



iwik
08-30-2015, 04:49 PM
Hi,
I want to drive a LED from a push button connected to a Bodnar card.
I am reading this switch thru an offset in FSUIPC. Want the led to stay
lit when releasing the switch and on another press of the switch for
the led to go out.
Using SIOC it will read a change in the switch for both press and release
thus turning the lead on and then off on button release.
Any ideas appreciated.
Thanks
Regards
Les

anijan
09-01-2015, 08:25 AM
Hi Les,

Perhaps you can find an answer here: http://www.lekseecon.nl/howto.html

Regards,

Jan

iwik
09-01-2015, 02:31 PM
Thanks Jan,
Yes I am aware of Nico's site. Can handle more of the simpler tasks with SIOC but even with those examples
I cannot see how I can do it. So will try a hardware solution.
Regards
Les

fordgt40
09-01-2015, 03:36 PM
Les

The first tutorial section on Nico`s site which is "Push Button" shows how to do it. Use type P for the switch and it will latch ie stay either on or off until the switch is pressed again

David

iwik
09-01-2015, 09:07 PM
David,
With the example on Nico's site deals with a switch connected to iocards. So you are defining the switch type.
In my case the switch is connected to a BU386x and I read the dec value of this switch via Offset 03c4. These
addresses are for the 0-15 joysticks available in FSUIPC and for each button press on a joystick and code is
generated. If I could find something in SIOC that would read this offset and latch it I could process it.
Les