Page 1 of 1

Arduino connected detection

Posted: Sat Apr 24, 2021 5:04 pm
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

Re: Arduino connected detection

Posted: Sat Apr 24, 2021 5:54 pm
by Ralph
Did you flash your Arduino in 4.0...?

Re: Arduino connected detection

Posted: Mon Apr 26, 2021 9:37 pm
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.