Englisch

Not that sort of Java

Raspberry Pi -

Back when we moved into our offices, I tweeted about the fact that we were all feeling itchy, snappish and antsy (like some dwarves who didn’t make the Snow White cut), because we weren’t able to make proper coffee in the office. Things were so bad, we had resorted to instant.

We didn’t get around to getting a machine – we’ve been kind of busy. Instead, we were spending far too much money at the nice Italian cafe across the road. And then, to our great surprise, a lovely, shiny bean-to-cup espresso machine arrived on the doorstep. It was a gift from an American company called Zipwhip, who are in the cloud texting business. Better still (and yes, we were surprised to discover that there is something better than a free coffee machine), they’d hooked it up to a Pi and a homegrown circuit board they’re calling Textspresso, which turned it into a connected cloud texting device. The Zipwhip folk sent us instructions on setting it up so we could send a text message to a phone associated with the machine when we were on our way into the office in the morning, and it’d grind some beans and make a coffee just in time for our arrival. Cloud texting, you see. It’s the caffeinated wave of the future.

And they sent us this rather brilliant video.

Here’s the machine (it’s the same one from the video) in situ at Raspberry Towers – picture taken this morning. Note the glamorous view we have of the car park.

It sees a lot of use, and yes, we really do keep it that clean. (Gordon is not allowed to leave in the evenings until he has done some judicious sponging.)

We’ve been using Rob B’s phone to control the machine: it’s him we send texts to when we want a coffee, and the message is forwarded via the cloud to the Pi in the machine. The Pi then texts the person who’s ordered the coffee to let them know when their drink is ready. (Thanks to the cloud, it can text us even though it’s not a mobile phone.) This works brilliantly, but we have found that if any of Rob’s friends sends him a text with the string “coffee” in there (“Hey Rob! Fancy meeting up for a coffee later?”) the coffee machine springs into action, and is prone to widdling all over the floor if we’ve forgotten to stick a mug under the outlet. Friends of Rob: a plea. Use email if you want to invite him out.

Zipwhip have made exhaustive instructions for adapting your own coffee machine available, so you can get coffee on your own carpet. (Seriously. We really need to get more regimented about leaving mugs under the thing, guys.)

Thank you so much, Team Zipwhip. We’re overwhelmed by your generosity, and you read us just right: coffee is an instantaneous and powerful way into our hearts. We raise our mugs to you.

Speaking of mugs, you can buy them in the Swag Shop. Go on. You know you want to.

Raspberry Jam, Lilongwe, Malawi

Raspberry Pi -

We’re seeing Raspberry Jams pop up all over the world these days: Eben and I spent three days at the Jam in Tokyo last month (pictures and presentations from that will be coming soon), and an afternoon at the Silicon Valley Jam the week before that. We see video from a lot of these events, but this video, sent to me by John Cass from Young Innovators in Lilongwe, Malawi, is my favourite so far. It was recorded by a Malawi TV station, and ended up on national network TV. There were nearly 100 attendees, a whole lot of Scratch games programming, some brewing, an electric motorbike being tracked by GPS, music-making, and much more.

John and the Young Innovators team have been loaning Pis to interested people in Malawi, as well as donating them to schools and kids’ groups. A number of Pi-based projects are being developed by those people for the next Lilongwe Jam in September. He tells me that there’s a remote lock for a warehouse in the works, along with the development of an IT course for a refugee center, and an application for managing patients at a local clinic.

Young Innovators Malawi do some wonderful stuff; they are a non-profit, volunteer group running events and competitions to inspire young people all over Malawi to get involved with innovation and technology. If you’d like to support them, please visit their website, and consider making a donation. Your donations go towards funding Raspberry Pi kits, bundled with learning materials, which are given to kids and schools.

Wireless Pi

element14 Raspberry Pi Blog -

Just thought I would share this with anyone interested. It's just one small step towards my fuel cell powered UAV.

 

Main points in this post are:

  • Completely wireless pi running with a 4.3" screen
  • Max voltage anywhere is 5v (improvement over Ben Hecks awesome games console)

 

See attached photos!

 

How did I do it?

  1. Bought a cheap 4.3" TFT screen here
  2. Took it out of the external case
  3. Desoldered V+ cable and resoldered it downwind of the 5v regulator
  4. Desoldered the Pi's composite jack (to save size & weight)
  5. Soldered the composite line from the screen to the Pi
  6. Soldered the power & ground wires from the screen to TP1 & TP2
  7. Made an I2C breakout board and plugged it into the GPIO header
    1. I2C is what I primarilly use for all my projects
  8. Put it all in a box with some token cooling holes
  9. Stuck on a 10Ah battery pack here
  10. Plugged in a wifi dongle
  11. Plugged in a wireless keboard here
  12. Power up and struggle to read the screen until you run this setup code:
    1. sudo dpkg-reconfigure console-setup
      1. UTF-8
      2. Guess optimal character set
      3. VGA
      4. 16x28 (framebuffer only)

