After a couple of weeks, finally I got the opencockpits’s USB card.
In addition to the card I got also red, green and yellow leds.
So, it’s time to start doing some tests…but I think I’d be better to ask for any help. Pierooooooooooooooooooo…how are you????
We try USB card just to test if it’s working using the supplied software: we link leds to the card’s output using a resistor to avoid flames
It’s a miracle…the led lights up!!! Ok, I’m just using the supplied software…no integration with the sim for now.
To be cleaner, we insert the leds in the breadboard and link them to 3 outputs of the USB card, using appropriate connectors
Always using the supplied software, we verify that leds light up…so we can be sure that links and solderings are fine.
So, the card works…next step will be the use of SIOC programming language to interface the sim and to drive the leds according to events of sim.
For the moment I’m satisfied with the first tests…I never tried to light up a led
Many thanks to Piero for his technical support…
Now, it’s my time…software developing!
Ok, I don’t know SIOC but event driven programming language is my “specialty”
So, I studied its syntax, take some examples over the internet and that’s it.
My first case study is a simple software which lights up leds according to the status of the sim, using FSUIPC interface library. So, I connect 3 card’s output to the breadboard, on which I set up the leds. I keep in mind output number and write down my first “piece of code” in SIOC language.
First thing to do is identify the FSUIPC’s variables (called OFFSET) which control the events; so, helped by documentation, I found, just as an example, offsets related to LANDING LIGHTS, TAXI LIGHT e STROBE LIGHT.
Now in SIOC I define private variables linked to sim’s variables and write down procedures which belong to the sim’s events (for example LANDING LIGHTS lights up)
Then, I define other 3 private variables, linked to card’s output.
This little software put in relation OFFSET related variables (input) to variables linked to the card’s output. In other words:
for any change of value of an OFFSET (event):
– if INPUT value is equal to 1 then set 1 to the related output;
– otherwise set 0;
Setting 1 to an output means to get 5V voltage on related terminal…using a well sized resistor the led get 2V voltage and lights up with the right power.
Here is a short video which documents the achieved result: through SAITEK panel I control the plane’s lights and leds light up according to the issued command.
Now I have to define all the sim’s status and write down the related softwares