On day 2 of Raspberry Pi Camera ownership I decided it was time to make the new RasPiCam into a camcorder that could be taken anywhere and used to shoot video.
Hold on, there’s issues with that aren’t there? Sure there are, but there’s ways round ‘em too So here’s how I did it.
I’ll be taking this to the Cambridge Jam tomorrow.
Ingredients
1 Switching regulator
1 Bluetooth serial adaptor
1 Raspberry Pi with latest updated Raspbian
1 Raspberry Pi Camera
Connectors for battery, reg and Bluetooth adaptor
1 power source (I’m using a lipo battery)
1 Bluetooth-enabled mobile device (Phone, tablet etc.)
1 Bluetooth console app (I’m using BlueTerm for Android)
a case of some sort to put it all in
So here’s the end result including a comparison with a “proper” camcorder costing 10 times as much.
No screen – YET
I don’t have a screen for it yet, but I hope to fix that in the near future.
OK. On with the details…
First hurdle for independence is we need power. 5V can be supplied to the GPIO header, where there are two 5V pins (good – we need both of those) and several GND pins.
Since I want an efficient power conversion, and since I have a stack of lithium polymer (lipo) batteries already, a switching regulator is the best option. I bought a stash of these on ebay back in September 2012. They’re a couple of pounds each (£2/$3). Google LM2596S regulator to find them.
Switching regulators. Completed one on the right
Wires are recycled from an old PC. I have a box full of wires. I used a couple of 2 pin female header connectors to attach the power wires on the regulator outputs…
Pinouts for Bluetooth adaptor and power
I’m using Pin 25 (GND), and Pin 2 (5V).
I set the voltage of the regulator to 5.20 V, which is near the top end of the spec, but gives us a bit of headroom. I’ve connected the regulator inputs to red and black wires and a male Deans type connector. All my lipos have female Deans on. It would be nice if we could fit it in the case too. A bit of heatshrink to insulate it and we’re sorted. (See regulators photo at top)
OK, so we’ve got power. Now hurdle 2…
How are we going to control it?
You could use wifi, but you need a network or a portable hotspot for that. You only really need a command line interface, so a BlueTooth serial adaptor fits the bill perfectly. It just so happens I got one last Saturday and got it working within about half an hour, thanks to an excellent blog article by Miguel Grinberg
Bluetooth serial adaptor in situ soldered to angled female header
It’s nice and small, so I figured it could go in the case. How to connect it though? Remember the leaning header of Pi5A? I had all sorts of header connectors in stock from that, so I picked out a 2×4 female angled header and soldered up the connections. I got it wrong twice, not remembering I needed to cross Tx and Rx and messing up GND and Tx as well, but once I’d got that correct it was OK. The last two pins on the Bluetooth adaptor need to be crossed over, so I had to snip the connector and use a couple of small wires. (See labelled photo above for connections).
I advise you get your Bluetooth adaptor set up and working with jumper wires before soldering things to it.
So we now need an app on our mobile device to be able to log into the Pi via Bluetooth. I’m using BlueTerm. It’s OK, but I can’t yet get it to send a CTRL+C signal, which can be a bit limiting.
Raspberry Pi, RasPiCam and fully updated Raspbian
You need the latest Raspbian on your Pi to be able to use the camera. sudo apt-get update sudo apt-get upgrade y
Then wait until it finishes. Could take a while (maybe nearly an hour if your distro is old). You’ll also need a Raspberry Pi Camera module.
Just in case
I crammed my regulator into my Yoctopuce case. It just fits. I was hoping to fit it in so it wouldn’t cover the main CPU/GPU/RAM, but it wouldn’t fit. So chances are it might get warm with a source of power and a source of heat so close together. The only thing I can do about that is to take it out. If it becomes a problem, I will.
The Bluetooth adaptor fits well. The camera is “white-tacked” to the back. Liz told use to use Blu-Tac, but I disobediently defied because white was all I had
My concept was that it would all fit and the case could stand on end (the USB end) when no wifi dongle is plugged in. To achieve this I did have to press in the two little sticking out “lugs” on the USB hub.
It was tricky getting the case back together with all these bits inside, but somehow, with a liberal sprinkling of cursing and swearing, I got it done. (Sorry, I’m not disassembling it again for the photos ) Here’s what it looks like…
Raspberry Pi camcorder back
Raspberry Pi camcorder front
Plug and Go
So now all I have to do is plug in a battery (anything from 6 to 35V will work with this regulator) connect my phone or tablet using BlueTerm. Login, and start shooting video.
Yesterday I got my shiny new “RasPiCam” Raspberry Pi camera module about half an hour before I had to go out and teach. Being a good boy scout (although I never was one) I was ready for it and had it up and running within five minutes of it coming through the letterbox.
But when I got back from school, I shot some test videos that I wanted to edit and publish. You know how it is. You have to publish something on day 1 or it didn’t happen, right?
I knew there must be an FFMPEG command for it, but couldn’t find it anywhere. I wasted a couple of frustrating hours trying to figure out how to get the raw .h264 stream into an MP4 file that Pinnacle, my editing suite, could handle.
Eventually, Dom Cobley, one of the Broadcom guys who does a lot of work for the Raspberry Pi Foundation gave me most of the solution and Mike “Recantha, PiPod, CamJam” Horne gave me the rest. And it worked – on my Ubuntu laptop. But let’s back up a minute and deal with the commands to shoot (record) the video first.
To shoot video with the Raspberry Pi Camera
From the command line, type… raspivid -o filename.h264 -t 20000
…where filename is a file name of your choice.
This will store the output .h264 stream in a file called “filename.h264″ and will stop recording after 20000 milliseconds (20s). (It defaults to 1080p @ 30 frames per second).
There are a couple of other useful little options you might want to know about. By default, the image is flipped vertically, meaning you see a mirror image of what you filmed.
Depending on which way round you hold the camera, you might want to flip it either horizontally, vertically or both. You can do that by adding -vf and/or -hf to the command, like this…
How to view your Raspberry Pi Camera output on the Pi
If you booted the Pi with a screen attached, you can quickly check which way round your video is by watching it with omxplayer (you can also see it while you’re shooting). Film something with text on and you’ll see straight away if it needs flipping or not. The command is simply…
omxplayer filename.h264
Then you’ll see if you need -vf (probably) and/or -hf (depends on which way up your camera is).
That still leaves you with a raw .h264 stream file. Pinnacle and other video editing software can’t open these files. You need to perform a bit of black magic first.
How to convert your Raspberry Pi Camera output to MP4 or MKV
This is easy when you know how. It can be done on the Pi, but my FFMPEG install is a bit “custom” after installing Get-iplayer, so I use my Ubuntu Lucid laptop for this part. The command is the same though. We’re just putting a MP4 “wrapper” around the .h264 stream.
…where video_in and video_out are your chosen file names. If you wanted mkv instead of mp4, just use mkv instead of mp4.
So that’s it in a nutshell. It helped me to make this video and get it posted on Day 1, so it very definitely DID happen.
Extra Tricks by Bill Tidey
Bill posted these tips in the Pi forums and they were too good not to share… ffmpeg -f lavfi -i aevalsrc=0 -r 30 -i test.h264 -shortest -c:v copy -c:a aac -strict experimental testo.mp4
…adds a silent audio channel as some video editors don’t work without this.
ffmpeg -i test.mp3 -r 30 -i test.h264 -shortest -c:v copy -c:a aac -strict experimental testo.mp4
…adds a real audio track where the test.mp3 should normally be longer than the video as the output is the shortest.
I arose with the larks on 29th February 2012 to participate in the great global DDOS of RS and Farnell’s websites (whilst attempting to order a Raspberry Pi or two). It was with great delight on May 15th that I received my first Raspberry Pi from RS, a week or two after the first lucky 10,000 got theirs after the ethernet port refit.
early production Raspberry Pi Model B from RS (12 13 pcb)
I had everything ready, including an SD card with the early version of Debian Squeeze on. I’d had months to get it all ready. I connected it all up, using my Galaxy S2 charger as power supply. What can I say? It just worked. The GUI was a bit slow, but it worked.
What next?
It’s been an interesting year, full of adventure, discovery and lots of fun. Boy have I learnt a lot as well. I’ve also met some really nice people and made new friends.
I’d been a bit bored of my previous business for some time. After 29th Feb, it was totally obvious to anyone, who wasn’t dead, that the Raspberry Pi was going to be enormous. I felt that as a part-time ICT teacher of 10-year-olds, I needed to be a part of it. It felt, to me, a lot like the internet all over again – a “Wild West” level playing field for all.
The RasPi.TV domain was available and it seemed that it would be a fun idea to to try and become “the Raspberry Pi TV station” and publish some video content. As I found out in class, many people these days want to be shown how to do things rather than reading instructions. Video is perfect for that. Being a writer and having macro photography as a hobby, blogging and stills photography were areas where I had much more experience. Here’s one of my butterfly shots…
Marbled White feeding – one of my butterfly shots – click to enlarge
But I had shot and cut some videos in the past to share with my online model flying buddies, so it wasn’t a completely scary prospect. (Easystar beach aerial video download link) [I'd like to do some aerial video with a PiCam and a quadcopter this coming year. I just ordered a Pi Camera yesterday at 0546. If that arrives today it will be a perfect start to Pi year 2.]
[update - it did come and here's the 'quick and dirty' first day video - more tomorrow]
Linux documentation can be a bit sparse
But before I got around to videos, I noticed that in the Linux world there are lots of very clever people willing to help, (apart from the RTFM crowd) but a lot of the online documentation available is either “a bit lacking in basic detail” or simply out of date. So I figured that every time I do something new, the people who are a few steps behind me would benefit from it if I could leave a trail of complete, easy to follow, donkey-proof instructions with lots of screenshots and pictures. Now that was something I could get on with right away.
Complete instructions that work first time
That’s the goal. Give people a positive experience. Help them realise that the command line is immensely powerful – AND it is your friend.
The way that was done – and is still done – is that I take comprehensive notes while I’m doing something and then do a complete run-through of the instructions again on a fresh install when I’m finished. It takes a long time and a lot of effort, but it’s worth it when people take the time to leave a comment that it helped them.
As I said to Meltwater on his blog recently “I know how long it takes to produce quality content like this“.
So I spent a lot of time hanging out in the Raspberry Pi forums reading, absorbing, learning, helping others where I could. I’d been learning Python since early 2012 and enjoyed playing around with that as well. I’m not a novice programmer, but hardly an expert either. I’m not a Linux novice either, having used it on web servers for quite some time. But, as with programming, I’m certainly no Linux expert.
And then came the Gertboard
During 2012 I’d also become interested in physical computing and the Gertboard seemed an ideal way into that, so I ordered one the day they were announced. A few weeks later, I heard that Tandy had some boards for sale ahead of the Farnell launch. So I snagged one, thinking it’d be great to post the first Gertboard video (apart from the ones Gert had done). I did that – it’s not a particularly great vid, but it was the first…
Ironically, it’ll quite possibly get more views from this page than it’s had so far (380). I wasn’t very well known back then.
I took that early Gertboard along to a couple of Jams to show the flag waving demo. That caught people’s attention.
I spent a lot of time getting to understand how the Gertboard worked and then thought it’d be fun to have a go at writing some of the easier demo programs in Python. Gert had hinted in the forums that it would be something that the community could help out with.
I thought I could probably manage a few of the easy ones and then others would step in to help. You can see I had no experience of collaborative open source software development. The way it worked out, by the end of November, I’d done them all in two different GPIO systems and received “not a lot” of help.
They’re not immensely complex, but did take some time playing about. It was a good apprenticeship. (I did get some helpful input on tweaking the SPI bits later on from William “BGreat” Greathouse )
Gertboard in class
I took the Gertboard along to show my class. They loved blasting a temperature sensor with a hairdryer and shining a torch on a light sensor to change the readouts on the screen.
Lights and fans
So then the demos started to get more complex and more ambitious and, of course, a lot sillier. This was filmed in late November 2012…
And now for some hardware – RasPiO®
Out of my own classroom experiences, I realised that there was a place for a smaller, less complex, board for use in the classroom and by hobbyists. So I started designing my own board, and writing software for it, which I demonstrated at the Oxford Jam in January. It’s called RasPiO® (Razz-Pie-Oh). It’s not available yet, but hopefully it will be soon. It’s an I/O board for the Raspberry Pi – hence the name. It might end up being a range of boards actually, but one step at a time heh? It will be interesting to see how that develops.
The videos are getting better too
Without trying to be too self-congratulatory, I think the videos are improving as well. You’d hope so, seeing as we’re on number thirty-something. I’m also going to buy some lights to improve my lighting, and now I’ve got no excuse not to do that. Just last week I received a cheque for £500 that I won in a competition staged by web hosting company 123-reg.co.uk Thank you for that contribution.
The competition brief was to make a video showing how far you would go for a Raspberry Pi. So I entered this video that I’d shot of Dave Akerman and Anthony Stirk sending a Pi into space in a TARDIS a couple of weeks earlier, along with the caption “I’d go to space and safely back again for a Raspbery Pi”
I was hoping to win a Raspberry Pi (as if I need another ) I didn’t know anything about the £500 prize when I entered it.
Some other “pilights” from Pi year 1 have been
80 blog articles published
37 Videos published
over 600k page views
over 200k video views
My Python Gertboard software (downloaded >4440 times by the end of April 2013) was officially adopted for the assembled Gertboard launch – including some “walk-throughs” I wrote, which went into the Gertboard manual
Visited Pimoroni (and shot a little Pibow laser cutting vid – not yet published)
People have started asking me to write for them (more than I can say yes to)
People are sending products for review (I like reviewing stuff – keep it coming. I try to be fair and unbiased.)
I’ve recently started doing some Pi related freelance documentation and development work (which is rather nice after dedicating so much unpaid time to the Pi )
Looking ahead?
In year two, I think we’ll see…
more tutorials
more reviews
more silly projects
some hardware, software and teaching materials to support it
And, of course, there’ll be some other stuff that I haven’t figured out yet. Year 1 has been full of unanticipated twists and turns. Year 2 will no doubt contain some surprises.
I expect to go to more excellent Jams at Oxford and Milton Keynes. In fact I’m starting Pi year 2 with a Cambridge Jam on Saturday, where I hope to meet Matt “Raspberry Pi Beginners” Manning and Alex Bradbury, the Foundation member who does a lot of dev work on the Raspbian flavour of Linux, also Timothy “PiBorg” Freeburn and Andrew Scheller are on the list. Should be fun. I’m bringing the Wiimote controlled Gertboard “Whackadoodle” demo and probably the Guzunty Wiimote propellor car I showed at the recent Oxford Jam as well (even though it’s doubtful I will have it completley finished).
Year 1 of Pi ownership has been great for me. How has yours been?
A multimeter is the Swiss Army Knife of electronics. You really do need one to debug your circuits when things aren’t working. GRRRRRR! Where is that dodgy connection?
I’ve managed for years with a very cheap multimeter, but recently RS Components sent me this ISO-TECH IDM99III for review. Could it be “the one”?
IDM99III digital multimeter
My brief is “an honest video review”. I receive no payment or kickback for doing this, but I do get to keep the product. I’m getting quite a lot of stuff in for review at the moment, from lots of different sources. It’s a good thing I like doing reviews I don’t go out of my way to be horrible about a product, but I won’t lavish it with praise unless I think it’s deserved.
I will be doing reviews like this periodically. I hope they’ll be useful to you, readers and viewers. Well this is a video review, so I’ll let the video do the talking…
Summary
For those of you who don’t do video, here’s a summary (but there’s much more in the video)…
I really like this multimeter. The probes are 130cm long and have well insulated, removable alligator clips at the ends. The display is large and clear and has a switchable backlight for dim environments. It has three positions for the positive lead, and if you try to set the dial in the wrong place for the position it’s in, it will sound the beeper and warn you that you’ve messed up. It’s already saved me from accidents a couple of times.
Each dial position has an alternative function accessible with the blue button. Four buttons across the top give you control of…
Range – manual or auto
Volt sense – senses high voltage nearby
Min Max – stores min and max values for the measurement period
Smart hold – lets you hold the value
It’s got a rubberised plastic protective case and a magnetic hanging strap
I’m using it daily now and really enjoy owning it. (Part # 757-5116 from RS Components)
There was a Raspberry Jam in Oxford this week. There were lots of good exhibits as usual. I’ll probably blog a bit more about some of the others a little later. In the meantime you’ve got Pete Wood’s blog here. The big news for me was the much awaited Pi camera board. It was the first time I’d seen one. Here’s a screen grab from my video showing what it looks like.
Raspberry Pi camera board
It looks small and neat. The picture quality seems good and I can’t wait to get one. It’ll be out in a couple of weeks. (Plan A date is 14th May if I remember correctly what Colin said.)
Here’s a short preview video. It’s in HD. Since the pi camera output is HD, it seems silly to publish in anything less. Enjoy…
The Cyntech GPIO paddle board is a new type of breakout board for the Raspberry Pi.
It’s nice and small (about half the size of the Pi) elegantly simple, and I like the connectors. To connect a wire, you hold down the orange tab, push your wire into the hole and release the tab. The wire is gripped by a spring-loaded contact.
Cyntech GPIO Paddle Board
It comes with a very nice “rainbow” ribbon cable, which is much more cheerful to look at than a grey one and it’s a decent 20cm length as well. You don’t always want the rest of your circuitry right next to the Pi.
Cyntech paddle board + Pi
Where can I get one?
You can get them from Maplin, CPC and Cyntech for a very reasonable £5.99 delivered. I’ve also seen them on Amazon (US site) as well.
Suggested Improvements?
I would suggest a sticker so that the port labels and/or alternative port labels can be placed right next to the wire holes. This would make it even harder to stick a wire in the wrong hole.
This is something you can easily add yourself, although I haven’t yet done so.
Paddle board + GPIO cable
I like it and think it makes a useful addition to the range of breakout boards available for the Raspberry Pi. I haven’t used mine yet, but will report back when I do.
Have a look at this short video walkround (<4 min) and see what you make of it.
Cyntech and Pimoroni have also produced a GPIO Cheat sheet with information about the Raspberry Pi GPIO ports.
I tried using RPi.GPIO soft PWM with servos in response to a query after the last article, but, although it did change the servo positions, it was jittery. Servos require quite precise PWM inputs. These appear to be better suited to hardware PWM solutions (or lower level programming languages). So we’ll leave servos for now and concentrate on controlling the brightness of leds and simple brushed motor speed control.
Leds
The idea here is that you can switch an led on and off very fast and trick the eye into thinking it’s on all the time. Most people can see flickering at or below about 50 Hertz (50 times per second). I remember the “good old days” of CRT monitors. I used to prefer one with a refresh rate of at least 72 Hz to avoid eye strain and headaches. So let’s pick an arbitrary number above 50 Hz, but not too high. Let’s say 100 Hz. That gives us a frequency, which we will leave as it is throughout the program.
Dimming leds using duty cycle
Remembering from last time, the duty cycle is the percentage of time the pulse is “ON”.
We will vary the duty cycle to get our variable brightness. A duty cycle value of 0 means fully off, 100 is fully on. Anything in between gives a proportion of full brightness. (Well that’s what your eye thinks. It actually gives full brightness for a proportion of the time.)
The led dimming circuit
Before we can do anything we have to hook it all together. Your leds may need different value resistors than mine, so check.
We have the +ve ends of: a white led connected to GPIO 25; a red led to GPIO 24. White gets a 330R resistor (it’s a superbright led) from -ve to GND. Red gets 56R (diagram shows 68R, which would also be fine) from -ve to GND. GND on the breadboard is connected to pin 6 GND on the Pi.
These leds are taking their power straight from the Pi’s GPIO ports, which is why I’m being careful to restrict the current drawn by my superbright white led.
2 leds dimmed with software PWM in RPi.GPIO
Now we’ve got the circuit sorted out, let’s look at the software.
Program structure
In the program below, we are running a couple of loops which change the duty cycles of red and white leds, such that when one is 100, the other is 0. The first loop (lines 27-30) cycles up to 100 and the second one (31-34) cycles down from 100 to 0 (both from the white led’s point of view).
Those two loops are enclosed in a while True: loop (lines 26-34) that will keep going until you hit CTRL+C. And that while True: loop is inside a try: ... Except KeyboardInterrupt: block that will stop the PWM, clean up the GPIO ports we opened and exit gracefully when we do hit CTRL+C. (Always clean up after yourself ).
#!/usr/bin/env python2.7
# script by Alex Eames http://RasPi.tv
#http://RasPi.tv/2013/how-to-use-soft-pwm-in-rpi-gpio-pt-2-led-dimming-and-motor-speed-control
# Using PWM with RPi.GPIO pt 2 - requires RPi.GPIO 0.5.2a or higher
import RPi.GPIO as GPIO # always needed with RPi.GPIO
from time import sleep # pull in the sleep function from time module
GPIO.setmode(GPIO.BCM) # choose BCM or BOARD numbering schemes. I use BCM
GPIO.setup(25, GPIO.OUT)# set GPIO 25 as output for white led
GPIO.setup(24, GPIO.OUT)# set GPIO 24 as output for red led
white = GPIO.PWM(25, 100) # create object white for PWM on port 25 at 100 Hertz
red = GPIO.PWM(24, 100) # create object red for PWM on port 24 at 100 Hertz
white.start(0) # start white led on 0 percent duty cycle (off)
red.start(100) # red fully on (100%)
# now the fun starts, we'll vary the duty cycle to
# dim/brighten the leds, so one is bright while the other is dim
pause_time = 0.02 # you can change this to slow down/speed up
try:
while True:
for i in range(0,101): # 101 because it stops when it finishes 100
white.ChangeDutyCycle(i)
red.ChangeDutyCycle(100 - i)
sleep(pause_time)
for i in range(100,-1,-1): # from 100 to zero in steps of -1
white.ChangeDutyCycle(i)
red.ChangeDutyCycle(100 - i)
sleep(pause_time)
except KeyboardInterrupt:
white.stop() # stop the white PWM output
red.stop() # stop the red PWM output
GPIO.cleanup() # clean up GPIO on CTRL+C exit
This program will continually oscillate white and red leds between dim and bright until CTRL+C is pressed. When white is bright, red will be dim and vice versa.
You can play with the value of pause_time in line 23 to speed up or slow down the oscillation rate.
Getting the script on your Pi
You can either cut and paste the above code into a nano window on your pi, like this…
nano pwm2.py
cut and paste the above code from this page CTRL+O
y
CTRL+X
Or, type the following directly from the command line (e.g. LXTerminal) on your Pi…
sudo python pwm2.py (But you will need RPi.GPIO 0.5.2a or higher)
The video shows what the results should look like
And motors?
The software to control the speed of a motor is exactly the same idea. I’m going to prove that by using the same program and just adding…
a couple more wires
a Darlington Array (ULN2003) chip
a motor
a battery to power the motor
Why the Darlington Array?
Most motors need to run at a higher voltage than the Pi’s 3.3V offers, and a higher current than the GPIO ports can cope with. So we need a way of being able to switch a higher voltage with the 3V3 from a GPIO port. The ULN2003 is seven pairs of transistors that allow this switching in a safe way. You could just use a standard transistor, but this chip only costs ~30 pence or 50 cents so why not have the capability of switching 7 things at once – you don’t have to use them all?
The other nice thing this chip does is protect your Pi’s GPIO port from the voltage spike that can occur when an inductive load (a relay, solenoid, motor etc.) is switched off. It has built-in freewheeling diodes that give the required protection – all for much less than the cost of the separate parts. So in my opinion it would be rude not to use one.
You can get dedicated H-bridge motor control chips that will give you bidirectional motor control, but for this experiment I wanted to keep things simple and feed the motor raw PWM.
See what the circuit looks like below…
Adding a motor into the previous circuit, using ULN2003 to buffer the Pi
You should now have a pretty good idea how to use RPi.GPIO’s soft PWM to control leds and motors. I hope you found this useful. Let us know what you’re going to use it for in the comments below.
Back in November I made a Raspberry Pi controlled “light and fan relay switching” demo that you may have seen before on the Official Raspberry Pi blog.
You can see for yourselves in the video what the year 5s thought of it. I didn’t tell them what was going to happen, as I wanted to catch their genuine reaction.
Questions and investigation
It prompted questions (e.g. what happens if we turn off the lights?), which led to some of those unplanned, spontaneous changes of direction and further discussions (e.g. oscillation) which make teaching so interesting and challenging.
Python
We also had a brief look at the Python script – ostensibly to check what value I’d set the temperature sensor to switch on the fan. I’d forgotten what I set it on, when asked – but it was a good excuse to get the code on the screen and show them how simple it is. The laptop was only used as a keyboard and monitor.
Gertboard + hairdryer
This wasn’t the first time I’d taken a Pi into class. I believe this class may have been one the first classes in the world to see a Gertboard in action in early October 2012. We blasted a temperature sensor with a hairdryer to see how quickly it could change the onscreen readout. We also shone torches and switched the lights on and off to change the brightness of an LED linked to a light sensor.
I have (not fully developed yet) future plans involving the Pi in the classroom. The class loved Sherston Software’s Mission Control, which is a game that gets them doing some logo programming to control virtual robots, motors, lights etc. This “game” throws up some interesting surprises. I often find that the ones with the most obvious natural programming aptitude are not necessarily the ones you might have guessed purely from academic achievement. Some of them “just get it” and others need a little help.
Scratch may be the way forward
I’d love to get them involved in programming with Scratch. I’ve been offered to review a Scratch controlled robot. That sounds like a lot of fun. I know Simon Walters (cymplecy on the forums) has been doing some great work on Scratch and robotics. Also, the Raspberry Pi Foundation is working on improvements to the performance of Scratch on the Pi. All this bodes well for what looks like a suitable introduction to programming for this age group.
It’s all still a bit experimental, but as long as we’re moving towards Isn’t Computing Terrific, and away from It’s Complete Torture, I think we’re making progress.
Thank you to the school and to all the parents for allowing me to do this.
This demo was destined for the Electronica exhibition in Shanghai, and I’ve just received a link to a little video the guys shot while they were there. (Thanks Yan )
Apparently it was well received, worked really well and only needed rebooting once in three days, which is pretty good. I’ve not always found the bluetooth link to be that robust.