Tag Archives: Your Projects

Build a security camera with Raspberry Pi and OpenCV

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/raspberry-pi-security-camera-opencv/

Tired of opening the refrigerator only to find that your favourite snack is missing? Get video evidence of sneaky fridge thieves sent to your phone, with Adrian Rosebeck’s Raspberry Pi security camera project.

Building a Raspberry Pi security camera with OpenCV

Learn how to build a IoT + Raspberry Pi security camera using OpenCV and computer vision. Send TXT/MMS message notifications, images, and video clips when the security camera is triggered. Full tutorial (including code) here: https://www.pyimagesearch.com/2019/03/25/building-a-raspberry-pi-security-camera-with-opencv

Protecting hummus

Adrian loves hummus. And, as you can see from my author bio, so do I. So it wasn’t hard for me to relate to Adrian’s story about his college roommates often stealing his cherished chickpea dip.

Garlic dessert

“Of course, back then I wasn’t as familiar with computer vision and OpenCV as I am now,” he explains on his blog. “Had I known what I do at present, I would have built a Raspberry Pi security camera to capture the hummus heist in action!”

Raspberry Pi security camera

So, in homage to his time as an undergrad, Adrian decided to finally build that security camera for his fridge, despite now only needing to protect his hummus from his wife. And to build it, he opted to use OpenCV, a Raspberry Pi, and a Raspberry Pi Camera Module.

Adrian’s camera is an IoT project: it not only captures footage but also uses Twillo to send that footage, via a cloud service (AWS), to a smartphone.

Because the content of your fridge lives in the dark when you’re not inspecting it, the code for capturing video footage detects light and dark, and records everything that occurs between the fridge door opening and closing. “You could also deploy this inside a mailbox that opens/closes,” suggests Adrian.

Get the code and more

Adrian provides all the code for the project on his blog, pyimagesearch, with a full explanation of why each piece of code is used — thanks, Adrian!

For more from Adrian, check out his brilliant deep learning projects: a fully functional Pokémon Pokédex and Santa Detector.

The post Build a security camera with Raspberry Pi and OpenCV appeared first on Raspberry Pi.

The Junk Drum Machine

Post Syndicated from Liz Upton original https://www.raspberrypi.org/blog/junk-drum-machine/

I do not really have any spare time. (Toddler, job, very demanding cat, lots of LEGO to tidy up.) If I did, I like to imagine that I’d come up with something like this to do with it.

junk drum machine

Want to see this collection of junk animate? Scroll down for video.

From someone calling themselves Banjowise (let me know what your real name is in the comments, please, so I can credit you properly here!), here is a pile of junk turned into a weirdly compelling drum machine.

Mechanically speaking, this isn’t too complicated: just a set of solenoids triggered by a Raspberry Pi. The real clever is in the beauteous, browser-based step sequencer Banjowise has built to program the solenoids to wallop things in beautiful rhythm. And in the beauteous, skip-sourced tchotchkes that Banjowise has found for them to wallop. Generously, they’ve made full instructions on making your own available on Instructables. Use any bits and bobs you can get your hands on if old piano hammers and crocodile castanets are not part of the detritus kicking around your house.

Warning: this video is weirdly compelling.

Automabeat – A Raspberry Pi Mechanical Robotic Junk Drum Machine

My Raspberry Pi based drum / percussion machine. Consisting of 8 12v solenoids, a relay, wooden spoons, a Fullers beer bottle, a crocodile maraca and a few other things. An Instructable on how to build your own is here: https://www.instructables.com/id/A-Raspberry-Pi-Powered-Junk-Drum-Machine/, or take a look at: http://www.banjowise.com/post/automabeat/

The sequencer is lovely: a gorgeously simple user interface that you can run on a tablet, your phone, or anything else with a browser (and it’s very easily adaptable to other projects). The web interface lets Python trigger the GPIO pins over web sockets. There’s a precompiled version available for people who’ve followed Banjowise’s comprehensive wiring instructions, but you can also get the source code from GitHub.

Sequencer UI

I think I’m getting good, but I can handle criticism.

We love it. Now please excuse me. I need a little while to search online for crocodile castanets.

The post The Junk Drum Machine appeared first on Raspberry Pi.

LED Matrix Cylinder — a blinkenlights tube

Post Syndicated from Liz Upton original https://www.raspberrypi.org/blog/led-matrix-cylinder-a-blinkenlights-tube/

We see lots of addressable LED projects, but there was something weirdly charming and very pretty about this cylinder of squares. It’d make for a lovely interactive nightlight in a kids’ room, or for a grown-up lighting feature that you could also use as a news ticker or something that monitors your in-home IoT devices. Once you’ve built something like this, you’re only limited by your imagination — and it’s nice enough to display in your home.

This project is from makeTVee on Instructables. The cleverness is in the layout and the really meticulous execution: vertical strips of LEDs form a cylinder in a laser-cut frame, with a very thin layer of wood veneer glued around the whole thing to act as a diffuser. It’s simple, but really rather beautiful and very effective.

diffuser, diffusing

In the case to the side is the Raspberry Pi Zero that’s driving the whole thing. Here it is doing its thing:

LED matrix cylinder WS2812 Raspberry Pi Zero

LED matrix cylinder based on WS2812 LEDs and some laser cutter parts. https://hackaday.io/project/162035-led-matrix-cylinder https://www.instructables.com/id/LED-Matrix-Cylinder/ #WS2812 #LEDcylinder

makeTVee has built a Pygame-based simulator of the whole matrix so you can program it to do exactly what you want: scroll marquee text, make pretty patterns, twinkle at random, display images: the world’s your (pixellated) oyster. The code’s available at GitHub.

GUI for programming cylinder

Thanks, makeTVee — if you’d like to leave your real name below, we’ll credit you properly here!

The post LED Matrix Cylinder — a blinkenlights tube appeared first on Raspberry Pi.

Laser-engraved Raspberry Pi hologram

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/laser-engraved-raspberry-pi-hologram/

Inspired by an old episode of Pimoroni’s Bilge Tank, and with easy access to the laser cutter at the Raspberry Pi Foundation office, I thought it would be fun to create a light-up multi-layered hologram using a Raspberry Pi and the Pimoroni Unicorn pHAT.

Raspberry Pi layered light

Read more –

Break it to make it

First, I broke down the Raspberry Pi logo into three separate images — the black outline, the green leaves, and the red berry.

RASPBERRY PI HOLOGRAM
RASPBERRY PI HOLOGRAM
RASPBERRY PI HOLOGRAM

Fun fact: did you know that Pimoroni’s Paul Beech designed this logo as part of the ‘design us a logo’ contest we ran all the way back in August 2011?

Once I had the three separate files, I laser-engraved them onto 4cm-wide pieces of 3mm-thick clear acrylic. As there are four lines of LEDs on the Unicorn pHAT, I cut the fourth piece to illuminate the background.

RASPBERRY PI HOLOGRAM

To keep the engraved acrylic pieces together, I cut out a pair of acrylic brackets (see above) with four 3mm indentations. Then, after a bit of fiddling with the Unicorn pHAT library, I was able to light the pHAT’s rows of LEDs in white, red, green, and white.

RASPBERRY PI HOLOGRAM

The final result looks pretty spectacular, especially in the dark, and you can build on this basic idea to create fun animations — especially if you use a HAT with more rows of LEDs.

Iterations

This is just a prototype. I plan on building a sturdier frame for the pieces that securely fits a Raspberry Pi Zero W and lets users replace layers easily. As with many projects, I’m sure this will grow and grow as each interaction inspires a new add-on.

How would you build upon this basic principle?

Oh…

…we also laser-engraved this Cadbury’s Creme Egg.

The post Laser-engraved Raspberry Pi hologram appeared first on Raspberry Pi.

Play Heverlee’s Sjoelen and win beer

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/play-heverlees-sjoelen-win-beer/

Chances are you’ve never heard of the Dutch table shuffleboard variant Sjoelen. But if you have, then you’ll know it has a basic premise – to slide wooden pucks into a set of four scoring boxes – but some rather complex rules.

Sjoelen machine

Uploaded by Grant Gibson on 2018-07-10.

Sjoelen

It may seem odd that a game which relies so much on hand-eye coordination and keeping score could be deemed a perfect match for a project commissioned by a beer brand. Yet Grant Gibson is toasting success with his refreshing interpretation of Sjoelen, having simplified the rules and incorporated a Raspberry Pi to serve special prizes to the winners.

“Sjoelen’s traditional scoring requires lots of addition and multiplication, but our version simply gives players ten pucks and gets them to slide three through any one of the four gates within 30 seconds,” Grant explains.

As they do this, the Pi (a Model 3B) keeps track of how many pucks are sliding through each gate, figures how much time the player has left, and displays a winning message on a screen. A Logitech HD webcam films the player in action, so bystanders can watch their reactions as they veer between frustration and success.

Taking the plunge

Grant started the project with a few aims in mind: “I wanted something that could be transported in a small van and assembled by a two-person team, and I wanted it to have a vintage look.” Inspired by pinball tables, he came up with a three-piece unit that could be flat-packed for transport, then quickly assembled on site. The Pi 3B proved a perfect component.

Grant has tended to use full-size PCs in his previous builds, but he says the Pi allowed him to use less complex software, and less hardware to control input and output. He used Python for the input and output tasks and to get the Pi to communicate with a full-screen Chromium browser, via JSON, in order to handle the scoring and display tasks in JavaScript.

“We used infrared (IR) sensors to detect when a puck passed through the gate bar to score a point,” Grant adds. “Because of the speed of the pucks, we had to poll each of the four IR sensors over 100 times per second to ensure that the pucks were always detected. Optimising the Python code to run fast enough, whilst also leaving enough processing power to run a full-screen web browser and HD webcam, was definitely the biggest software challenge on this project.”

Bottoms up

The Raspberry Pi’s GPIO pins are used to trigger the dispensing of a can of Heverlee beer to the winner. These are stocked inside the machine, but building the vending mechanism was a major headache, since it needed to be lightweight and compact, and to keep the cans cool.

No off-the-shelf vending unit offered a solution, and Grant’s initial attempts with stepper motors and clear laser-cut acrylic gears proved disastrous. “After a dozen successful vends, the prototype went out of alignment and started slicing through cans, creating a huge frothy fountain of beer. Impressive to watch, but not a great mix with electronics,” Grant laughs.

Instead, he drew up a final design that was laser‑cut from poplar plywood. “It uses automotive central locking motors to operate a see-saw mechanism that serve the cans. A custom Peltier-effect heat exchanger, and a couple of salvaged PC fans, keep the cans cool inside the machine,” reveals Grant.

“I’d now love to make a lightweight version sometime, perhaps with a folding Sjoelen table and pop-up scoreboard screen, that could be carried by one person,” he adds. We’d certainly drink to that.

More from The MagPi magazine

Get your copy now from the Raspberry Pi Press store, major newsagents in the UK, or Barnes & Noble, Fry’s, or Micro Center in the US. Or, download your free PDF copy from The MagPi magazine website.

MagPi 79 cover

Subscribe now

Subscribe to The MagPi on a monthly, quarterly, or twelve-monthly basis to save money against newsstand prices!

Twelve-month print subscribers get a free Raspberry Pi 3A+, the perfect Raspberry Pi to try your hand at some of the latest projects covered in The MagPi magazine.

The post Play Heverlee’s Sjoelen and win beer appeared first on Raspberry Pi.

FREE NOODS with FOODBEAST and Nissin

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/free-ramen-foodbeast-nissin/

Push a button and share a hashtag to get free ramen, games, or swag with the Dream Machine, a Raspberry Pi–driven vending machine built by FOODBEAST and Nissin.

foodbeast.com on Twitter

This Instagram-powered vending machine gives away FREE @OrigCupNoodles and VIDEO GAMES 🍜🎮!! Where should it travel next? #ad https://t.co/W0YyWOCFVv

Raspberry Pi and marketing

Digital viral marketing campaigns are super popular right now, thanks to the low cost of the technology necessary to build bespoke projects for them. From story-telling phoneboxes to beer-pouring bicycles, we see more and more examples of such projects appear in our inbox every week.

The latest campaign we like is the Dream Machine, a retrofit vending machine that dispenses ramen noodles, video games, and swag in exchange for the use of an Instagram hashtag.

Free ramen from FOODBEAST and Nissin

With Dream Machines in Torrance, California and Las Vegas, Nevada, I’ve yet to convince Liz that it’s worth the time and money for me to fly out and do some field research. But, as those who have interacted with a Dream Machine know, the premise is pretty simple.

The Dream Machine vending machine from FOODBEAST and NissanPress the big yellow button on the front of the vending machine, and it will tell you a unique hashtag to use for posting a selfie with the Dream Machine on Instagram. The machine’s internet-enabled Raspberry Pi brain then uses its magic noodle powers (or, more likely, custom software) to detect the hashtag and pop out a tasty treat, video game, or gift card as a reward.

The Dream Machine vending machine from FOODBEAST and Nissan

The Dream Machines appeared at the start of March, and online sources suggest they’ll stay in their current locations throughout the month. I’d like to take this moment to suggest their next locations: Cambridge, UK and Oakland, California. Please and thank you!

Hold your horses…

We know this is a marketing ploy. We know its intention is to get Joe Public to spread the brand across social media. We know it’s all about money. We know. But still, it’s cool, harmless, and delicious. So let’s not have another robocall debate, OK 😂

The post FREE NOODS with FOODBEAST and Nissin appeared first on Raspberry Pi.

Instaframe: image recognition meets Instagram

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/instaframe-image-recognition-meets-instagram/

Bringing the digital photo frame into an even more modern age than the modern age it already resides in, Sean Tracey uses image recognition and social media to update his mother on the day-to-day happenings of her grandkids.

Sharing social media content

“Like every grandmother, my mum dotes on her grandchildren (the daughter and son of my sister, Grace and Freddie),” Sean explains in his tutorial for the project, “but they don’t live nearby, so she doesn’t get to see them as much as she might like.”

Sean tells of his mother’s lack of interest in social media platforms (they’re too complex), and of the anxiety he feels whenever she picks up his phone to catch up on the latest images of Grace and Freddie.

So I thought: “I know! Why don’t I make my mum a picture frame that filters my Instagram feed to show only pictures of my niece and nephew!”

Genius!

Image recognition and Instagram

Sean’s Instaframe project uses a Watson Visual Recognition model to recognise photos of his niece and nephew posted to his Instagram account, all via a Chrome extension. Then, via a series of smaller functions, these images are saved to a folder and displayed on a screen connected to a Raspberry Pi 3B+.

Sean has written up a full rundown of the build process on his website.

Photos and Pi

Do you like photos and Raspberry Pi? Then check out these other photo-focused Pi projects that we’re sure you’ll love (because they’re awesome) and will want to make yourself (because they’re awesome).

FlipFrame

FlipFrame, the rotating picture frame, rotates according to the orientation of the image on display.

FlipFrame

Upstagram

This tiny homage to the house from Up! takes bird’s-eye view photographs of Paris and uploads them to Instagram as it goes.

Pi-powered DSLR shutter

Adrian Bevan hacked his Raspberry Pi to act as a motion-activated shutter remote for his digital SLR — aka NatureBytes on steroids.

The post Instaframe: image recognition meets Instagram appeared first on Raspberry Pi.

Make our light-up Raspberry Pi box for #MonthOfMaking

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/light-raspberry-pi-box-monthofmaking/

On Tuesday, Rob at The MagPi magazine tweeted this:

The MagPi magazine on Twitter

Hey @Raspberry_Pi, wanna join us in making some stuff for #MonthOfMaking? Rob has some cosplay to do this week and other plans for the rest of the month…

And we said YES!

At this point in time, Alex was hiding in the Raspberry Pi Foundation makerspace, creating thingamabobs and whatsit with the laser cutter, and an idea came into her mind.

(Is it weird that I’m referring to myself in the third person? It is. I’ll stop.)

The idea started with this:

Raspberry Pi laser cut box #MonthOfMaking

Oddly satisfying, right?

And ended like this:

Raspberry Pi laser cut box #MonthOfMaking

Raspberry Crepe Cake?

With a little bit of this in between:

Raspberry Pi laser cut box #MonthOfMaking

For hiding treasures

And thanks to some cheap battery-powered lights and magnets from Poundland…

#MonthOfMaking

Whosits and whatsits galore

…it lights up too!

Raspberry Pi laser cut box #MonthOfMaking

Photograph taken inside my rucksack for ambience

Make your own

So, do you want to make your own? Of course you do.

Ideally, you need access to a laser cutter, but if you don’t have one, you can just cut out the layers from some thick cardboard using a craft knife.

You’ll need these four files:

Raspberry Pi laser cut box
Raspberry Pi laser cut box
Raspberry Pi laser cut box
Raspberry Pi laser cut box

These are slightly different to the ones I used, so the acrylic should press-fit without the need for the backing frame you see in the image above.

Feel free to resize the files and change the box design to better fit whatever you want to put inside, but remember: making these boxes to sell, or diverging from our brand guidelines when using the Raspberry Pi logo, is against our trademark rules.

#MonthOfMaking

Join Raspberry Pi and The MagPi magazine in the #MonthOfMaking by using the hashtag in your social posts sharing your makes online. And, just as you can see from my light-up box, your make doesn’t have to use any digital technology. Bake a cake, stitch loop art, restore a car — whatever you plan on making this month, make sure we see your creation! Have fun!

The post Make our light-up Raspberry Pi box for #MonthOfMaking appeared first on Raspberry Pi.

Handheld text-based adventure gaming with Quest Smith

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/handheld-text-based-adventure-gaming-with-quest-smith/

Play text-based adventure games that print out in real time, with Quest Smith: the Raspberry Pi Zero W–driven handheld gaming device from Bekir Dağ.

Quest Smith

Quest Smith is a raspberry pi zero driven thermal printing text based game. In each level, it gives you options to choose so every game is different than the other one.

Text-based adventure games

Today I learned:

Around 1975, Will Crowther, a programmer and an amateur caver, wrote the first text adventure game, Adventure (originally called ADVENT because a filename could only be six characters long in the operating system he was using, and later named Colossal Cave Adventure).

But I’m sure you already knew that.

According to the internet, text-based games in their most simple form are video games that use text instead of graphics to let players progress. You read the description of your surroundings and choose from a set of options, or you type in your next step and hope the game understands what you’re talking about.

Colossal Cave Adventure

We have a conversation going in our team right now about whether the term ‘text-based games’ is solely used for video games of this nature, or whether choose your own adventure books also fall into the category of text-based games. Leave your thoughts in the comments.

Anyway…

Quest Smith!

After encountering a similar handheld gaming device in a Berlin games museum, Bekir Dağ decided to build his own using a Raspberry Pi Zero W.

Quest Smith text-based game

For Quest Smith’s body, Bekir Dağ designed a 3D print, and he provides the STL files for free on Thingiverse. And for the inner workings?

A Raspberry Pi Zero W fits snugly into the body alongside a thermal printer, a battery, and various tactile buttons. The battery is powered by a solar panel mounted on the outer shell, and all components are connected to a TP4056 board that allows the battery to power the Pi.

Quest Smith text-based game

The Quest Smith software is still somewhat of a work-in-progress. While users can build Quest Smith today and start playing, Bekir has put out the call for the community to submit their own parts of the story.

Each level requires two versions of the story, which makes the possiblities grow exponentially. So it will be very difficult for me to finish a single story by myself. For the player to reach level 9, we will need to have 1023 story parts to be written. If you can help me with that, it would be amazing!

To see more of Quest Smith’s build process, find the files to make your own device, and instructions on how to contribute toward the story, visit the Quest Smith Hackster.io page.

More text-based adventuring with Python

If you’re interested in writing your own text-based adventure game in Python, we’ve got a free online course available in which you can learn about object-oriented programming while creating a text-based game. And for a briefer intro, check out Wireframe magazine issue 6, where game developer Andrew Gillett explains how to make a simple Python text adventure.

The post Handheld text-based adventure gaming with Quest Smith appeared first on Raspberry Pi.

IBM Q System One quantum computing on a Raspberry Pi?

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/ibm-q-system-one-quantum-computing-raspberry-pi/

IBM Q System One: the world’s first commercial, integrated, universal, approximate quantum computing system…

…on a Raspberry Pi?

What is a quantum computing system?

An excellent question and, while some of you may know the answer, here is Kurzgesagt‘s ‘in a nutshell’ explanation of quantum computing for the rest of us:

Quantum Computers Explained – Limits of Human Technology

Where are the limits of human technology? And can we somehow avoid them? This is where quantum computers become very interesting.

Qrasp — quantum computing on a Raspberry Pi

After seeing a press announcement for IBM’s Q System One, the first-ever commercial quantum computer, IBM Q Ambassador Hassi Norlen decided he wanted his own, and reached for his trusty Raspberry Pi to build one.

“This will not be easy,” he admits on his Medium blog post for the Qrasp project. “IBM Q System One is, after all, a cloud-based quantum computing offering, with the main hardware, cryostats, quantum chips, and all locked away in the IBM labs.”

Hassi goes on to explain the list of required ingredients for building your own Qrasp, including the Raspberry Pi Sense HAT, and the programs one can run on the finished device.

Qrasp

Qiskit interface for Raspberry PI with SenseHat

It’s a great blog post, and to save me summarising it here, check it out for yourself. You’ll also find a link to the GitHub repo for Qrasp, and other tidbits of information on making the most out of the final build.

The post IBM Q System One quantum computing on a Raspberry Pi? appeared first on Raspberry Pi.

Automatic Calling System using Raspberry Pi

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/automatic-calling-system-using-raspberry-pi/

If like me, you’re awful at remembering birthdays, you need Piyush Charpe’s Automatic Birthday Calling System. It’s the Raspberry Pi device that calls on your behalf – aka Heaven for Introverts.

Building business relationships through niceness

Piyush’s father works as an insurance adviser, and, because he’s a lovely chap, he makes it his mission to wish all of his clients a happy birthday. Nice, right? I hardly remember the birthdays of my closest friends: and here’s Piyush’s father sending his kindest regards to everyone on his client list.

Way to make me feel like a bad friend, Papa Charpe!

So good are Charpe Sr’s customer service skills that he’s unexpectedly built himself an unmanageable amount of birthday wishes to send. So that’s where his son comes in with his idea for an automatic birthday calling system. Huzzah! Take my money, etc. etc.

Automated calling with a Raspberry Pi

Piyush used a Raspberry Pi Zero W, 4G GSM module and Google Firebase for the system, alongside an audio recording of his father wishing a happy birthday, and some help from a friend with experience building Android apps.

Raspberry Pi automatic birthday caller

Acquiring a client list from his father that included names, dates of birth and telephone number (our GDPR manager is weeping into her compliance documents as she reads this), Piyush added the information to Google Firebase, an online real-time database system.

Raspberry Pi automatic birthday caller

The accompanying Android app allows his father to add and remove clients from the list, and updates him on successfully-made calls; it’ll also let him know who he’ll need to follow up with if they were unavailable to receive their birthday greeting.

Raspberry Pi automatic birthday caller
Raspberry Pi automatic birthday caller
Raspberry Pi automatic birthday caller

The system updates at midnight, consolidating a list to be called at 10am the following day. And, at the end of the month, the system’s call history is deleted automatically after sending it in CSV format to his father.

The system has now been working 24/7 for eight months, and has been adopted by other business owners in the area.

You can read more about the project here.

Put down your phone!

What a lovely use of technology with great scope for expansion. Why stop at birthdays? Do I remember my parents’ anniversary? Of course not. And don’t get me started on updating my nearest and dearest on life events, changing address, etc. This system is genius! Introverts need never talk to another human being again! Rejoice!

The post Automatic Calling System using Raspberry Pi appeared first on Raspberry Pi.

A smart guitar for blind, deaf, and mute people

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/smart-guitar-blind-deaf-mute/

ChordAssist aims to bring the joy of learning the guitar to those who otherwise may have problems with accessing guitar tutorials. Offering advice in Braille, in speech, and on-screen, ChordAssist has been built specifically for deaf, blind, and mute people. Creator Joe Birch, who also built the BrailleBox device, used Raspberry Pi, Google Assistant, and a variety of accessibility tools and technology for this accessible instrument.

Chord Assist: An accessible smart guitar for the blind, deaf and mute

Powered by the Google Assistant, read more at chordassist.com

Accessibility and music

Inspired by a hereditary visual impairment in his family, Buffer’s Android Lead Joe Birch spent six months working on ChordAssist, an accessible smart guitar.

The Braille converter of the ChordAssist guitar
The ChordAssist guitar
The screen of the ChordAssist guitar

“This is a project that I used to bring my love of music and accessibility (inspired by my family condition of retinitis pigmentosa) together to create something that could allow everyone to enjoy learning and playing music — currently an area which might not be accessible to all,” explained Joe when he shared his project on Twitter earlier this month.

BrailleBox

This isn’t Joe’s first step into the world of smart accessibility devices. In 2017, he created BrailleBox, an Android Things news delivery device that converts daily news stories into Braille, using wooden balls atop solenoids that move up and down to form Braille symbols.

Demonstration of Joe Birch's BrailleBox

ChordAssist

This same technology exists within ChordAssist, along with an LCD screen for visual learning, and a speaker system for text-to-speech conversion.

Chord Assist was already an Action on the Google Project that I built for the Google Home, now I wanted to take that and stick it in a guitar powered by voice, visuals, and Braille. All three of these together will hopefully help to reduce the friction that may be experienced throughout the process of learning an instrument.

ChordAssist is currently still at the prototype stage, and Joe invites everyone to offer feedback so he can make improvements.

To learn more about ChordAssist, visit the ChordAssist website and check out Joe’s write-up on Medium.

The post A smart guitar for blind, deaf, and mute people appeared first on Raspberry Pi.

Digital lava lamp!

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/digital-lava-lamp/

Forget the iconic conic shape of the lava lamp from the sixties and seventies — Julian Butler’s digital lava lamp gives you all the magic of its predecessor, without any of the hassle!

My programmable digital lava lamp

Showcasing the construction and display modes of my programmable digital lava lamp. Built with the help of Processing software, FadeCandy + Raspberry Pi hardware this lamp can respond to sound and other aspects of it’s environment via wifi etc.

I lava you (I lava you not)

When I was a teenager, we had a lava lamp at home. It was orange, it took an age to get going, and once the lava was in full flow, it radiated with the heat of a thousand suns.

Julian Butler’s modern version is so much better. “Showcasing the construction and display modes of [his] programmable digital lava lamp,” Julian has shared a rather hypnotic video on his YouTube channel. He’s also created a three-part build tutorial about the project.

Inspired by his co-worker’s salt mood lamp, Julian decided to build something similiar, aiming to smoothe out the creases and add more functionality.

Using a Raspberry Pi and Micah Elizabeth Scott‘s FadeCandy board, plus 120 NeoPixel LEDs, Julian got to work programming lights and prototyping casings until he was happy with the result.

The face of Julian happy with the result

And the result is a beautiful, programmable digital lava lamp: all the mesmerising fun of a regular lava lamp, without the excruciating wait time and significant risk of second-degree burns. Plus, it will never leak, and it can be any colour you like!

Get groovy, baby

Watch Julian’s video, ooh and aah at the swirly-whirly wonderment of his digital creation, and then visit his blog for all the details of how to make your own. Julian has plans to add more interactive elements to the lamp, including voice recognition, and we can’t wait to see the final result!

The post Digital lava lamp! appeared first on Raspberry Pi.

Play multiple sounds simultaneously with a Raspberry Pi

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/multiple-sounds-simultaneously-raspberry-pi/

Playing sound through a Raspberry Pi is a simple enough process. But what if you want to play multiple sounds through multiple speakers at the same time? Lucky for us, Devon Bray figured out how to do it.

Play multiple audio files simultaneously with Raspberry Pi

Artist’s Website: http://www.saradittrich.com/ Blog Post: http://www.esologic.com/multi-audio/ Ever wanted to have multiple different sound files playing on different output devices attached to a host computer? Say you’re writing a DJing application where you want one mix for headphones and one for the speakers.

Multiple audio files through multiple speakers

While working with artist Sara Dittrich on her These Blobs installation for Provincetown Art Association and Museum, Devon was faced with the challenge of playing “8 different mono sound files on 8 different loudspeakers”. Not an easy task, and one that most online tutorials simply do not cover.

These Blobs - Sarah Dittrich

These Blobs by Sara Dittrich

Turning to the sounddevice Python library for help, Devon got to work designing the hardware and code for the project.

The job was to create some kind of box that could play eight different audio files at the same time on eight different unpowered speakers. New audio files had to be able to be loaded via a USB thumb drive, enabling the user to easily switch files without having to use any sort of UI. Everything also had to be under five inches tall and super easy to power on and off.

Devon’s build uses a 12v 10 amp power supply controlled via a DC/DC converter. This supply powers the Raspberry Pi 3B+ and four $15 audio amplifiers, which in turn control simple non-powered speakers designed for use in laptops. As the sound is only required in mono, the four amplifiers can provide two audio tracks each, each track using a channel usually reserved for left or right audio output.

A full breakdown of the project can be seen in the video above, with more information available on Devon’s website, including the link to the GitHub repo.

And you can see the final project in action too! Watch a video of Sara Dittrich’s installation below, and find more of her work on her website.

These Blobs

Poem written and recorded by Daniel Sofaer, speakers, conduit, clay, spray paint, electrical components; 4′ x 4′ x 5′ ft.

 

The post Play multiple sounds simultaneously with a Raspberry Pi appeared first on Raspberry Pi.

Build a dial-up ISP server using a Raspberry Pi

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/raspberry-pi-dial-up-server/

Trying to connect an old, dial-up–compatible computer to modern-day broadband internet can be a chore. The new tutorial by Doge Microsystems walks you through the process of using a Raspberry Pi to bridge the gap.

The Sound of dial-up Internet

I was bored so I wanted to see if I could get free dial up internet so I found that NetZero still has free service so I put in the number and heard the glorious sound of the Dial-up. Remind me of years gone. Unfortunately I was not able to make a connection.

Dial-up internet

Ah, there really is nothing quite like it: listen to the sweet sound of dial-up internet in the video above and reminisce about the days of yore that you spent waiting for your computer to connect and trying to convince other members of your household to not use the landline for a few hours.

But older computers have fallen behind these times of ever faster broadband and ever more powerful processors, and getting your beloved vintage computer online isn’t as easy as it once was.

For one thing, does anyone even have a landline anymore?

Enter Doge Microsystems, who save the day with their Linux-based dial-up server, the perfect tool for connecting computers of yesteryear to today’s broadband using a Raspberry Pi.

Disclaimer: I’m going to pre-empt a specific topic of conversation in the comment section by declaring that, no, I don’t like the words ‘vintage’, ‘retro’, and yesteryear’ any more than you do. But we all need to accept that the times, they are a-changing, OK? We’re all in this together. Let’s continue.

Building a Raspberry Pi dial-in server

For the build, you’ll need a hardware modem — any model should work, as long as it presents as a serial device to the operating system. You’ll also need a Linux device such as a Raspberry Pi, a client device with a modem, and ‘some form of telephony connection to link the two modems’, described by Doge Microsystems as one of the following:

We need a way to connect our ISP modem to clients. There are many ways to approach this:

  • Use the actual PSTN (i.e. real phone lines)
  • Use a PBX to provide local connectivity
  • Build your own circuity (not covered here, as it would require extra configuration)
  • Build a fake PSTN using VoIP ATAs and a software PBX

I’ve gone with the fourth option. Here’s the breakdown:

  • Asterisk — a VoIP PBX — is configured on the dial-in server to accept connections from two SIP client accounts and route calls between them
  • A Linksys PAP2T ATA — which supports two phone lines — is set up as both of those SIP clients connected to the PBX
  • The ISP-side modem is connected to the first line, and the client device to the second line

Doge Microsystems explains how to set up everything, including the Linux device, on the wiki for the project. Have a look for yourself if you want to try out the dial-up server first-hand.

The sound of dial-up

For funsies, I asked our Twitter followers how they would write down the sound of a dial-up internet connection. Check them out.

Alex on Twitter

@Raspberry_Pi dialtone, (phone beeps), rachh racchh rachh rechhhhhhh reccchhhhhh rechhhh, DEE-DONG-DEE-DONG-DI, BachhhhhhhhhhhhBACHHHHBACHHHHHHHHHHHHHHHHHHHHHHHHH

The post Build a dial-up ISP server using a Raspberry Pi appeared first on Raspberry Pi.

Build your own Commodore PET model 8032

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/build-commodore-pet-model-8032/

Build a mini version of one of history’s most iconic personal computers with Lorenzo ‘Tin Cat’ Herrera and his Commodore PET Mini, which is based on the Commodore PET model 8032.

Commodore PET Mini Retrowave intro

3D Print your own Commodore PET Mini retro computer with a Raspberry Pi and Retropie for retro gaming or retro emulation. Fully documented DIY project: https://commodorepetmini.com The Commodore PET is one of the most iconic-looking computer of the 70’s, it reminds us of an era of frenetic innovation, harsh competition and bold design choices that shaped the computer industry as we know it today.

Commodore PET — a (very) brief history

Presented to the world in 1977, the Commodore PET represents a truly iconic piece of computer history: it was the first personal computer sold to the general public. With a built-in keyboard, screen, and cassette deck, and an introductory price of US$795 — roughly $3287 today — it offered everything a home computer user needed. And it beat the Apple II to market by a few months, despite Jobs and Wozniak offering to sell their Apple II technology to Commodore in September 1976.

Commodore PET model 8032

Commodore was also the first company to license Microsoft’s 6502 BASIC, and in the 1980s the Commodore became a staple in many school classrooms, bringing about a surge in the numbers of future computer engineers — a few of which now work in the Raspberry Pi Trading office.

The Commodore PET model was discontinued in 1982, then resurrected briefly in 1986, before finally stepping aside to make way for the popular Commodore 128, 1571, and 1581 models.

Redesigning a mini PET

Based on the Commodore PET model 8032, Lorenzo Herrera’s 3D-printable remake allows users to fit an entire computer — the Raspberry Pi — inside a miniature iconic shell. Lorenzo designed this case to house a working screen, and once you connect the Pi to a Bluetooth keyboard, your Commodore PET Mini will be fully functional as well as stylish and cute as a button.



You’ll need access to a 3D printer to build your own — all parts are listed on the project’s website. You can also purchase them as a kit directly from Lorenzo if you want to save time on sourcing your own.

3D-printing the Commodore PET

To build your own Commodore PET Mini, start by visiting its official website. And if you don’t own a 3D printer, search online for your nearest maker space or 3D printing service to get the parts made.

We’re definitely going to be building our own here at Raspberry Pi, and if you build one for yourself, or use a Raspberry Pi in any iconic computer rebuild, let us know.

The post Build your own Commodore PET model 8032 appeared first on Raspberry Pi.

Stereoscopic photography with StereoPi and a Raspberry Pi

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/stereoscopic-photography-stereopi-raspberry-pi/

StereoPi allows users to attached two Camera Modules to their Raspberry Pi Compute Module — it’s a great tool for building stereoscopic cameras, 360º monitors, and virtual reality rigs.

StereoPi draft 1

No Description

My love for stereoscopic photography goes way back

My great-uncle Eric was a keen stereoscopic photographer and member of The Stereoscopic Society. Every memory I have of visiting him includes looking at his latest stereo creations through a pair of gorgeously antique-looking, wooden viewers. And I’ve since inherited the beautiful mahogany viewing cabinet that used to stand in his dining room.

It looks like this, but fancier

Stereoscopic photography has always fascinated me. Two images that seem identical suddenly become, as if by magic, a three-dimensional wonder. As a child, I couldn’t make sense of it. And even now, while I do understand how it actually works, it remains magical in my mind — like fairies at the bottom of the garden. Or magnets.

So it’s no wonder that I was instantly taken with StereoPi when I stumbled across its crowdfunding campaign on Twitter. Having wanted to make a Pi-based stereoscopic camera ever since I joined the organisation, but not knowing how best to go about it, I thought this new board seemed ideal for me.

The StereoPi board

Despite its name, StereoPi is more than just a stereoscopic camera board. How to attach two Camera Modules to a Raspberry Pi is a question people ask us frequently and for various projects, from home security systems to robots, cameras, and VR.

Slim and standard editions of the StereoPi

Slim and standard editions of the StereoPi

The board attaches to any version of the Raspberry Pi Compute Module, including the newly released CM3+, and you can use it in conjunction with Raspbian to control it via the Python module picamera.

StereoPi stereoscopic livestream over 4G

StereoPi stereoscopic livestream over 4G. Project site: http://StereoPi.com

When it comes to what you can do with StereoPi, the possibilities are almost endless: mount two wide-angle lenses for 360º recording, build a VR rig to test out virtual reality games, or, as I plan to do, build a stereoscopic camera!

It’s on Crowd Supply now!

StereoPi is currently available to back on Crowd Supply, and purchase options start from $69. At 69% funded with 30 days still to go, we have faith that the StereoPi project will reach its goal and make its way into the world of impressive Raspberry Pi add-ons.

The post Stereoscopic photography with StereoPi and a Raspberry Pi appeared first on Raspberry Pi.

Monitoring insects at the Victoria and Albert Museum

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/monitoring-insects-at-the-victoria-and-albert-museum/

A simple Raspberry Pi camera setup is helping staff at the Victoria and Albert Museum track and identify insects that are threatening priceless exhibits.

“Fiacre, I need an image of bug infestation at the V&A!”

The problem with bugs

Bugs: there’s no escaping them. Whether it’s ants in your kitchen or cockroaches in your post-apocalyptic fallout shelter, insects have a habit of inconveniently infesting edifices, intent on damaging beloved belongings.

And museums are as likely as anywhere to be hit by creepy-crawly visitors. Especially when many of their exhibits are old and deliciously dusty. Yum!

Tracking insects at the V&A

As Bhavesh Shah and Maris Ines Carvalho state on the V&A blog, monitoring insect activity has become common practice at their workplace. As part of the Integrated Pest Monitoring (IPM) strategy at the museum, they even have trained staff members who inspect traps and report back their findings.

“But what if we could develop a system that gives more insight into the behaviour of insects and then use this information to prevent future outbreaks?” ask Shah and Carvalho.

The team spent around £50 on a Raspberry Pi and a 160° camera, and used these and Claude Pageau’s PI-TIMOLO software project to build an insect monitoring system. The system is now integrated into the museum, tracking insects and recording their movements — even in low-light conditions.

Emma Ormond, Raspberry Pi Trading Office Manager and Doctor of Bugs, believes this to be a Bristletail or Silverfish.

“The initial results were promising. Temperature, humidity, and light sensors could also be added to find out, for example, what time of day insects are more active or if they favour particular environmental conditions.”

For more information on the project, visit the Victoria & Albert Museum blog. And for more information on the Victoria & Albert Museum, visit the Victoria & Albert Museum, London — it’s delightful. We highly recommend attending their Videogames: Design/Play/Disrupt exhibition, which is running until 24 February.

The post Monitoring insects at the Victoria and Albert Museum appeared first on Raspberry Pi.

Building a text adventure | Wireframe #6

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/making-text-adventure-wireframe-6/

Game developer Andrew Gillett explains how to make a simple text adventure in Python — and what pitfalls to avoid while doing so — in the latest issue of Wireframe magazine, out now.

Writing games in BASIC

The first game I ever wrote was named Pooh. It had nothing to do with the bear. In September 1982, I was four years old, and the ZX Spectrum home computer had just been released. It was incredible enough that the Spectrum let you play games on the TV, but like most home computers of the time, it also came with a built-in language called BASIC, and a manual which explained how to program it. In my first game, Pooh (the title was a misspelling), the player controlled a baby, represented by a pound sign, and had to guide it to a potty, represented by the letter O. There were no obstacles, no enemies, and if you tried to walk off the screen, the program would stop with an error message. I didn’t have any idea how to create a graphical game more complex than Pooh. I didn’t even know how to display a sprite on the screen.

The Hobbit, released in 1982, was widely praised for its intuitive parser.

Text adventures

Instead, I focused on writing text adventures, where the game describes scenes to the player (“You are in a comfortable, tunnel-like hall. You can see a door,” from 1982’s The Hobbit) and the player enters commands such as “Go through door” or “Kill goblin with sword.” Although this type of game is comparatively easy to write, I implemented it in the worst way possible. The code was essentially a huge list of IF statements. Each room had its own set of code, which would print out a description of the room and then check to see what the player typed. This ‘hard-coding’ led to the code being much longer than necessary, and more difficult to maintain.

The correct way would have been to separate my code and data. Each room would have had several pieces of data associated with it, such as an ID number, the description of the room (“You are in a small cave”), an array of objects which can be found in the room, and an array of room numbers indicating where the player should end up if they try to move in a particular direction – for example, the first number could indicate which room to go to if the player enters ‘NORTH’. You’d then have the main game code which keeps track of the room the player is currently in, and looks up the data for that room. With that data, it can then take the appropriate action based on the command the player typed.

Getting it right

The code below shows how to implement the beginnings of a text adventure game in Python. Instead of numeric IDs and arrays, the code uses string IDs and dictionary data structures, where each piece of data is associated with an ID or ‘key’. This is a more convenient option which wasn’t available in Spectrum BASIC. We first create a list of directions in which the player can potentially move. We then create the class Location which specifies each location’s properties. We store a name, a description, and a dictionary data structure which stores the other locations that the current location is linked to. For example, if you go north from the woods, you’ll reach the lake. The class includes a method named addLink, which adds entries to the linked locations dictionary after checking that the specified direction and destination exist.

Following the class definition, we then create a dictionary named locations. This has two entries, with the keys being woods and lake, and the values being instances of the Location class. Next, we call the addLink method on each of the locations we’ve just created, so that the player will be able to walk between them. The final step of the setup phase is to create the variable currentLocation, specifying where the player will start the game.

We then reach the main game loop, which will repeat indefinitely. We first display the description of the current location, along with the available directions in which the player can move. Then we wait for the player to input a command. In this version of the code, the only valid commands are directions: for example, type ‘north’ at the starting location to go to the lake. When a direction is entered, we check to make sure it’s a valid direction from the current location, then update currentLocation to the new location. When the main loop restarts, the description of the new location is displayed.

I moved on from the ZX Spectrum eight years after my dad first unpacked it. Despite the poor design of my code, I’d learned the essentials of programming. Ten years later, I was a game developer.

Further reading

If you’re keen to learn more about making a text adventure in Python, you could check out Phillip Johnson’s guide to the subject, Make Your Own Python Text Adventure. The author has also written a condensed version of the same guide.

You may also be interested in our free online course Object-oriented Programming in Python: Create Your Own Adventure Game.

More from Wireframe

You can discover more tutorials, alongside great reviews, articles and advice, in Wireframe issue 6, out now and available in Tesco, WHSmith, and all good independent UK newsagents.

Or you can buy Wireframe directly from the Raspberry Pi Press store — worldwide delivery is available. And if you’d like to own a handy digital version of the magazine, you can also download the PDF for free.

The post Building a text adventure | Wireframe #6 appeared first on Raspberry Pi.

Upcycle a vintage TV with the Raspberry Pi TV HAT | The MagPi #78

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-78-upcycled-vintage-tv-hat/

When Martin Mander’s portable Hitachi television was manufactured in 1975, there were just three UK channels and you’d need to leave the comfort of your sofa in order to switch between them.

A page layout of the upcycled vintage television project using the Raspberry Pi TV HAT from The MagPi issue 78

Today, we have multiple viewing options and even a cool Raspberry Pi TV HAT that lets us enjoy DVB-T2 broadcasts via a suitable antenna. So what did nostalgia-nut Martin decide to do when he connected his newly purchased TV HAT to the Pi’s 40-pin GPIO header? Why, he stuck it in his old-fashioned TV set with a butt-busting rotary switch and limited the number of channels to those he could count on one hand – dubbing it “the 1982 experience” because he wanted to enjoy Channel 4 which was launched that year.

Going live

Martin is a dab hand at CRT television conversions (he’s created six since 2012, using monitors, photo frames, and neon signs to replace the displays). “For my latest project, I wanted to have some fun with the new HAT and see if I’d be able to easily display and control its TV streams on some of my converted televisions,” he says. It’s now being promoted to his office, for some background viewing as he works. “I had great fun getting the TV HAT streams working with the rotary dial,” he adds.

Raspberry Pi TV HAT

The project was made possible thanks to the new Raspberry Pi TV HAT

Although Martin jumped straight into the HAT without reading the instructions or connecting an aerial, he eventually followed the guide and found getting it up-and-running to be rather straightforward. He then decided to repurpose his Hitachi Pi project, which he’d already fitted with an 8-inch 4:3 screen.

Upcycled television using the Raspberry Pi TV HAT

The boards, screen, and switches installed inside the repurposed Hitachi television

“It’s powered by a Pi 3 and it already had the rotary dial set up and connected to the GPIO,” he explains. “This meant I could mess about with the TV HAT, but still fall back on the original project’s script if needed, with no hardware changes required.”

Change the channel

Indeed, Martin’s main task was to ensure he could switch channels using the rotary dial and this, he says, was easier to achieve than he expected. “When you go to watch a show from the Tvheadend web interface, it downloads an M3U playlist file for you which you can then open in VLC or another media player,” he says.

Upcycled television using the Raspberry Pi TV HAT

– The Hitachi television is fitted with a Pimoroni 8-inch 4:3 screen and a Raspberry Pi 3
– Programmes stream from a Pi 2 server and the channels are changed by turning the dial
– The name of the channel briefly appears at the bottom of the screen – the playlist files are edited in Notepad

“At first, I thought the playlist file was specific to the individual TV programme, as the show’s name is embedded in the file, but actually each playlist file is specific to the channel itself, so it meant I could download a set of playlists, one per channel, and store them in a folder to give me a full range of watching options.”

Sticking to his theme, he stored playlists for the four main channels of 1982 (BBC1, BBC2, ITV, and Channel 4) in a folder and renamed them channel1, channel2, channel3, and channel4.

Upcycled television using the Raspberry Pi TV HAT

A young Martin Mander decides the blank screen of his black and white Philips TX with six manual preset buttons is preferable to the shows (but he’d like to convert one of these in the future)

“Next, I created a script with an infinite loop that would look out for any action on the GPIO pin that was wired to the rotary dial,” he continues. “If the script detects that the switch has been moved, then it opens the first playlist file in VLC, full-screen. The next time the switch moves, the script loops around and adds ‘1’ to the playlist name, so that it will open the next one in the folder.”

Martin is now planning the next stage of the project, considering expanding the channel-changing script to include streams from his IP cameras, replacing a rechargeable speaker with a speaker HAT, and looking to make the original volume controls work with the Pi’s audio. “It been really satisfying to get this project working, and there are many possibilities ahead,” he says.

More from The MagPi magazine

The MagPi magazine issue 78 is out today. Buy your copy now from the Raspberry Pi Press store, major newsagents in the UK, or Barnes & Noble, Fry’s, or Micro Center in the US. Or, download your free PDF copy from The MagPi magazine website.

The MagPi magazine issue 78

Subscribe now

Subscribe to The MagPi magazine on a monthly, quarterly, or twelve-month basis to save money against newsstand prices!

Twelve-month print subscribers get a free Raspberry Pi 3A+, the perfect Raspberry Pi to try your hand at some of the latest projects covered in The MagPi magazine.

The post Upcycle a vintage TV with the Raspberry Pi TV HAT | The MagPi #78 appeared first on Raspberry Pi.