Air Manager and Air Player applications come with Arduino support, even on the Raspberry Pi. This makes it easy to connected all sorts of hardware parts, like switches, buttons, rotary encoders, LED's, potentiometers and much more. All of this is interfaced with an easy to understand API.
For those who want to take it up a notch there's our Arduino library, which can be integrated right into your Arduino Sketch and makes it possible to communicate with Air Manager and Air Player.
my_image = img_add_fullscreen("my_image.png")
visible(my_image, false)
my_second_img = img_add(100, 100, 200, 200
move(my_second_img, 200, nil, nil, nil)
my_txt = txt_add("hello world", "font:myfont.ttf; size:11; color: black; halign:right;", 0, 0, 800, 200)
txt_set(my_text, "goodbye world")
my_second_txt = txt_add("number 42", "font:myfont.ttf; size:11; color: black; halign:right;", 0, 0, 800, 200)
move(my_second_txt, 200, nil, nil, nil)
canvas_id = canvas_add(0, 0, 100, 100, function()
_circle(50, 50, 20)
_stroke("red", 4)
end)
function new_altitude_callback(altitude)
print("New altitude: " .. altitude)
end
fsx_variable_subscribe("INDICATED ALTITUDE", "Feet", new_altitude_callback)
led_id = hw_led_add("RPI_V2_P1_38", 1.0)
hw_button_add("ARDUINO_MEGA2560_A_D52", function()
hw_led_set(led_id, 0.5)
print("LED brightness is set to 50%")
end)