Hi All, I have read numerous posts on how to make this connection on many forums and the inconsistency i've experienced has led me to post my problem. I am trying to connect Mathematica to my Arduino Uno through the USB port. I just want to read the Analog Pins as input on the Arduino and save the values in a list so that I could start plotting. I connect the device as
ardu = DeviceOpen["Arduino", "/dev/tty.usbmodem14101"]
And Mathematica returns I am not sure what all the red here means. Then I ask Mathematica the following
DeviceRead[ardu, "A0"]
and Mathematica gives me If I re-evaluate cells 1 and 2 respectively I get
I am so troubled by this because Mathematica arbitrarily decides whether it will read pin "A0" or not. Sometimes it evaluates and other times it does not. Could anyone explain how to connect and read "A0" the correct way? The last time Mathematica allowed me to read "A0" I saved the file. Ive attached this file. I have also tried this with Windows 10 and am getting the exact same inconsistencies and have attached that as well. Any help would be much appreciated!! Thanks in advance. I am using Mathematica 12.0.0.0 on both MacOS and Windows 10.
Attachments: