Dear Arduino fans,
when trying to control Arduino Uno R3 by Wolfram Mathematica 13.1 in Linux
I was surprised that the file
/usr/local/Wolfram/Mathematica/13.1/SystemFiles/Links/ArduinoLink/Kernel/ArduinoLink.m
contains the line
linux64URL = "http://arduino.cc/download.php?f=/arduino-1.6.7-linux64.tar.xz",
with the url that does not exist any more.
Only when I changed this line to
linux64URL = "https://downloads.arduino.cc/arduino-1.6.7-linux64.tar.xz",
then the command
DeviceOpen["Arduino", "/dev/ttyACM0"]
does indeed open the device.
But still, the command
DeviceWrite["Arduino", 13 -> 1]
does not turn the builtin LED on.
Have you any experience how to control Arduino by Mathematica in Linux?
Pavel
The RX LED flashes shortly showing there is some communication between the computer
and Arduino, but the internal LED remains dark.
Turning the internal LED on using Arduino IDE works O.K.
Yes, I know that the Arduino IDE version 1.6.7 is outdated. I wanted to have my configuration
as close as possible to that of Ian Johnson - the author of the file
/usr/local/Wolfram/Mathematica/13.1/SystemFiles/Links/ArduinoLink/Kernel/ArduinoLink.m
According to the documentation I found this should create a sketch, compile it and upload it to the Arduino. As I have no clue about that syntax I cannot say if that's correct and what sketch will be uploaded to the Arduino. As it uses the Arduino IDE for the upload I would expect a quite long time for that command to execute. Is that the case?
Try to upload a sketch that blinks the internal LED. Then execute the Mathematica script, reset the Arduino. If the Arduino starts to blink again, that code production and upload inside Mathematica doesn't work.