Message Boards Message Boards

Unexpected output from DeviceRead[ ]?

Posted 3 years ago

Hi Maker Mathematica community,

I am currently trying to move a work project from Arduino to Wolfram Mathematica for eventual live plotting. I am new to Wolfram Mathematica and connected devices, but I'm very familiar with Arduino. I want to read the same analog values that I read from my Arduino serial port, however when I ask Mathematica to read them, it gives me the voltage values. I'm hesitant to try and convert these voltage values as I already have an equation for converting ultrasonic sensor data over to change in distance of centimeters pertaining to a spring mass system. I know the circuit is working correctly, but the values that Mathematica reads are very different from the Arduino values.

Here's my arduino code: (I tried to post it in an ".ino " file but the file type wasn't supported)

Attachment

Attachments:
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract