How the function "readVoltage" (of Arduino package) works? Can I see its code?
1 次查看(过去 30 天)
显示 更早的评论
My goal is to plot data from Arduino (EMG signals). I wrote my own code for serial communication between Matlab and Arduino - I send data from Arduino (by IDE code) to the serial port and read and plot it in Matlab. I also wrote a code that works with Arduino package. It uses the built-in function "readVoltage". I have noticed that my code is as fast as the code with "readVoltage" function but, sometimes my code is stacked a little bit (I believe it happens because the PC processor busy with other programs). The code with "readVoltage" function seems to be more stable and also - it uploads itself the sketch to the Arduino ROM board without involving the Arduino IDE. Can I see the inside code of "readVoltage" function? for edit it and use it for my own needs?
1 个评论
Sergio Valderrama
2022-1-8
I have a similar problem, I am reading the temperature from a LM35 sensor and I have created my own code in the arduino environment but when reading the voltage, I find differences between the output of my program and the "readVoltage" function of Matlab. I also compared measuring voltage with a multimeter and I find that Matlab's "readVoltage" function works better.
I don't have a solution but I would also like to know if I can access this function.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!