Hello guys, please help me to solve the below mentioned error regarding clearing arduino object
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
please do help me ASAP.
0 Kommentare
Antworten (2)
EngEdgarHS
am 19 Mai 2017
Bearbeitet: EngEdgarHS
am 19 Mai 2017
Hi, you cannot use x this way. If you are using pin 13 as digital output, try:
x = 1;
writeDigitalPin(a, 'D13', x);
but if you want to read state of this pin as digital input (I think you want to do this by the format of your code), try:
[y,fs]=audioread('Blank Space.mp3');
configurePin(a,'D13', 'digitalInput');
x = readDigitalPin(a,'D13');
if x==1
sound(y,fs)
else
clear sound;
end
For clear Arduino object, try it:
clear board;
if ~isempty(instrfind)
fclose(instrfind);
delete (instrfind);
end
clear a;
Good luck.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Device Driver Blocks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!