Arduino connected detection

Peer support for Air Manager desktop users

Moderators: russ, Ralph

Post Reply
Message
Author
Shimokuta
Posts: 113
Joined: Wed Feb 03, 2021 12:52 pm

Arduino connected detection

#1 Post by Shimokuta »

Hello

I recently upgraded to AM 4.0.
I build a little check in my LUA script to visualy show if an Arduino is connected or not
If it is an image of an Arduino is shown , if not , the same image with a red cross is shown

This script worked fine in 3.7 , but in 4.0 this detection doesn not work anymore.
Has there been a change for this?

This is the code:

Code: Select all

if hw_connected("ARDUINO_MEGA2560_B") then
  img_add_fullscreen("Arduino8.png")
else
  img_add_fullscreen("Arduino8_NC.png")
end

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

Re: Arduino connected detection

#2 Post by Ralph »

Did you flash your Arduino in 4.0...?

Shimokuta
Posts: 113
Joined: Wed Feb 03, 2021 12:52 pm

Re: Arduino connected detection

#3 Post by Shimokuta »

Yes i did.
I have found a fix.
I check the availability of a port of the arduino
ARDUINO_MEGA2650_B_D2

This solves the problem.
Still weird though.

Post Reply