How do I write a matlab code for an arduino flex sensor?

13 ビュー (過去 30 日間)
Allison Bateman
Allison Bateman 2016 年 10 月 10 日
回答済み: karam abu mallouh 2020 年 8 月 28 日
I need help writing my code so that when my computer is connected to my arduino board (with the flex sensor attached), I can bend the flex sensor and a graph will pop up with the values of the changing resistance. Any help is appreciated!

回答 (1 件)

karam abu mallouh
karam abu mallouh 2020 年 8 月 28 日
hi i had the same problem today ,i saw this question and i was sad that no one answers so to anyone who wants help this could help you with flex sensors (arduino)
for index= 1:100
c=0
voltage(c+index,1)=readVoltage(a,'A1');
voltage(c+index,2)=readVoltage(a,'A2');
voltage(c+index,3)=readVoltage(a,'A3');
voltage(c+index,4)=readVoltage(a,'A4');
voltage(c+index,5)=readVoltage(a,'A5');
disp(voltage(index,1))
disp(voltage(index,2))
disp(voltage(index,3))
disp(voltage(index,4))
disp(voltage(index,5))
end
and now you have the voltage data for each milsecond
i hope that someone will be helped by this
if i helped you in this problem let me know it will make me happy :)

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by