Spookiest Raspberry Pi Halloween projects – part one

Spookiest Raspberry Pi Halloween projects – part one

Gather round, ghouls and girls, it’s that time of the year again when scary rules supreme. Perhaps you’re planning on dressing up to go trick-or-treating or marathoning a ghastly amount of horror films, but we’ve found some people who are deep in their lairs experimenting with a Raspberry Pi to create the spookiest projects the world has ever seen. We’ve hunted down the most horrifying and wicked projects for your reading pleasure, but don’t worry, the only dark art at work here is the odd bit of C programming. Beware, read any further and you’ll be doomed to be inspired by these seven unholy projects… and have to read many more awful puns. The full article can be found in The MagPi 38 We’ll be rating these projects using the all-knowing MagPi SPOOK-O-METER Raspberry Pi Haunted House Enter if you dare to the abode with home scare-tomation Maker: Stewart Watkiss – data centre manager, father, part-time Count Dracula It’s late. The night grows dark and you’re near the end of your trick-or-treat run – but what’s this? A house you’ve never seen before on your road. Eager for more sweets, you make your way to the door. A haunted house sign greets you, but you think it merely decoration. Approaching the door, you press the doorbell – only for glass to break and the light to go out. A door creaks, the sign you had dismissed flashes, and you hear screams as the lights come back on. Startled, you look to your right and realise monsters are partying in the garage next to you, celebrating another victim in their night of ghastly fun. What horrors await inside? “I had been trying to think of something fun to do for Halloween and the Raspberry Pi was an obvious choice,” the owner of this nightmarish house, Stewart, tells us. “I’d recently built a circuit for home automation using remote-control sockets and had the idea of using that to turn lights on and off automatically. I also spent some time looking around at shops to see what other Halloween props I could add to the project.” The system is deceptively simple, although there’s a lot of different components to it. A dedicated doorbell is hooked up to a PiFace board that interacts directly with the Raspberry Pi and some Python code. Stewart chose the PiFace for this, instead of wiring up directly to…
Source: Spookiest Raspberry Pi Halloween projects – part one

Ultrasonic Theremin

Ultrasonic Theremin

Thinking outside the box is what we like here at The MagPi. The Raspberry Pi is so versatile and so open that you can do so much with it that perhaps other people wouldn’t have dreamt of before. So here’s a good question: with a Raspberry Pi, some speakers, and an ultrasonic distance sensor used for robotics, what would you make? Linus Forslid decided to build a type of theremin. The full article can be found in The MagPi 38 A compact device with one purpose – this is Linus’ complete Theremin “A theremin is a device that measures distances to objects nearby and turns that into sound, so that when you move your hands around it, you can generate music,” Linus explains. It’s not exactly like a normal theremin, though. “Unlike a classic theremin, my project uses an ultrasound sensor rather than measuring electrical fields with antennas, and currently my project only has a single sensor, so you can only control the tone it produces. Eventually, I plan to add another so that the beat can also be manually controlled.” Theremins were used to create the eerie, creepy music for classic sci‑fi films. Due to this and its unusual method of operation, the theremin has become intriguing to many musicians and techies, including Linus: “I’ve always wanted a theremin, from the first day I heard of it. It’s just such a cool thing. As it turns out, though, an actual theremin is not cheap or easy to build, but this project was easily doable and I had almost all of the components at home already, so the cost was minimal as well. I decided to use a PC speaker instead of the Pi’s own audio jack and an external speaker, mostly because I could, in addition to it not requiring an additional power source.” The set up is quite simple, but works very well The hardware is one thing, but actually translating it to sound, surely that takes a bit more work on the code to get it operational? “Not really, I think.” Linus adapted some pre-existing code for the project. “The script that controls the theremin is coded in C using wiringPi, and it took maybe an hour to get it working. I’ve spent a couple of hours beyond that just tweaking the numbers to try out different sounds and find one I like. I wouldn’t say it…
Source: Ultrasonic Theremin

Raspberry Pi fridge monitor

Raspberry Pi fridge monitor

The house is infested with cheese fairies who raid the fridge at all times of day and consume considerable quantities of tasty cheese. In this project, any fridge-door-opening activity will result in a notification email – or, if you prefer, a tweet or Facebook update – telling you the time that the fridge door was opened. This may seem a somewhat trivial example, but it really serves to show just how easy it is to hook up a sensor that will cause your Raspberry Pi to notify you of events in a variety of ways using the If This Then That framework. As you’ll see from the below list of required components, this project uses a photoresistor connected to the Raspberry Pi GPIO header using a pair of female-to-female jumper wires. This tutorial can be found in The MagPi 37 You’ll need Photoresistor (almost any one will work for this project) 2× female-to-female jumper wires USB Wi-Fi adaptor (unless your fridge has an Ethernet socket nearby) Detecting Darkness Unlike an Arduino, for example, a Raspberry Pi does not have analogue inputs that can measure a voltage. It does, however, have digital inputs; if the voltage at a digital input exceeds about 1.65V (half of 3.3V), then the input is read by the Raspberry Pi as HIGH, otherwise it is counted as LOW. So, although you can’t use a photoresistor with a Raspberry Pi to give a measurement of the light level (not without a few extra components anyway), you can use a photoresistor to tell if it’s dark or light. The digital input pin (GPIO pin 18) has its internal pull-up resistor enabled. So, while the pull-up resistor is trying to pull pin 18 HIGH, the photoresistor will try to pull it low. They are in a of tug-of-war and if the pull-up resistor is winning, the input will be HIGH; if the photoresistor is winning, it will be LOW. The more light falling on a photoresistor, the lower the resistance (the stronger it pulls pin 18 towards 0V). Typically, a photoresistor will have a resistance of a few hundred to a few thousand ohms when it’s in the light. If you make a photoresistor really dark (say inside a fridge), then its resistance rises to several mega-ohms (millions of ohms). At this point, the built-in pull-up resistor (50 to 100 kilo-ohms) will be easily winning and the input will be HIGH.…
Source: Raspberry Pi fridge monitor

First 30 issues of The MagPi free on Google Play and iTunes

First 30 issues of The MagPi free on Google Play and iTunes

Did you know you could get The MagPi on Google Play and Apple’s iTunes? You can subscribe to the magazine from there and buy our individual issues – however they only used to go back to the relaunch from earlier in 2015. That’s over 30 issues missing from The MagPi’s history! We’ve fixed that though. Not only are all the previous issues of The MagPi up on our app, but they’re all completely free, forever. So as well as being able to read all our new and current issues, you can catch up on all the past issues while waiting for the latest one to arrive. Old and new, every issue of the MagPi is now available Head over to the Play Store to grab the Android version, and the iTunes Appstore for the iOS version now to get some free mags! The post First 30 issues of The MagPi free on Google Play and iTunes appeared first on The MagPi Magazine.
Source: First 30 issues of The MagPi free on Google Play and iTunes

New Scratch review

New Scratch review

Scratch is one of the best ways to introduce young people into the joys of coding. Developed by MIT, specifically to help young people learn to code, Scratch is a visual editor with characters (known as Sprites) and blocks that react to, and control, the sprites. The blocks click together in much the same way that code is written, and clicking the blocks together creates programs. The Raspberry Pi foundation’s aim to build tiny and affordable computers for kids gels pretty nicely with Scratch’s aim to help young people learn to code, so it’s no surprise to see Scratch form part of the stock Raspbian operating system. What you may not have noticed, is that the recent Raspbian Jessie update contained a revamped version of Scratch packing some great new features. The new version of Scratch is based upon the same edition of Scratch (version 1.4) but it now runs much faster (up to 10 times as fast in some instances) and has native support for the GPIO pins. Let’s handle the speed boost first. The need for Speed While Scratch is developed by MIT, it’s brought to the Raspberry Pi thanks to the hard work of a developer called Tim Rowledge (rowledge.org), and it’s from his endeavours that we should thank for Scratch’s souped-up engine. Scratch was originally developed in a language called Smalltalk, and it runs inside a Squeak virtual machine (VM). Tim has spent time a lot of his time ensuring that Squeak runs on various ARM-based systems like the Raspberry Pi (mostly because he’s a RISC OS fan). Tim says he spent time “rewriting some of the more egregiously ugly code, improve algorithms, tweak VM configurations and so on.” While direct speed comparisons depend on a lot of factors, a version of Pac-Man created in Scratch by Andrew Oliver is now running at a playable 30fps (up from 16fps on the Raspberry Pi model B and a mere 1 fps on the original Pi). This faster speed isn’t just a nicety. The way Scratch gets kids coding is by recreating games, and game-like environments. The improved Scratch performance prevents young people from hitting a performance limitation and switching off. Using Pins If the speed boost wasn’t enough, Scratch now incorporates GPIOServer so you can directly access the pins on your Raspberry Pi. It’s been referred as a “first pass” at GPIO implementation, and it’s a bit…
Source: New Scratch review