Done!

 

In the box I still get good wifi and keyboard signal. Only problem is the screen isn't hi-def but it is certainly good enough for reading text (eg on the console).

 

I have put an I2C temperature sensor in the box, this is my main concern as there is some high power stuff going on in there, but so far no issues.

 

Any questions, queries or comments, please do fire away!

 

Si

Facial recognition: OpenCV on the camera board

Raspberry Pi -

I’ve been talking to Pierre Raufast for a little while now about his efforts to get OpenCV ported smoothly to the Raspberry Pi camera board (which is available from the usual suspects: head to the links under “Buy a Pi” at the top right). OpenCV is an open-source library for real-time image processing, and is used in applications like gesture mapping, motion tracking – and facial recognition.

You might recognise Pierre’s name from a project we featured here back in April. The Magic Mirror recognises people looking into it, and talks to them accordingly. Back then he was using a webcam; now he’s got his hands on a camera board. The Raspberry Pi camera board is a better fit for the device, with a much higher framerate and better resolution.

In most webcams, OpenCV works natively. But because the Pi camera board isn’t a USB device, some work needed to be done to get it up and running. Pierre has done a bang-up job, and has made a seven-part tutorial available to get you up to speed. When you’re done, you’ll be able to see results like this:

Thanks Pierre – we can’t wait to see what you do next!

Onion Pi: Foil the NSA and Prism with a Tor proxy

Raspberry Pi -

Some housekeeping first. As you can see, I’m upright and typing again. Turned out that I had a really unusually nasty dose of ‘flu. It started as what I thought was a bad cold, but kept getting worse, until it got to a point when I couldn’t get my head off the pillow and thought I was dying. Then it got even worse, and I started wishing I was dying.

I’m much improved, but still a little wobbly. Doing anything (walking up the stairs, watering the garden) still leaves me feeling like I’ve just run a marathon, so I’ll be taking things slowly for a few days. On that note, if you want to email me this week, it’d be great if you could wait until next week if your mail isn’t blindingly urgent: I’ve got a backlog of hundreds and hundreds of mails to work through at the moment because I haven’t been able to check them while I’ve been off, and it’s going to take me a while to get through them all.

I’ll be working on a post about what we got up to with the amazing Pi community in Japan for later in the week, but for now, here’s something topical.

Our good friends at Adafruit have been working on a Tor proxy box based around a Pi, which directs your internet traffic through the Tor routing service. Every network packet you send is encrypted and decrypted multiple times, and each time this happens the packet is sent through a number of relays (like onion skins: Tor stands for The Onion Router), picked at random from the thousands that make up the Tor network, before reaching its intended destination. This makes it very hard for anyone to analyse your data to find out who you are, or where you are.

Tor routing is for anyone interested in confidentiality, internet freedom and privacy. It’s of enormous use for those who need to work on confidential business, or for those in places where internet traffic is monitored by governments or other bodies. It’s used to search for forbidden material like birth control, dissenting political voices or religious debate in places where a country is behind a firewall and traffic is strictly controlled (there are many users in mainland China); in the western world it’s used by many to protect personal data from marketers, and by those who worry their data is being snooped on. Activists and whistleblowers, for whom anonymity is important, use Tor. A healthy paranoia about your internet traffic is a good thing: just because you’ve got nothing to hide doesn’t mean that you’ve got nothing to fear. I would hate to be labelled a terrorist just because I express an interest in pressure cookers and book a lot of aeroplane tickets.

You can, of course, run a Tor proxy on any machine, but the particularly nice thing about Adafruit’s Onion Pi is its portability. This means that you’re not restricted to using it in one place; you can set it up in front of the router (it behaves as a WiFi hotspot) in the office you’re working from, in your hotel room or at your Mum’s house, connect to it from your phone or computer, and your IP address will be anonymised.

Be aware that using Tor will slow your browsing down (the packets of data are travelling by a longer and less direct route than you’re used to), and that it’s not a total guarantee of anonymity.

Adafruit have made a very easy to follow tutorial on making your own Onion Pi. You may well have all the parts you need (the only piece of kit I don’t already have kicking around the house is a WiFi adapter) at home; if you don’t, you can buy a box with everything you’ll need in it from them. A portion of every sale goes to the Tor Foundation.

Raspbmc’s jam-packed June jollifications!

Raspbmc -

This one’s a big update and brings a lot of features to Raspbmc. Here’s what’s new this month:

  • Tweaks to the initialisation system speed up booting and remove some initial UI lag that occurs just after startup
  • There are some performance and stability enhancements, particularly when playing high bitrate content.
  • Updated firmware and kernel
  • Fix for TP-Link WN725N V2 devices
  • Fix Live TV stopping when selecting another channel
  • Fix for Live TV aspect ratio issues resulting in black screen
  • Backport of delegation of discontinuity in streams to GPU rather than OMXPlayer (resolves some streaming issues), thanks to popcornmix for the original fix!
  • Now available via Raspbmc Settings:
    • Boblight support provides an ambilight like implementation. Take a look at this user’s setup here
    • Raspberry Pi camera addon support allowing surveillance. This is useful for watching a bird feed or your kids. Images are taken at a desired interval and uploaded to /home/pi/camera.
    • Ability to scan for WiFi hotspots instead of having to type the SSID in.
  • Users now warned if power supply is detected to be inadequate
  • Simultaneous audio output (HDMI and Analog) is now supported
  • A new XBMC skin, made for Raspbmc by A Future Pilot and fuzzword. Many thanks to the wonderful contribution that these two have made. You can swap back to the default skin at any time via System -> Settings.
  • libCEC is updated for improved compatibility with TV sets.
  • 24 hour nightly builds of XBMC 13.x are now available again
  • Enable IPV6 connectivity for SSH
  • /tmp and /var/log no longer stored in ZRAM tmpfs
  • Support for NOOBS 1.2
  • Support for Stealth Nighthawk F117A
  • Another two mirrors have joined the Content Delivery Network which means faster updates and installs. The project is very weak for downloads in Asia and would very much appreciate a mirror to help offer users a good quality update and installation experience there.

To get the update, simply reboot your Raspberry Pi. Note that if you have disabled updates via Raspbmc Settings, you’ll need to enable them first, and if you’re running a nightly build, you’ll need to switch to ‘xbmc release’ in Raspbmc Settings to get back to the stable builds we ship as default.

Coming in July:

  • Linux kernel updates
  • Raspbmc ‘Cloud’ which will allow:
    • Backing up and restoring your settings from the cloud automatically when re-installing
    • The ability to copy settings from other Pis on the network.
  • The usual set of improvements, bug fixes
  • A special announcement

If you enjoy Raspbmc, and this update, and would like to support continued development, you can make a donation here.

Have fun!

Raspbmc hardware announcement

Raspbmc -

Today I am pleased to announce that I will be collaborating on the development of the Stealth Nighthawk F117A. This device is based on the same chip as the Raspberry Pi, the BCM2835, and thus is perfectly suited for running Raspbmc.

 

One may wonder why there is any point in producing hardware with identical innards, however, there are a few unique advantages. The device is self-housed, is cheaper than a Raspberry Pi when all components are purchased and is aimed for a consumer market.

The Dutch manufacturer Anaar are happy to announce a $59.99 pre-order price guarantee for the first 250 units, which gets you:

  • The device itself
  • An SD card with a customised version of Raspbmc installed
  • They’d love it if you could vote for them in the Accenture Innovation Awards 2013 here. And if you’d like to fund the project or pre-order a unit, you can do so here

Rpi development box

element14 Raspberry Pi Blog -

Hi everyone, this is my Raspberry pi development box that I pleced together to do all my Rpi projects.

The box is a standard 5 to 24 division utility box that you can get a any home depo for 7 bucks.

 

 

Put the holes for the Rpi and install the Rpi inside with some minos circuitry for GPIO connections and a fan(Very important) to cool everithing down and you have the perfect chassy for a project box.

 

FNGPIO#PIN#GPIO#FNSDAGPIO21718GPIO14TXDSCLGPIO31516GPIO15RXDGPCLK0GPIO41314GPIO17 CE0GPIO71112GPIO18PCM_CLKCE1GPIO8910GPIO22 MISOGPIO978GPIO23 MOSIGPIO1056GPIO24 SCLKGPIO1134GPIO25 GND12GPIO27PCM_DOUT

 

Place a protoboard and pocket size multimeter and Bamm, there is a development box for all your needs.

 

 

Good thing the Rpi is powered by 5v so you can install a battery pack and presto Rpi instapower.

I allready installed Adafruit weeze that works the best.

 

Next are the pheripherals, I have yet to get a wifi for the Rpi but I just got a new wireless keyboard with mouse pad wich is very cool and very small, now I have to get used to it.

 

 

 

Next up Ill get the mini wireless for the usb, I allready have a 4 port usb hub for flash memories.

University of Glasgow Create Raspberry Pi Cloud

element14 Raspberry Pi Blog -

Lego and Raspberry Pi have come together again. First there was the University of Southampton and now this fantastic project by the University of Glasgow's School of Computing Science. Using 56 Raspberry Pi boards, their team have managed to create an affordable, working cloud computing infrastructure which is available to researchers and students of the faculty.

 

They have documented their adventures on a blog which contains images of the various incarnations of their project through to the current stage. http://raspberrypicloud.wordpress.com/blog/

 

Playing Videos On the Raspberry Pi Command Line

Raspberry Pi Spy -

If you need to play video files and you don’t want to install a full media solution such as XBMC then you can play them directly from the command line using Omxplayer. This is a media player created by Edgar Hucek specifically for the Raspberry Pi and it takes advantage of the Pi’s GPU.

Installation

Omxplayer is installed on the latest Raspbian image so you may already have it installed. If not you can install it using :

sudo apt-get update sudo apt-get -y install omxplayer

Basic Usage

To play a video file you just need to type :

omxplayer myvideo.mp4

If you are using HDMI you should use this command to pass audio over the HDMI interface :

omxplayer -o hdmi myvideo.mp4

Other Command Line Options

If you type :

omxplayer

you will be presented with a list of the available command line options :

Usage: omxplayer [OPTIONS] [FILE] Options : -h / --help print this help -n / --aidx index audio stream index : e.g. 1 -o / --adev device audio out device : e.g. hdmi/local -i / --info dump stream format and exit -s / --stats pts and buffer stats -p / --passthrough audio passthrough -d / --deinterlace deinterlacing -w / --hw hw audio decoding -3 / --3d mode switch tv into 3d mode (e.g. SBS/TB) -y / --hdmiclocksync adjust display refresh rate to match video (default) -z / --nohdmiclocksync do not adjust display refresh rate to match video -t / --sid index show subtitle with index -r / --refresh adjust framerate/resolution to video -l / --pos start position (in seconds) --boost-on-downmix boost volume when downmixing --subtitles path external subtitles in UTF-8 srt form at --font path subtitle font (default: /usr/share/fonts/truetype/ freefont/FreeSans.ttf) --font-size size font size as thousandths of screen height (default: 55) --align left/center subtitle alignment (default: left) --lines n number of lines to accommodate in the subtitle buffer (default: 3)

Keyboard Shortcuts

Here are the keyboard shortcuts that you can use to control features within the player :

Space or p Pause/Resume q Exit OMXPlayer z Show Info - Decrease Volume + Increase Volume i Previous Chapter o Next Chapter Left Arrow Seek -30 Right Arrow Seek +30 Down Arrow Seek -600 Up Arrow Seek +600 1 Increase Speed 2 Decrease Speed j Previous Audio stream k Next Audio stream n Previous Subtitle stream m Next Subtitle stream s Toggle subtitles d Subtitle delay -250 ms f Subtitle delay +250 ms

Omxplayer is particularly useful if you are creating videos with the Pi camera module and want to playback the files from the command line.

How To Setup A Web Server On Your Raspberry Pi

Raspberry Pi Spy -

This page aims to summarise the steps required to install a webserver with PHP support onto your Raspberry Pi. This will allow the Pi to server HTML and PHP pages to users on the same network. This is a useful mechanism to view images and/or data on the Pi from another device, whether that is a PC, laptop, tablet or mobile phone.

Note : Before experimenting with network enabled features you should really make sure you have changed your Pi password from the “raspberry” default.

Step 1 – Install Lighttpd

Lighttpd is a lightweight web server application that works well on the Pi. It can be installed using the following command :

sudo apt-get -y install lighttpd Step 2 – Install PHP

Next we need to install PHP. The order in which php5-common, php5-cgi and php5 are installed is important so don’t change their ordering in the line below :

sudo apt-get -y install php5-common php5-cgi php5

Then enable the Fastcgi module which will handle the PHP pages :

sudo lighty-enable-mod fastcgi-php

Once these packages are installed we can restart the Lighttpd service to pick up the changes :

sudo service lighttpd force-reload Step 3 – Testing

In order to test your new webserver you need to know the IP address your Pi has on your network. To do this run this command :

sudo ip addr show

You will see a block of information similar to this :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000     link/ether b1:11:ab:42:24:2c brd ff:ff:ff:ff:ff:ff     inet 192.168.0.45/24 brd 192.168.0.255 scope global eth0

The IP address in this example is 192.168.0.45. Take this IP address and enter it into the address bar of a web browser on another device.

If everything has worked you should see the default Lighttpd “Placeholder” web page. It’s not very exciting but it is easy to replace with your own page.

Step 4 – Tweak Permissions

Now we will adjust some permissions to ensure the “Pi” user account can write files to the location where Lighttpd expects to find web pages. The /var/www directory is currently owned by the “root” user. So let’s make the “www-data” user and group the owner of the /var/www directory.

sudo chown www-data:www-data /var/www

Now we will allow the “www-data” group permission to write to this directory.

sudo chmod 775 /var/www

Finally we can add the “Pi” user to the “www-data” group.

sudo usermod -a -G www-data pi

For these permissions to take effect it is best to reboot your Pi at this point using :

sudo reboot Step 5 – Replace the placeholder page

Let’s browse to the /var/www directory and rename this default page :

cd /var/www mv index.lighttpd.html index.lighttpd.hxxx

Now we can replace it with a new php page :

sudo wget http://www.raspberrypi-spy.co.uk/archive/misc/lighttpd_test.php.txt -O /var/www/index.php

The command above grabs a text file from this website, renames it as “index.php” and saves it to the /var/www directory. If you want to look at the test page first click here.

Note : The ‘-O’ in the command is a capital letter O (O for Orange) not a zero or lowercase o.

Refresh your browser and you should see the new page. If PHP is working OK you will see a summary of your PHP configuration.

You are now ready to populate /var/www with HTML, CSS, JS, PHP and image files just as you would for a normal website. These files could be created by your own programs which gives your projects and experiments a way to publish their data to other devices.

This is yet another great way for other devices to interact with your Pi.

If you want your Pi web server to be available on the internet (i.e. beyond your own network) you will need to follow some additional steps. I’m not covering them here but they usually involve “port forwarding” on your router to enable pages to be requested from your Pi by an external visitor.

Optional Steps

By default web servers communicate over port 80. If you want to change the port number that Lighttpd uses you can easily change it by editing the lighttpd.conf file :

sudo nano /etc/lighttpd/lighttpd.conf

then change the “server port” line to define your chosen port number  :

server.port  = 40045

Exit nano using CTRL-X followed by Y. To restart the server and get it to pick up this change use :

sudo /etc/init.d/lighttpd restart

You can now access your web server on another device on your network using :

192.168.0.45:40045 Recommended Book

If you fancy reading a lot more about Lighttpd in a printed book then take a look at “Lighttpd” by Andre Bogus. This is also available as a Kindle edition as well if you prefer your reference material e-book style.

Review: XBMC Solution

element14 Raspberry Pi Blog -

This Thursday I was asked by Element14 to test and review their new XBMC Solution and here it is!

 

The XBMC Solution is a kit that is designed to go with the Raspberry Pi to have a quick media center out of the box solution, it includes the following:

 

  • 4GB Class 4 SD card with Raspbmc already on it.
  • An Enthernet / Network Cable
  • A HDMI Cable
  • And an awesome wireless keyboard with built in touchpad!
  • Instructions on how to set it up.

You will also require:

  • Raspberry Pi Model B (I used a Rev 1 256MB, while it works fine sometimes it can take time to load some parts)
  • Power Supply (I'm powering it off of my TV).


I plugged it into our main TV using the HDMI and Enthernet cables provided, I am running the power via the TVs built in USB port (As the TV is a "Smart TV", this will be my comparison.)

 

The first boot takes a while as Raspbmc will update, I think it took around 10 Mins to fully update then it loaded!

 

The system has two configuration tools, one being the Raspbmc configurator that allowed me to bump up the overclock a little and the other being the XBMC setup.

I setup the time and turned on the HTTP / Web Server (Allowing me to control it via my phone).

 

Next I installed the youtube addon via the Addon section in videos. After installing I was able to play youtube videos! (The picture below is me playing my Raspberry Pi Bigtrak Jr Video via the Youtube Plugin).

 

The quality ran in 720p and can even run some videos in 1080p if configured to use it. You can also set it so it can only play up to 720P or Standard for if you have slower internet or a lower resolution TV.

 

And that is pretty much it, its a great kit and is just plug and play with little configuration needed. I did find quite a few benefits:

 

  • From where the remote is a full QWERTY keyboard it makes it quick and easy to search youtube compared to my TV which requires me to type it in slowly a char at a time.
  • Not all youtube videos are fully available via the TV's youtube app. This is from where youtube allows publishers to disable it (Mainly music videos). Raspbmc is therotetically a media center program for a computer allowing it to play most youtube videos.
  • Lots of applications and adddons can be installed.

Currently I am watching my favorite chiptune videos and demos via the Youtube app. I can even use my phone as the remote!

Thanks to Element 14 / Farnell / CPC/ Newark to let me review it! Also check out http://raspbmc.com the site of Raspbmc by Sam Nazarko!

 

Also check out my website @ http://blog.ryanteck.org.uk


 


Liz is poorly

Raspberry Pi -

Liz has spent most of this week suffering from an affliction picked up in Tokyo. We’re assuming this is flu, as even the worst sake hangover doesn’t usually last this long. I’ve sent her to bed to rest up; normal service will be resumed when she’s feeling better, hopefully early next week.

RadioBlocks: drop-in IEEE 802.15.4 wireless module for Raspberry Pi

element14 Raspberry Pi Blog -

I attended the Sensors Expo in Chicago this afternoon.  One of the interesting devices I came across was RadioBlocks from Colorado Microdevices:

The Colorado Micro Devices RadioBlock is an IEEE 802.15.4 FCC and CE certified wireless modem. It has a simple UART interface to make it easy to drop into your end product or to experiment with. A standard 100 mil pin spaced header means you can plug it right into many common boards: Arduino, Raspberry Pi, BeagleBone, it’s easy – No special pin configuration or adapter board needed!

 

It happens to slide perfectly onto the Raspberry Pi's UART pins:

Here's the close up of the front and back, it has an Atmel 802.15.4 radio chip and a NXP Cortex M0 microcontroller and is powered by coincell:

The "remote" RadioBlock in this setup is embedded inside a door lock to allow one to lock or unlock via an interface on the Raspberry Pi:

Colorado Microdevices is competing in the IPSO Alliance Internet of Things challenge

It also fit on the Arduino nicely too:

 

Finally, here's my complete photo gallery of the Sensor Expo:

https://plus.google.com/photos/117542001281850354871/albums/5886230550072937633

 

Cheers,

Drew

http://twitter.com/pdp7

Raspberry Pi Command Line Audio

Raspberry Pi Spy -

Things have moved on a bit with the Raspbian image since I wrote my Raspberry Pi Speakers & Analog Sound Test post. So I decided to take another look as I wanted to start adding some audio to my experiments. I’m making slow progress with my remote controlled car project but I figured I might as well shoe-horn some audio in there as well.

One thing that has changed in the latest Raspian image is that the alsa sound drivers have improved and are enabled by default. So I decided to hook up a rechargeable powered speaker I had using a short 3.5mm jack plug lead and see if I could play some WAV and MP3 files.

The first thing to do is run :

lsmod | grep snd_bcm2835

and check snd_bcm2835 is listed. If it isn’t then run the following command :

sudo modprobe snd_bcm2835

If the module isn’t loaded automatically when you boot then you can force it to load by using the following process :

cd /etc sudo nano modules

Then add ‘snd-bcm2835′ so it looks like this :

# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be # loaded at boot time, one per line. Lines beginning with "#" are # ignored. Parameters can be specified after the module name. snd-bcm2835

By default the output is set to automatically select the default audio interface (HDMI if available otherwise analog). You can force it to use a specific interface using :

amixer cset numid=3 n

Where <n> is the required interface : 0=auto, 1=analog, 2=hdmi. To force the Raspberry Pi to use the analog output :

amixer cset numid=3 1

I usually have to do this if I boot the Pi with an HDMI cable plugged in. Otherwise it defaults to the 3.5mm jack automatically.

Playing A WAV File Using aplay

Everything should be ready to test some sound files. First up WAV. Use the following commands to grab some WAV files from my sound archive :

wget http://www.freespecialeffects.co.uk/soundfx/sirens/police_s.wav wget http://www.freespecialeffects.co.uk/soundfx/computers/bleep_01.wav

To play it use :

aplay police_s.wav

If you are lucky the sound will play through your speakers or headphones.

Playing An MP3 Using MPG321

There are numerous ways to play MP3s from the command line but I tend to use MPG321. This can be installed using :

sudo apt-get -y install mpg321

Once installed we can grab an MP3 to experiment with :

wget http://www.freespecialeffects.co.uk/soundfx/household/bubbling_water_1.mp3

The MP3 file can be played using :

mpg321 bubbling_water_1.mp3

The volume can be adjusted using the ‘g’ command line option. In the example below I set the volume to 50% :

mpg321 -g 50 bubbling_water_1.mp3 Playing An MP3 Using Omxplayer

You can also use the excellent Omxplayer to play MP3s. To get a list of options type :

omxplayer

It is installed by default in the latest Raspbian release but if you need to install it manually you can do so using :

sudo apt-get -y install omxplayer

To play a sound file you simply need to type :

omxplayer bubbling_water_1.mp3

The plus (+) and minus (-) keys can be used to adjust the volume of the playback.

This post covers basic audio playing from the command line. If you want to start playing lists of music then you should explore some of the more advanced media software available for the Pi. This includes XBMC and OpenElec.

In a future post I will cover playing audio within Python scripts using Pygame.

Here are some photos showing the rechargeable powered speaker I use for my Raspberry Pi command line audio tests :

BBC Springwatch – and a Pi

Raspberry Pi -

It’s 7.35pm here, and if you’re reading this now in the UK, put down the computer and turn to BBC2 – apparently, a Pi will be featuring on Springwatch this evening (it started about five minutes ago).

See this link for more, and enjoy the show! If we’re able to, we’ll try to embed some video later.

Guest post: A Pi lab in rural Ghana

Raspberry Pi -

Liz: This post comes from Heather and Trevor Grant, who work with a student-led charity called The Best of Both, based at the British School of Brussels. Thanks both! 

For the past five years The Best of Both initiative has worked with state-sector rural schools around Bolgatanga in the Upper East of Ghana to help improve access to water, food – through school gardens – and educational resources (books and access to ICT).  Last year, computer labs based on NComputing technology were installed at two schools. This year a Raspberry Pi solution has been installed at Dachio Primary and JHS Schools.

Three weeks ago the intended computer room looked like this:

After meeting with the headmasters, parents association and Regional Assembly representatives, the room was rapidly transformed with electricity being installed, walls plastered and painted, and desks and chairs promised for the computer lab.  Before the new computer desks arrived the teachers gave up their desks so that an initial installation of the system could take place.

6 Raspberry Pi’s have been installed and networked via a switch to a wireless router.  One of the Raspberry Pi’s is a dedicated RACHEL educational server. [Liz: you can learn more about RACHEL, World Possible's Remote Area Community Hotspots for Education and Learning, here. World Possible are using Pis as servers for materials like textbooks, Khan Academy videos, health guides, world literature e-books, encyclopaedias and much more - we've been very excited to learn about what they're doing.]

The initial feedback from both teachers and pupils on the RACHEL material has been great. They can see that they have access (on the Raspberry Pis, on Android tablets and even on the headmaster’s smart phone!) to a huge amount of content without having to rely on poor and expensive internet connectivity. Also attached to the switch is a Windows 7 desktop which will be used eventually as a gateway to 3G internet access as performance improves. The Raspberry Pi clients are using DVI monitors purchased in Accra together with HDMI to DVI cables, keyboards and mice.  The monitors were not easy to find and further additions will probably be based on HDMI to VGA converters so that locally sourced cheap screens can be used.

All the Cat5 cable crimping, keyboard configuration and user security set-up was done by Genesis Abaa, a young guy from Bolgatanga who spent every Sunday with me learning together about Raspberry Pis.  Genesis is now looking for more projects where he can help install Raspberry Pis, RACHEL servers, and network with the Raspberry Pi community.

The new ICT lab is all about access in a practical way that will work at this rural state school. Children can experience use of the computers whilst others watch until it is their turn. Parental support to help fund ongoing maintenance (electricity, light bulbs etc) is important and being able to get a group of parents in the room is important.

The parents were amazed at the handover ceremony when they were shown the Raspberry Pi.

A RACHEL Pi  server has also been installed at the Bolgatanga Ghana Education Service so that other teachers can see what is possible and make use of RACHEL as a resource.  A further RACHEL Pi server has been installed at TRAX, a local NGO that provides local support to the British School of Brussels. Trax is focused on rural community development, and it will be interesting to see how the healthcare material included with RACHEL can be used.

Thanks to Norberto Mujica and Jeremy Schwartz for their help with RACHEL.  Thanks to the Raspberry Pi Forum.  Through this amazing support resource I made contact with Luis Jose Marmisa Gazo.  Without the help and guidance from Luis we would probably have never found a way to get the Raspberry Pis onto the internet in Ghana using an XP laptop and 3g dongle.  Thanks to Geert Maertens for sharing the learning from his team working with St Marcellin Comprehensive College in the Cameroon.  Thanks to our friend Ben Laryea who showed us most of the ICT shops in Accra as we went in search of monitors.  Thanks to Genesis Abaa for his help in setting up the system – building local capability to install, support and train is even more important than the physical provision of the computers.  Thanks to Vincent Subbey from TRAX for allowing us to turn part of his house into a test lab before we installed at the school. Thanks to Nick Lavender and the students and staff from the British School of Brussels for their support throughout the project.

Astrophotography with the camera board

Raspberry Pi -

Cristos Vasilas from from Dash One, a lover of astronomy and electronics, has been trying out the Raspberry Pi camera board as an astrophotography tool. He’s captured some amazingly sharp, short video of the moon, and of Saturn, rings clearly visible, swinging across the sky.

Cristos used foam packing material to attach the camera board to the eyepiece of his telescope, and mounted the Pi on the barrel of the telescope with velcro.

He says: “A dedicated Celestron 5M pixel imager costs $200, and I doubt it is nearly as versatile as the rPi.” Since filming the images above, Cristos has also discovered that a group of telescope enthusiasts have released code enabling the Pi to drive Stellarium, the planetarium software that tells the telescope where to point, so he can also lose the laptop from the kit needed to take photos like this in the future. If you haven’t played with Stellarium yet, you really should; several of us here at the Foundation are big fans and use it regularly – you don’t need a telescope to enjoy it.

Cristos says he has more work to do on exposure, gain, contrast and so on, and we hope he’ll be posting the results on his blog.

We’ve found that there’s enormous potential in bringing down the cost of amateur photography – of all kinds – as a hobby with the Pi, whether or not you’re using the camera board. Check out these earlier posts if you’re interested in finding out more.

Introducing the New Out Of Box Software (NOOBS)

Raspberry Pi -

If you’re a beginner with a Raspberry Pi, things just got a whole lot easier.

We started this project with the premise that throwing people in at the deep end and making them jump hurdles, to mix my sporting metaphors, is a good way to get them to learn stuff. It is: but it can also put some people off, sometimes terminally. And we don’t want people to put their Raspberry Pi down in horror after five minutes. So with this in mind, we’d like to introduce you to NOOBS.

NOOBS is a way to make setting up a Raspberry Pi for the first time much, much easier. You won’t need network access, and you won’t need to download any special imaging software. Just head to the downloads page, grab a copy of the NOOBS zip file, and unpack it onto a freshly formatted 4GB (or larger) SD card. When you boot up for the first time, you’ll see a menu prompting you to install one of several operating systems into the free space on the card. The choice means you can boot the Pi with a regular operating system like Raspbian, or with a media-centre specific OS like RaspBMC.

The main OS selection menu.

Once you’ve installed an operating system, your Pi will boot as normal. However, NOOBS stays resident on your card, so by holding shift down during boot you can return to the recovery interface. This allows you to switch to a different operating system, or overwrite a corrupted card with a fresh install of the current one; it also provides a handy tool to let you edit the config.txt configuration file for the currently installed operating system, and even a web browser so you can visit the forums or Google for pointers if you get stuck.

Editing config.txt.

Viewing the forums in the Arora browser.

Thanks to Rob, Gordon, Dom and Floris (of BerryBoot fame), who together developed NOOBS from scratch in less than a month. Also, thanks to our army of volunteer translators for the localisation; and to the operating system maintainers, most notably Alex, for producing updated images in time for integration into the final zip file.

Our partners will be offering SD cards pre-installed with NOOBS in the near future, but until then please download, have a play, and let us know what you think.

MagPi issue 13: out now, and free to download!

Raspberry Pi -

Team MagPi have wiped their bleary eyes after celebrating their first anniversary issue, and come up with a magazine for June that will have you playing the Archimedes version of Elite on your Pi, writing racing games in Scratch, and making music with Schism. You’ll learn how to solder up a LED matrix, find out about the growing number of expansion boards available for your Pi – and this month, there’s a very special cover feature.

You might remember reading about Amy Mather here a few months ago. She’s thirteen, and she’s a super-articulate, super-smart young coder, who we think is one of the best advocates for computing we’ve come across. You can read an interview with Amy in this month’s magazine, where she talks about what resources are available for parents, about young people and coding, and offers us at the Foundation a few ideas for design changes. They’re good ones, too – and much more practical than some of the suggestions that adult readers make. (You, the chap who wanted us to move all the ports onto one side of the board. I’m looking at you.)

As always, there are plenty of type-in listings for you to get your teeth into, a competition, details on Pi events near you, and much more. As always, we at the Foundation would like to say a HUGE thank you to the MagPi team. They’re all volunteers, they don’t get any help from us, and they produce a free magazine every month that we think shows the very best of the Raspberry Pi community. Thanks, guys – we’re looking forward to next month’s issue!

Seiten

RaspberryCenter.de Aggregator – Englisch abonnieren