Arduino connected detection

Peer support for Air Manager desktop users

Moderators: Ralph, russ

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

Arduino connected detection

#1 Post by Shimokuta » Sat Apr 24, 2021 5:04 pm

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: 5076
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Arduino connected detection

#2 Post by Ralph » Sat Apr 24, 2021 5:54 pm

Did you flash your Arduino in 4.0...?

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

Re: Arduino connected detection

#3 Post by Shimokuta » Mon Apr 26, 2021 9:37 pm

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

Who is online

Users browsing this forum: No registered users and 8 guests