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!