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
이전 댓글 표시
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
Von Duesenberg
2018년 4월 8일
You probably deleted the rpi object at some point (or failed to initialize it).
채택된 답변
추가 답변 (1개)
sanjay singh
2018년 4월 8일
편집: Walter Roberson
2018년 4월 9일
카테고리
도움말 센터 및 File Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!