Message Boards Message Boards


Arduino interfacing with Mathematica

Posted 2 years ago
3 Replies
0 Total Likes

I am using Mathematica 10 and trying to interface Arduino Uno for some data acquisition application. i am getting the device opened with DeviceOpen command. But DeviceConfigure not executed well to do some thing with arduino board. I am using Windows 8.1 Operating system. Can anybody help me ?

3 Replies

Hi Johnson,

What version of Mathematica are you using? And what code is specifically failing?

I will try and help you, but I need more information about the problem you are experiencing.



Hi Ian, I was about to acknowledge your help through the details posted in your blog regarding Arduino Interface with mathematica. I could able to interface Arduino UNo with Mathematica 10.0.2. Thanks. I need one more information regarding the reference voltage adjustment during analog input measurement. Can I set the reference voltage to 1.1V internally by Mathematica commands?

So you are using 10.0.02? If this is the case, then you will not have access to the built-in Mathematica device driver, but you can manually modify the sketch I attached to that blog post to include this line in the setup() function:


in the sketch you upload through the Arduino IDE.

Alternatively, if you are using Mathematica 10.4 or higher, you can use a "BootFunction" to set the analog reference like this:

DeviceConfigure["Arduino","Upload"->"BootFunction"-><|"Code"->"void setAnalogRef() { analogReference(INTERNAL); }"|>]

This function will be called as soon as the Arduino turns on (as if it was called from the setup() function), to set the analog reference to the internal 1.1 volt reference.

Hope this helps you with your application.


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

Group Abstract Group Abstract