Where are the demos Eben speaks of?

General programming chat and advice for beginners

15 posts
by mumblefuzz » Sun Jun 10, 2012 6:59 pm
In the post, Eben gives a demo, http://www.raspberrypi.org/archives/1379, where can I find the demos he speaks of. I'm running the debian6-19-04-2012.img. Are they part of this? Is there a package I can apt-get? Or somewhere on this site :?: ?

Thanks.
User avatar
Posts: 7
Joined: Sun Jun 10, 2012 3:33 pm
Location: Richmond Hill, Canada
by RussIT » Sun Jun 10, 2012 7:16 pm
Yes I would like to try them too but can't find where they are either.

ah I have just seen this /opt/vc/src/hello_pi mentioned in the quick start guide, off to look there, brb.

ok back

yes there all in there

type make to create a binarry file

then use ./filename.bin to run it
Last edited by RussIT on Sun Jun 10, 2012 7:31 pm, edited 1 time in total.
Posts: 28
Joined: Thu Jan 05, 2012 11:34 am
by dom » Sun Jun 10, 2012 7:22 pm
Try:
/opt/vc/src/hello_pi/*

on your sdcard. If not try:
http://elinux.org/R-Pi_Troubleshooting# ... g_firmware
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4034
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Video_Liam » Thu Jun 14, 2012 1:38 pm
Hi,

I have been following this thread myself and would like to run the demos as well.

I am totally new to Linux, but have installed the Deb distro, my PI is up and running and I have been reading as much as I can over the last week or so.

I can log on to PI, change the directorys to the directorys were the samples are supposed to be.. I run 'make' and I appear to get error messages... and when I try to ./ (run) the programs defienitly get error messages...

Please if I may I have a few questions...:-

Do I just run the command 'make' in the directory were I am expecting the source code to be, or do I have to be explicit and use:- make filename.xxx ?

How do I tell which file it the sorce code to be complied?

How do I tell which file is the complied exacutable.?

One of the tutorials I followed a link to suggested that the different file types and sub directorys were supposed to be color coded... all mine are white... is my distro bad?

I conclude, that I have not got the correct compiler installed, but how would I know if I have, or were to get it if I don't....

Typing get-xxx is a cool way of commanding your operating system to install a programme, but how do i know which xxx? :?:

Whats Sudo got to do with anything apart from Phil Colins? ;)

I must say, as an old hand at DOS I am not entirely afraid of Lunix, but its overall lack of stanadarisation is a let down. I can see why many new comers are frightened off. Particularly as there are so many differences within the distro's that you can not even buy anything like a half decent book to guide you in.. Not that any bookshops have computer books anymore.... How would I know which book to send off for...?

Anyway.. any assistance would be a great help..


Thanks

Liam
Posts: 7
Joined: Thu May 31, 2012 11:30 pm
by bredman » Thu Jun 14, 2012 1:46 pm
Nothing is wrong, your system seems to be working fine.

Enter this command to go to the correct directory
cd /opt/vc/src/hello_pi

Enter this command to read the instructions (only the first part is relevant for you)
cat README

The sudo command is not needed in this case. But in general, it is needed to give you permission to change anything which could affect the Linux operating system.

(To the experts, I know this is a simplification, but good enough for this case)

For an absolute beginner's guide, you could read the MagPi magazine
http://www.themagpi.com
Posts: 1413
Joined: Tue Jan 17, 2012 2:38 pm
by jamesh » Thu Jun 14, 2012 1:58 pm
Linux - lack of staandardisation....?

Hi Liam,

not sure why you think there is a lack here. In general, all the basic (and not so basic) commands are the same across all Linux systems. There are some differences with regard to package management (app installation to the phone generation!), but mostly all pretty similar. A generic Linux for Dummies style book should cover most eventualities - there are some PDF files for learning Ubuntu Linux which would be the same as the Raspi for all command line stuff (ignore the desktop as they are different).

James
Unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11782
Joined: Sat Jul 30, 2011 7:41 pm
by asb » Thu Jun 14, 2012 2:03 pm
jamesh wrote:Linux - lack of staandardisation....?

Hi Liam,

not sure why you think there is a lack here. In general, all the basic (and not so basic) commands are the same across all Linux systems. There are some differences with regard to package management (app installation to the phone generation!), but mostly all pretty similar. A generic Linux for Dummies style book should cover most eventualities - there are some PDF files for learning Ubuntu Linux which would be the same as the Raspi for all command line stuff (ignore the desktop as they are different).

James


Perhaps not for those who are completely new to computing, the I think the Debian Reference is pretty good (preinstalled on the new wheezy image) http://www.debian.org/doc/manuals/debian-reference/

Alex
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 799
Joined: Fri Sep 16, 2011 7:16 pm
by bredman » Thu Jun 14, 2012 2:12 pm
Video_Liam wrote:its overall lack of stanadarisation is a let down.


There are very few differences between the distributions.

It is common that something appears in a tutorial that doesn't exactly match your computer. This happens all the time with every computer. For example if somebody writes a tutorial for Windows XP and you try to run it on a Windows Vista computer, you would not be surprised if things looked a bit different, but you would struggle on.
Posts: 1413
Joined: Tue Jan 17, 2012 2:38 pm
by JonB » Fri Jun 15, 2012 9:06 am
Hmm. "./hello_video.bin test.h264" didn't do anything but hang.

Am I missing something here? It compiled without incident.
Posts: 218
Joined: Tue Nov 29, 2011 9:26 pm
by dom » Fri Jun 15, 2012 9:23 am
Have you switched to 224M memory split?
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4034
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by rurwin » Fri Jun 15, 2012 11:17 am
It didn't work for me either. My memory split is as per the distro, whatever that is.

Can someone confirm that test.h264 is a file that should work?
User avatar
Forum Moderator
Forum Moderator
Posts: 2913
Joined: Mon Jan 09, 2012 3:16 pm
by bredman » Fri Jun 15, 2012 12:09 pm
rurwin wrote:Can someone confirm that test.h264 is a file that should work?

It worked perfectly for me on a stock Debian install.
Posts: 1413
Joined: Tue Jan 17, 2012 2:38 pm
by JonB » Sat Jun 16, 2012 8:17 pm
dom wrote:Have you switched to 224M memory split?


Yep, fist thing I did. Is lack of memory killing the GPU then?
Posts: 218
Joined: Tue Nov 29, 2011 9:26 pm
by dom » Sat Jun 16, 2012 8:43 pm
JonB wrote:Yep, fist thing I did. Is lack of memory killing the GPU then?


Yes, no 3D and no video with 224M split.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4034
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by ghans » Sat Jun 16, 2012 9:13 pm
@Video_Liam

To compile one source file
use
Code: Select all
gcc -Wall source.c -o executable_name


To search for packages under debian use

Code: Select all
apt-cache search appname


Aptitude and synaptic provide easier package management.

Perhaps your should post your error messages...

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4554
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany