Raspberry-pi+OF - questions

hi guys… I saw this topic a while ago http://forum.openframeworks.cc/t/raspberry-pi/10084/0 so I bought a Raspberry pi…

but I have a few questions:

How can I tell the difference between Raspbian hard-float and wheezy soft-float software?

How to install Code-blocks?

is there a compiled OF repository for the Raspberry-pi yet?


that guide is the best place to start - you want to use the Raspbian hard-float

hi, J thanks for the response!

but how can I tell if I have Raspbian already?
I bought a pre-installed SD card… (I don’t have a laptop that accepts sd cards)

is there a place inside the Raspberry pi operating system that tells you what version you got??

Edit/… … I think I got the shitty version…/// even though it says at the beginning armv6

ok I proceeded with the instructions anyway… (what’s the worst that could happen?) :slight_smile:

when I typed “sudo apt-get update” it appeared like it was connecting to the Raspbian server… (hope this means I got the right version…)

by the way… how is the Raspberry doing with OF performance-wise?? I intend to connect a web-cam and do some blob-detection… do you think this is pushing the limits??

sounds like you are on the right track :slight_smile:

performance is pretty good so far - I did some blob detection with a Ps3eye ( you will want a powered USB hub)

oh so sweeet!!! I can’t wait!

Everything worked fine but I think I am having a bit of a trouble wit this line:

edit /boot/config.txt and set gpu_mem option to gpu_mem=128 for the 256MB pi and gpu_mem=256 for the 512MB pi

I have the 512mb pi but … I don’t understand that instruction… I typed /boot/config.txt &enter but nothing happens… what does “edit” means?

skip that part for now - we may be having issues with it anyway

you should this for that stuff anyway (much easier)

sudo raspi-config   

ah, I see… I typed

sudo nano /boot/config.txt

but I couldn’t find gpu_mem=256

but with sudo raspi-config - I can change the memory_split from 64 … to 256 - But I am going to skip that part for now

Thank’s for the help J I ll keep on going…

ps: (I am going to skip this part as well)

![](http://forum.openframeworks.cc/uploads/default/2726/Screen shot 2013-01-16 at 10.09.01 PM.png)

ahgh… damn it… I went to make a cup of tea and (of-course) apparently Raspberry went to sleep… so the installation froze.
it’s been like this for more than half an hour…
anybody knows how to abort this procedure? I tried enter esc cmd esc… nothing works…
I am going to try unplugging the power supply tomorrow morning …hope everything will be ok.

So how do I get over this. should I just try download the directory again hoping that it will rewrite everything or sync them… or do I try deleting everything from the SD and start again?

…is there a command to delete a directory?

Thanks for the help guys… hope this threat will encourage more people to try this thing.

Edit:: by clicking F12 or somthing… it aborted and it restarted… not sure what happened…

but when I try access my openFrameworks directory with cd I get - no such file or directory…

so… I guess I will try clone it again tomorrow morning…

The OF repo is pretty big. When working with smaller computers I have downloaded the repo onto a laptop or desktop and then just copied the directory to the SD card into a reasonable location.

And just for reference, Ctrl+C will abort a command/process in Linux

Oh nice!!!

I got the spinning Raspberry!!

thanks for the help guys…


how you go along and connect a ps-eye or any web-cam whatsoever to a raspberry pi?

I’ve found this toutorial for the eye…

but for this project I don’t mind using other cameras…
I have plenty of them… all sorts of different brands… Should I just connect one of them and run the open-cv example? …

most of the stuff should work as OF normally does - (ofVideoGrabber, etc)

this is very exciting!

does the ofxVideoPlayer works as well?

…also how do you guys deal with the sleep problem of the pi?

do you just modify the bath file
pi@pi:~$ setterm -powersave off -blank

the window example and most simple examples work… sound player etc…

the openCv compiles runs but… I am having some issues with the camera… all I see is black boxes no streaming input by the camera

… I didn’t have the best of luck with the ofVideoPlayer example either… has anyone solved this??
… … any pointers on why it fails to run?

edit: I’ve found this fix by arturo
and also this…
and this for opencv

Here is a screenshoot of the errors I am getting in the vidplayerexmple…

I might be missing a package I will try again tomorrow…


I think I’ve figured out what I am supposed to do… (haven’t succeed yet though) but damn this is time consuming…
Can someone with a working OF on a raspberry pi make an SD card copy and upload it somewhere for the rest of us to copy? I don’t think it will be ever possible to have openframeworks accessible for the average person otherwise… this is just too complicated and it’s a shame because R-pi is such a great tool…

That is one of the goals being discussed but currently any SD card created will be outdated quickly.
I highly recommend setting up distcc as it is a game changer in the workflow and speeds up compiling at least 10x.

The instruction set seems long at a glance but is very well written:

I personally don’t mind the outdated sd card problem… I mean… I still have 007 on my macbook…

Definitely ofVideoPlayerExamples not working out of the box for me…

I tried again from scratch…

upgraded Rasbian
copied OF-developer
copied the makefile into openFrameworks/examples/video/videoPlayerExample
typed make
cd to bin
typed ./videoPlayerExample and this is what I got…

**[warning] GStreamer: cannot query time duration
**[error] GStreamer: cannot query width and height

pi@raspberrypi ~/openFrameworks/examples/video/videoPlayerExample/bin $ ./videoPlayerExample  
[ofAppEGLWindow::setupRPiNativeWindow:notice] screenRect.width==720, screenRect.height=480  
[ofAppEGLWindow::setupRPiNativeWindow:notice] windowRect.width==720, windowRect.height=480  
[ofAppEGLWindow::createSurface:notice] Setting up EGL Display  
[ofAppEGLWindow::createSurface:notice] EGL Display correctly set.  
[ofAppEGLWindow::createSurface:notice] No current render selected.  
[ofAppEGLWindow::createSurface:notice] Default Renderer detected.  
[ofAppEGLWindow::createSurface:notice] Surface created correctly  
[ofAppEGLWindow::createSurface:notice] API Binded correctly  
[ofAppEGLWindow::createSurface:notice] -----EGL-----  
[ofAppEGLWindow::createSurface:notice] EGL_VERSION_MAJOR = 1  
[ofAppEGLWindow::createSurface:notice] EGL_VERSION_MINOR = 4  
[ofAppEGLWindow::createSurface:notice] EGL_CLIENT_APIS = OpenGL_ES OpenVG  
[ofAppEGLWindow::createSurface:notice] EGL_VENDOR = Broadcom  
[ofAppEGLWindow::createSurface:notice] EGL_VERSION = 1.4  
[ofAppEGLWindow::createSurface:notice] EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface   
[ofAppEGLWindow::createSurface:notice] GL_RENDERER = VideoCore IV HW  
[ofAppEGLWindow::createSurface:notice] GL_VERSION  = OpenGL ES-CM 1.1  
[ofAppEGLWindow::createSurface:notice] GL_VENDOR   = Broadcom  
[ofAppEGLWindow::createSurface:notice] -------------  
[ofAppEGLWindow::setupPeripherals:notice] Peripheral setup complete.  
[ofAppEGLWindow:notice] setupUDev() : Created udev object.  
[ofAppEGLWindow:notice] setupMouse() : mouse_fd= 5 devicePath=/dev/input/by-path/platform-bcm2708_usb-usb-0:1.2:1.0-event-mouse  
[ofAppEGLWindow:notice] setupMouse() : mouse device name = Genius Optical Mouse  
[ofAppEGLWindow:notice] setupKeyboard() : keyboard_fd= 6 devicePath=/dev/input/by-path/platform-bcm2708_usb-usb-0:1.3:1.0-event-kbd  
[ofAppEGLWindow:notice] setupKeyboard() : keyboard device name = SIGMACH1P USB Keykoard  
[ofAppEGLWindow::setupPeripherals:notice] Native event setup complete.  
[ofAppEGLWindow::setupOpenGL:notice] Peripheral setup complete.  
[ofAppEGLWindow::runAppViaInfiniteLoop:notice] Entering infinite loop.  
(videoPlayerExample:2158): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed  
(videoPlayerExample:2158): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed  
(videoPlayerExample:2158): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed  
[error] GStreamer: unable to set pipeline to ready  
(videoPlayerExample:2158): GStreamer-CRITICAL **: gst_element_query_duration: assertion `GST_IS_ELEMENT (element)' failed  
[warning] GStreamer: cannot query time duration  
** (videoPlayerExample:2158): WARNING **: gstvideo: failed to get caps of pad app_sink:sink  
[error] GStreamer: cannot query width and height  
(videoPlayerExample:2158): GStreamer-CRITICAL **: gst_element_query_position: assertion `GST_IS_ELEMENT (element)' failed  
[ofAppEGLWindow::runAppViaInfiniteLoop:notice] ofNotifySetup() complete.  
[warning] ofGstVideoUtils not loaded  
Segmentation fault  
pi@raspberrypi ~/openFrameworks/examples/video/videoPlayerExample/bin $   

I then tried to modify the ofVideoPlayer object … but with no luck thus far…

![](http://forum.openframeworks.cc/uploads/default/2742/Screen shot 2013-01-21 at 5.01.01 PM.png)


… I got a black window…

but NO actual video playback yet

I must be missing some packages… any ideas? or any other object that can play video (even in just fullscreen mode) inside OF?

![](http://forum.openframeworks.cc/uploads/default/2744/Screen shot 2013-01-21 at 6.41.54 PM.png)