missing RaspberryPi functions ? mycamera and cameraboard ? help please
Show older comments
I can execute raspistill and other Linux commands using the h.execute('command') functions, but when I try to follow the examples using mycamera or cameraboard, I get an error.
The following is a copy of the 'attempts'
I think there is something 'missing' but I don't know what it would be.
-----------------
Student License -- for use by students to meet course requirements
and perform academic research at degree granting institutions only.
>> h = raspberrypi('192.168.1.141', 'pi','raspberry')
h =
LinuxServices with properties:
HostName: '192.168.1.141'
UserName: 'pi'
Password: 'raspberry'
BuildDir: '/home/pi'
>> msg = h.execute('ls -ltr')
msg =
0
>> [status,msg] = h.execute('raspistill -o mlpix.jpg')
status =
0
msg =
''
>> [status,msg] = h.execute('ls -ltr')
status =
0
msg =
total 4848
drwxrwxr-x 2 pi pi 4096 Jan 27 2015 python_games
drwxr-xr-x 2 pi pi 4096 Feb 4 2015 Desktop
-rw-r--r-- 1 pi pi 2250521 Oct 3 02:59 image1.jpg
-rw-r--r-- 1 pi pi 2695314 Oct 5 01:10 mlpix.jpg
>> h.execute('raspistill -o mlpix1.jpg')
ans =
0
>> [status,msg] = h.execute('ls -ltr')
status =
0
msg =
total 7460
drwxrwxr-x 2 pi pi 4096 Jan 27 2015 python_games
drwxr-xr-x 2 pi pi 4096 Feb 4 2015 Desktop
-rw-r--r-- 1 pi pi 2250521 Oct 3 02:59 image1.jpg
-rw-r--r-- 1 pi pi 2695314 Oct 5 01:10 mlpix.jpg
-rw-r--r-- 1 pi pi 2670367 Oct 5 01:12 mlpix1.jpg
>> img = snapshot(mycamera)
Undefined function or variable 'mycamera'.
>> raspi
Error using raspi (line 157)
Cannot establish an SSH connection to the board with device address "raspberrypi-oyA7GXtjsW".
Caused by:
Error using raspi (line 153)
Error executing command: Unable to open connection:
Host does not exist
>> raspi = h
raspi =
LinuxServices with properties:
HostName: '192.168.1.141'
UserName: 'pi'
Password: 'raspberry'
BuildDir: '/home/pi'
>> img = snapshot(mycamera)
Undefined function or variable 'mycamera'.
>> raspi.execute('raspistill -o mlpix3.jpg')
ans =
0
>> [status,msg] = h.execute('ls -ltr')
status =
0
msg =
total 9968
drwxrwxr-x 2 pi pi 4096 Jan 27 2015 python_games
drwxr-xr-x 2 pi pi 4096 Feb 4 2015 Desktop
-rw-r--r-- 1 pi pi 2250521 Oct 3 02:59 image1.jpg
-rw-r--r-- 1 pi pi 2695314 Oct 5 01:10 mlpix.jpg
-rw-r--r-- 1 pi pi 2670367 Oct 5 01:12 mlpix1.jpg
-rw-r--r-- 1 pi pi 2557407 Oct 5 01:18 mlpix3.jpg
>> mypi = h
mypi =
LinuxServices with properties:
HostName: '192.168.1.141'
UserName: 'pi'
Password: 'raspberry'
BuildDir: '/home/pi'
>> img = snapshot(mycamera)
Undefined function or variable 'mycamera'.
>>
Answers (2)
Madhu Govindarajan
on 8 Oct 2015
0 votes
Have you tried using the cameraboard function??? I don't see that in the code you have mentioned here. I would try something like - mycamera = cameraboard(h,'Resolution','1280x720') img = snapshot(mycamera)
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!