I was wondering if it was possible to use DeviceRead to read a temperature sensor. So far Mathematica will only produce 1’s and 0’s from device read. Is importing the device data from an external file the only way to get my temperature data and other exact numerical data into Mathematica? Why doesn’t device read read the output voltage?
I have a TMP36 analog temperature sensor. My goal is to take some measurements and successfully plot them in Mathematica. So far I havn’t been able to access my readings measured by the temperature sensor. I prefer to program directly through Mathematica so I’m going to look into the I2C devices for the future. Currently, I’m having trouble with connecting the devices on the pins to Mathematica.
What hardware is Mathematica running on? The sensor is analog only so you need an analog to digital converter or a different temperature device but everything depends on your hardware.
Another simple option would just be to connect the TMP36 to an Arduino on one of the analog pins (say A0 for example), and then connect the Arduino to the Raspberry Pi over USB. Then in Mathematica you could read from the TMP36 sensor like so: