ePrivacy and GPDR Cookie Consent by TermsFeed Generator The SIOC | My Learjet 45 Home Cockpit | DomoticsDuino - Computer engineer, Smart Home / OpenHAB, Flight Sim and others...
My Learjet 45 Home Cockpit (63 posts)

03/02/2012

The SIOC [Versione in italiano]

by Marco



Finally, it's my time...software developing!

Ok, I don't know SIOC but event driven programming language is my "specialty"

So, I study its syntax, take some example 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.

Nothing easier!!!!

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