Push script to air player

Support for connecting hardware to the Raspberry Pi GPIO

Moderators: Ralph, russ

Message
Author
bencorbe
Posts: 5
Joined: Mon Oct 11, 2021 3:36 pm

Push script to air player

#1 Post by bencorbe » Mon Oct 11, 2021 3:44 pm

Hi guys !
I'm new to air manager and I have a networked raspberry pi 4 (air player) with two arduinos connected to it. I made a lua script for each arduino and when I do "Run" everything works great.
I would now like this script to be launched when starting my raspberry. I tried the "Push" button but when I restart air manager and power on my raspberry, the script doesn't start.
I must have missed something somewhere.
Basically when I open air manager, xplane and power on my raspberry, I would like everything to initialize correctly directly.
Anyone to help me with this?

User avatar
Ralph
Posts: 5411
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Push script to air player

#2 Post by Ralph » Mon Oct 11, 2021 5:29 pm


bencorbe
Posts: 5
Joined: Mon Oct 11, 2021 3:36 pm

Re: Push script to air player

#3 Post by bencorbe » Mon Oct 11, 2021 5:36 pm

Hello Ralph!
This is exactly the documentation that I followed but obviously it doesn't work. A popup opens 1 sec when I click on "Push" but nothing else happens and the player obviously does not have the code...

User avatar
Ralph
Posts: 5411
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Push script to air player

#4 Post by Ralph » Mon Oct 11, 2021 6:37 pm

I've never heard that it does not work. It might be that there's an error in your script.

User avatar
Sling
Posts: 4669
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Push script to air player

#5 Post by Sling » Tue Oct 12, 2021 2:53 am

Have you tried it with a single community instrument that is known to be working. If that works you can start adding in more instruments until it breaks and then you will have more information where the issue may be.

User avatar
Ralph
Posts: 5411
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Push script to air player

#6 Post by Ralph » Tue Oct 12, 2021 7:48 am

It might also help to download the log from Air Player in the Home tab (right click on Air Player). There could be something useful in there.

bencorbe
Posts: 5
Joined: Mon Oct 11, 2021 3:36 pm

Re: Push script to air player

#7 Post by bencorbe » Tue Oct 19, 2021 9:09 am

Hello everyone,

I tried with a silly code (just a permanently lit LED) but it doesn't seem to work any better.

Code: Select all

my_led = hw_led_add("ARDUINO_MEGA2560_I_D47", 0.5) 
Here is the log I have:

Code: Select all

19-10-2021 09:51:44 INFO SimRemoteServer: Accepted connection from 192.168.1.212
19-10-2021 09:53:40 INFO AirPlayer: Starting development instrument
19-10-2021 09:55:17 INFO AirPlayer: Starting development instrument
What is weird is that it goes well in development when I click on "Run" but nothing happens in the log when I click on "Push".
Either there's something I'm doing wrong or there's a bug somewhere...

User avatar
Ralph
Posts: 5411
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Push script to air player

#8 Post by Ralph » Tue Oct 19, 2021 10:01 am

Did you try any of the Raspberry Pi IO pins? Instead of an Arduino.

bencorbe
Posts: 5
Joined: Mon Oct 11, 2021 3:36 pm

Re: Push script to air player

#9 Post by bencorbe » Thu Oct 21, 2021 12:13 pm

Hello Ralph,

I connected a led between my pin 12 and the ground on my raspberry pi 4 and tested this code:

Code: Select all

my_led = hw_led_add("RPI_V2_P1_12", 0.0)
hw_led_set(my_led, 0.5)
Unfortunately nothing works, neither the test nor the push.

On the other hand, when I do "run" with my arduino it works very well but the push does not work.

I don't understand any of this

User avatar
Sling
Posts: 4669
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Push script to air player

#10 Post by Sling » Thu Oct 21, 2021 12:23 pm

Can you post the code for the whole instrument you have loaded on the pi. Its difficult to establish what you actually have with just a few code lines. As an example you mention button but i don't see the button code.

Also can you explain what you are expecting the code you post to do upon start.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest