Closed kassalkane closed 9 years ago
Hi there. From what I can see one of the problems you are facing is being denied permissions when running this line of code in piblasterpcm.sh
:
echo raspberry | sudo -S ./pi-blaster/pi-blaster start --pcm
It is worth checking that your password is set to the default ("raspberry"), or changing the script in this line to suit.
As for the "opening V4L interface" problem, you should check that the webcam is working by installing
try installing some dependencies:fswebcam
and running the following command: fswebcam -d/dev/video0 ~/test.jpg
. Then you can check in your home directory and see if it captured an image successfully. If that doesn't work
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev
Restart your pi and run the command again. This is as far as my knowledge extends without some serious googling, but let me know how it goes!
Edit: Sorry, just read that you've already checked your camera is working using raspistill.
Thanks for getting back to me. I did some research and found that the video0 device isn't used with the native PI camera. So I tried another mjpgstreamer from the following site and it solved my problem.
https://miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/
I do have another question for you. Have you found a way to have your project autoload when booting the Pi? I have tried init.d script but haven't been successful.
Cheers,
Kassal.
Hi,
I finally did figure out how to auto load everything on boot. I used Forever to load the app in node.js and then loaded the sh scripts and Forever using an init.d script. Works great!
Now Im waiting for my motor controller and platform to arrive so I can try it out.
Cheers,
Kassal
Nice to hear you got this sorted, although it's a shame we don't know why it never worked. I got it working on startup by running the startrobot script from the bashrc file, but since I spent most of my time developing/debugging, I usually ended up just SSHing in to it and running startrobot manually.
All the best, Joe
Hi,
Im having an issue getting the mjpgstreamer working. When I run ./startrobot I get the following. Any suggestion as to what the issues is? I have the Raspberry PI Camera and have tested that it works with raspistill.
pi@raspberrypi ~/robot $ sudo ./startrobot CHANGING PI-BLASTER FROM PWM TO PCM... ./startrobot: 4: ./startrobot: ./piblasterpcm.sh: Permission denied PI-BLASTER SETTINGS CHANGED. NOW RUNNING SERVERS... rm: cannot remove `mjpgstreamer.log': No such file or directory Starting server. done... MJPG Streamer Version: svn rev: Unversioned directory i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 320 x 240 i: Frames Per Second.: 5 i: Format............: MJPEG ERROR opening V4L interface: No such file or directory Init v4L2 failed !! exit fatal i: init_VideoIn failed server listening on port 8090 visit http://ipaddress:8090/socket.html