i am using myrpi variable inside a while loop. i am gettng an error as undefine function or variable myrpi. code is " if isempty(bbox) disp('No one is Here turn off all connection')else disp('someone is here in the room')"Please help
Ältere Kommentare anzeigen
code:
if isempty(bbox)
disp('No one is Here turn off all connection')
else
disp('someone is here in the room turn on supply ')
for i = 1:10
writeDigitalPin(rpi, 4, 1);
pause(0.5);
writeDigitalPin(rpi, 4, 0);
pause(0.5);
end
error:
Undefined function or variable 'rpi'.
Error in finalprogram1 (line 27)
writeDigitalPin(rpi, 4, 1);
1 Kommentar
Von Duesenberg
am 8 Apr. 2018
You probably deleted the rpi object at some point (or failed to initialize it).
Akzeptierte Antwort
Weitere Antworten (1)
sanjay singh
am 8 Apr. 2018
Bearbeitet: Walter Roberson
am 9 Apr. 2018
Kategorien
Mehr zu MATLAB Support Package for Raspberry Pi Hardware finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!