All posts by Rob Zwetsloot

Yuri 3 rover | The MagPi #82

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/yuri-3-rover-the-magpi-82/

In honour of the 50th anniversary of the Apollo moon landing, this year’s Pi Wars was space-themed. Visitors to the two-day event — held at the University of Cambridge in March — were lucky enough to witness a number of competitors and demonstration space-themed robots in action.

Yuri 3 rover

Among the most impressive was the Yuri 3 mini Mars rover, which was designed, lovingly crafted, and operated by Airbus engineer John Chinner. Fascinated by Yuri 3’s accuracy, we got John to give us the inside scoop.

Airbus ambassador

John is on the STEM Ambassador team at Airbus and has previously demonstrated its prototype ExoMars rover, Bridget (you can drool over images of this here: magpi.cc/btQnEw), including at the BBC Stargazing Live event in Leicester. Realising the impressive robot’s practical limitations in terms of taking it out and about to schools, John embarked on a smaller but highly faithful, easily transportable Mars rover. His robot-building experience began in his teens with a six-legged robot he took along to his technical engineering apprenticeship interview and had walk along the desk. Job deftly bagged, he’s been building robots ever since.

Inside the Yuri 3 Mars rover

Yuri is a combination of an Actobotics chassis based on one created by Beatty Robotics plus 3D-printed wheels and six 12 V DC brushed gears. Six Hitec servo motors operate the steering, while the entire rover has an original Raspberry Pi B+ at its heart.

Yuri 3 usually runs in ‘tank steer’ mode. Cannily, the positioning of four of its six wheels at the corners means Yuri 3’s wheels can each be turned so that it spins on the spot. It can also ‘crab’ to the side due to its individually steerable wheels.

Servo motors

The part more challenging for home users is the ‘gold thermal blanket’. The blanket ensures that the rover can maintain working temperature in the extreme conditions found on Mars. “I was very fortunate to have a bespoke blanket made by the team who make them for satellites,” says John. “They used it as a training exercise for the apprentices.”

John has made some bookmarks from the leftover thermal material which he gives away to schools to use as prizes.

Yuri 3 rover thermal blanket samples

Rover design

While designing Yuri 3, it probably helped that John was able to sneak peeks of Airbus’s ExoMars prototypes being tested at the firm’s Mars Yard. (He once snuck Yuri 3 onto the yard and gave it a test run, but that’s supposed to be a secret!) Also, says John, “I get to see the actual flight rover in its interplanetary bio clean room”.

A young girl inspects the Yuri 3 Mars rover

His involvement with all things Raspberry Pi came about when he was part of the Astro Pi programme, in which students send code to two Raspberry Pi devices aboard the International Space Station every year. “I did the shock, vibration, and EMC testing on the actual Astro Pi units in Airbus, Portsmouth,” John proudly tells us.

A very British rover

As part of the European Space Agency mission ExoMars, Airbus is building and integrating the rover in Stevenage. “What a fantastic opportunity for exciting outreach,” says John. “After all the fun with Tim Peake’s Principia mission, why not make the next British astronaut a Mars rover? … It is exciting to be able to go and visit Stevenage and see the prototype rovers testing on the Mars Yard.”

The Yuri 3 Mars rover

John also mentions that he’d love to see Yuri 3 put in an appearance at the Raspberry Pi Store; in the meantime, drooling punters will have to build their own Mars rover from similar kit. Or, we’ll just enjoy John’s footage of Yuri 3 in action and perhaps ask very nicely if he’ll bring Yuri along for a demonstration at an event or school near us.

John wrote about the first year of his experience building Yuri 3 on his blog. And you can follow the adventures of Yuri 3 over on Twitter: @Yuri_3_Rover.

Read the new issue of The MagPi

This article is from today’s brand-new issue of The MagPi, the official Raspberry Pi magazine. Buy it from all good newsagents, subscribe to pay less per issue and support our work, or download the free PDF to give it a try first.

Cover of The MagPi issue 82

The post Yuri 3 rover | The MagPi #82 appeared first on Raspberry Pi.

Raspberry Pi underwater camera drone | The MagPi 80

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/raspberry-pi-underwater-camera-drone-magpi-80/

Never let it be said that some makers won’t jump in at the deep end for their ambitious experiments with the Raspberry Pi. When Ievgenii Tkachenko fancied a challenge, he sought to go where few had gone before by creating an underwater drone, successfully producing a working prototype that he’s now hard at work refining.

Inspired by watching inventors on the Discovery Channel, Ievgenii has learned much from his endeavour. “For me it was a significant engineering challenge,” he says, and while he has ended up submerging himself within a process of trial-and-error, the results so far have been impressive.

Pi dive

The project began with a loose plan in Ievgenii’s head. “I knew what I should have in the project as a minimum: motions, lights, camera, and a gyroscope inside the device and smartphone control outside,” he explains. “Pretty simple, but I didn’t have a clue what equipment I would be able to use for the drone, and I was limited by finances.”

Bearing that in mind, one of his first moves was to choose a Raspberry Pi 3B, which he says was perfect for controlling the motors, diodes, and gyroscope while sending video streams from a camera and receiving commands from a control device.

The Raspberry Pi 3 sits in the housing and connects to a LiPo battery that also powers the LEDs and motors

“I was really surprised that this small board has a fully functional UNIX-based OS and that software like the Node.js server can be easily installed,” he tells us. “It has control input and output pins and there are a lot of libraries. With an Ethernet port and wireless LAN and a camera, it just felt plug-and-play. I couldn’t find a better solution.”

The LEDs are attached to radiators to prevent overheating, and a pulse driver is used for flashlight control

Working with a friend, Ievgenii sought to create suitable housing for the components, which included a twin twisted-pair wire suitable for transferring data underwater, an electric motor, an electronic speed control, an LED together with a pulse driver, and a battery. Four motors were attached to the outside of the housing, and efforts were made to ensure it was waterproof. Tests in a bath and out on a lake were conducted.

Streaming video

With a WiFi router on the shore connected to the Raspberry Pi via RJ45 connectors and an Ethernet cable, Ievgenii developed an Android application to connect to the Raspberry Pi by address and port (“as an Android developer, I’m used to working with the platform”). This also allowed movement to be controlled via the touchscreen, although he says a gamepad for Android can also be used. When it’s up and running, the Pi streams a video from the camera to the app — “live video streaming is not simple, and I spent a lot of time on the solution” — but the wired connection means the drone can only currently travel as far as the cable length allows.

The camera was placed in this transparent waterproof case attached to the front of the waterproof housing

In that sense, it’s not perfect. “It’s also hard to handle the drone, and it needs to be enhanced with an additional controls board and a few more electromotors for smooth movement,” Ievgenii admits. But as well as wanting to base the project on fast and reliable C++ code and make use of a USB 4K camera, he can see the future potential and he feels it will swim rather than sink.

“Similar drones are used for boat inspections, and they can also be used by rescue squads or for scientific purposes,” he points out. “They can be used to discover a vast marine world without training and risks too. In fact, now that I understand the Raspberry Pi, I know I can create almost anything, from a radio electronic toy car to a smart home.”

The MagPi magazine

This article was lovingly borrowed from the latest issue of The MagPi magazine. Pick up your copy of issue 80 from your local stockist, online, or by downloading the free PDF.

Subscribers to The MagPi also get a rather delightful subscription gift!

The post Raspberry Pi underwater camera drone | The MagPi 80 appeared first on Raspberry Pi.

Yoga training with YogAI and a Raspberry Pi smart mirror | The MagPi issue 80

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/yoga-training-with-yogai-and-a-raspberry-pi-smart-mirror-the-magpi-issue-80/

Running on a smart mirror, YogAI uses a database of postures, image recognition software, and the magic of mirrors to not only show users their current posture but to also teach them how to correct their posture to reach peak yogi-ness. Here’s Rob Zwetsloot from The MagPi magazine with more.

yogai

We’ve seen many ‘magic mirror’ projects over the past few years, featuring a TV screen behind the glass to show useful information, but YogAI takes the concept to a whole new level by providing an AI personal trainer to guide and correct your yoga positions.

Self-confessed fitness nuts Salma Mayorquin and Terry Rodriguez thought that having a personal trainer could be a way to keep track of their fitness progress, so why not try to make a virtual one? “With [deep learning] models like pose estimation, we figured there was a way we could make a program that could track how we were exercising and started experimenting from there,” says Terry.

“YogAI guides users through a flow of yoga poses, offering generally helpful advice when the camera senses a user not in the correct pose,” explains Salma. “At the heart, YogAI uses pose estimation to find reference key points on the body. This is used to understand and classify common yoga poses.”

Users interact with YogAI through both visual feedback via the mirror display, and a voice interface — using the Snips AIR voice assistant — which enables the user to give spoken commands to start, stop, pause, and restart a yoga session. YogAI also talks back through the Flite voice synthesiser to guide the yogi to achieve the correct poses.

While a prototype magic mirror only took the experienced makers a week to build, training the AI to recognise yoga poses in real time was a trickier task. “We need our computer vision models to run quickly so that we have enough resolution in time to identify the move,” reveals Terry.

Strike a pose

A Raspberry Pi 3 interprets the camera images in real time, detecting key body points to display the pose on the mirror and classify it using a deep-learning model trained with a dataset of around 35000 samples.

However, the pair found that the Pi could only run image inference at one frame every 4–5 seconds, resulting in lag. A workaround was soon found: “Shrinking our pose estimation models down using TensorFlow Lite, we were able to bring our frame rate from 0.2 fps to 2.5 fps,” says Salma. “For faster inference, we will look for ways to reduce the model further. We also believe upgrading to the Raspberry Pi Compute Module 3 will increase the performance significantly.”


“Overall, the accuracy across a dozen common poses is roughly 80%,” divulges Terry. “Not surprisingly, we find similar pose variants, e.g. warrior poses, can be a source of confusion. When the head/face is blocked, the pose estimates degrade, which impacts our classification of poses like downward dog.”

More intense exercise

As well as using the system for yoga, Salma and Terry are planning to adapt YogAI to monitor more energetic workouts. “We’re interested in strength training, and others have suggested dance and karate katas,” says Terry. “We think YogAI is well-positioned to perform more general health and personal wellness tasks.”

“We want to integrate with popular health wearables,” adds Salma. “A smart watch with an accelerometer and heart rate monitor can introduce a lot of important context to bring YogAI closer to our vision for a smart mirror yoga instructor and toward a personal wellness platform.”

More from The MagPi magazine

The MagPi magazine issue 80 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.

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 Yoga training with YogAI and a Raspberry Pi smart mirror | The MagPi issue 80 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.

MagPi 79: get making in March with #MonthOfMaking

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-79-monthofmaking/

Hi folks! Rob from The MagPi here. This month in issue 79 of The MagPi, we’re doing something a little different: we invite all of you (yes, you!) to join us in the #MonthOfMaking.

Learn more about the #MonthOfMaking inside issue 79!

#MonthOfMaking

What does this mean? Well, throughout March, we want you to post pictures of your works-in-progress and completed projects on Twitter with the hashtag #MonthOfMaking.

#MonthOfMaking

As well as showing off the cool stuff you’re creating, we also want you to feel comfortable to ask for help with projects, and to share top tips for those that might be struggling.

If you’re not sure where to start, we’ve put together a massive feature in issue 79 of The MagPi, out now, to help you decide. On top of various project ideas for different skill levels, our feature includes some essential resources to look at, as well as inspirational YouTubers to follow, and some competitions you might want to take part in!

So, go forth and make! I’m really looking forward to seeing what you all get up to during this inaugural #MonthOfMaking!

Get The MagPi 79

You can get The MagPi 79 from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. You can also get the issue online: check it out on our store, or digitally via our Android or iOS apps. And don’t forget, there’s always the free PDF.

Free Raspberry Pi 3A+ offer!

We’re still running our super special Raspberry Pi 3A+ subscription offer! If you subscribe to twelve months of The MagPi, you’ll get a Raspberry Pi 3A+ completely free while stocks last. Make sure to check out our other subs offers while you’re there, like three issues for £5, and our rolling monthly subscription.

Get a 3A+ completely free while stocks last!

The post MagPi 79: get making in March with #MonthOfMaking 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.

MagPi 77: Make with code

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-77/

Hey folks, Rob from The MagPi here! Before I head off on my Christmas holidays, I want to introduce you to The MagPi 77, where we teach you how to make with code.

Making made fun! See what we did there?

What do we mean by that? Well, using code to make things – whether that’s scripts, programs, or games on your Pi, or whether you’re controlling LEDs with code, or robots, or massive Rube Goldberg machines. In this feature, we show new Pi users how to get started making practical applications with Python, and hopefully you’ll be inspired to go on and do something special.

Can you make… with code?

Accessories make the Pi

Want to power up your Raspberry Pi with a few extras? We’ve put together a guide to the 20 best Raspberry Pi accessories, covering IoT, robots, media, power solutions, and even industrial add-ons. There’s a lot of stuff you can do with your Pi, and even more if you’ve got the right tool to help.

We have the best accessories for you

More, you say?

Still need more reasons to grab a copy? Well, we have a tutorial on how to make a smart door, we continue developing Pac-Man while checking out the Picade Console, and we have plenty of amazing project showcases like the SelfieBot!


Get The MagPi 77

You can get The MagPi 77 from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. You can also get the issue online: check it out on our store, or digitally via our Android or iOS apps. And don’t forget, there’s always the free PDF.

Free Raspberry Pi 3A+ offer!

We’re still running our super special Raspberry Pi 3A+ subscription offer! If you subscribe to twelve months of The MagPi, you’ll get a Raspberry Pi 3A+ completely free while stocks last. Make sure to check out our other subs offers while you’re there, like three issues for £5, and our rolling monthly sub.

Get a 3A+ completely free while stocks last!

Right, happy holidays, folks! See you all in the New Year!

The post MagPi 77: Make with code appeared first on Raspberry Pi.

The Raspberry Pi Beginner’s Guide is out now (and it’s huge!)

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/raspberry-pi-beginners-guide/

The Raspberry Pi Press has been hard at work of late, producing new issues of The MagPi, HackSpace magazine, and our latest publication, Wireframe. But that hasn’t slowed us down, and this week, we’re pleased to announce the release of The Official Raspberry Pi Beginner’s Guide, a 244-page book that will help get you well on your way to Raspberry Pi domination.

The Official Raspberry Pi Beginner's Guide front cover

The Official Raspberry Pi Beginner’s Guide

We’ve roped in Gareth Halfacree, full-time technology journalist and technical author, and the wonderful Sam Alder, illustrator of our incredible cartoons and animations, to put together the only guide you need to help you get started with the Raspberry Pi.

inside the Raspberry Pi Beginner's Guide

From setting up your Raspberry Pi on day 1, to taking your first steps into writing coding, digital making, and computing, The Official Raspberry Beginner’s Guide is great for users from age 7 to 107! It’s available now in the Raspberry Pi Press store, with free international delivery.

inside the Raspberry Pi Beginner's Guide

As always, we have also released the guide as a free PDF, and you’ll soon be seeing physical copies on the shelves of Waterstones, Foyles, and other good bookshops.

Code Club Book of Scratch

And that’s not all! This week we also launched the brand-new Code Club Book of Scratch, the first-ever print publication from the team at Code Club.

Code Club Book of Scratch Volume 1

You can learn more about the book on the Code Club blog, and you’ll also find it in the Raspberry Pi Press store, and in bookstores alongside The Raspberry Pi Beginner’s Guide. You can download the free PDF here, but the print version of the Code Club Book of Scratch is rather special. As well as being stuffed full of amazing Scratch projects to try down at your local Code Club, it also comes with magic glasses that reveal secret hints in some of the guides. It’s spiral bound, so it always lays flat, and there are 24 exclusive Code Club stickers as well! The pictures here don’t really do it justice – it’s a wonderful book, even if I am a bit biased.

The post The Raspberry Pi Beginner’s Guide is out now (and it’s huge!) appeared first on Raspberry Pi.

MagPi 76: our updated Raspberry Pi Superguide!

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-76/

Hi folks, Rob from The MagPi here! The holiday season will soon be upon us, and that means a lot of Raspberry Pis will be given as gifts. For all these new Pi users, we thought it was time to update our beginners’ guide for 2019 in issue 76 of The MagPi, out now!

And yes, this includes the brand-new 3A+.

Look, up on the magazine rack!

Is it a bird? A plane? No, it’s Superguide!

In this Superguide, we’ll take you through the initial setup of the Pi, we’ll help you familiarise yourself with it, and we’ll even show you a couple of fun Pi projects to get started with! Whether you’re a complete newbie to Raspberry Pi or you want need a little refresher, our guide has got you covered.

Superb

3A+ subscription offer!

Speaking of the Raspberry Pi 3A+, we have a full feature on the fresh addition to the Raspberry Pi family, including all the juicy benchmarks, stats, and info you’d ever want to know. There’s even an interview with Eben Upton and Roger Thornton about its development!

In fact, we love the 3A+ so much that we’re offering a brand-new, limited-time subscription offer: sign up for a twelve-month print subscription of The MagPi now, and you’ll get a Raspberry Pi 3A+ completely free!

Hurry though, this offer only runs as long as stocks last.

Be quick, this offer won’t be around forever!

Heads, Pac-Man, and Christmas lights

Of course, there also are amazing projects, guides, and reviews in this issue. This includes As We Are, a mesmerising art project that displays people’s faces on a 14-foot tall screen shaped like a head. We also show you how to start making Pac-Man in our monthly Pygame tutorial, and our smart lights guide has a bit of a festive flair to it.


Get The MagPi 76

You can get The MagPi 76 from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. You can also get the issue online: check it out on our store, or digitally via our Android or iOS apps. And don’t forget, there’s always the free PDF.

Rolling subscription offer!

Want to support the Raspberry Pi Foundation and the magazine? As well as the subscription mentioned above, you can now take out a monthly £5 subscription to the magazine, effectively creating a rolling pre‑order system that saves you money on each issue.

The MagPi subscription offer — The MagPi 75

That’s it for now! I’ll see you next time around Christmas.

 

The post MagPi 76: our updated Raspberry Pi Superguide! appeared first on Raspberry Pi.

Can’t Drive This, the 4D arcade machine

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/4d-arcade-machine/

A Raspberry Pi–powered arcade display with hidden interactive controls won over the crowds at Gamescom. Rosie Hattersley and Rob Zwetsloot got the inside scoop.

Pixel Maniacs is a Nuremberg-based games maker that started out making mobile apps. These days it specialises in games for PC, Xbox One, PlayStation, and Nintendo Switch. You Can’t Drive is its first foray into gaming with a Raspberry Pi.

If you’re going to add a little something extra to wow the crowd at the Gamescom video games trade fair, a Raspberry Pi is a surefire way of getting you noticed. And that’s the way Pixel Maniacs went about it.

The Nuremberg-based games developer retrofitted an arcade machine with a Raspberry Pi to showcase its intentionally silly Can’t Drive This precarious driving game at Gamescom.

This two-player co-operative game involves one player building the track while the other drives along it.

Complete with wrecking balls, explosions, an inconvenient number of walls, and the jeopardy of having to construct your road as you negotiate your way, at speed, across an ocean to the relative safety of the next lump of land, Can’t Drive This is a fast‑paced racing game.

Splash action

Pixel Maniacs then took things up a notch by providing interactive elements, building a mock 4D arcade game (so-named because they feature interactive elements such as motion cabinets). The fourth dimension, in this case, saw the inclusion of a water spray, fan, and console lights. For its Gamescom debut, Pixel Maniacs presented Can’t Drive This in a retro arcade cabinet, where hordes of gaming fans gathered round its four-way split screen to enjoy the action.

Getting to the heart of the matter and replacing the original 1980s kit with modern-day processors and Pi-powered additions

Adding Raspberry Pi gaming to the mix was about aiding the game development process as much as anything. Andy Holtz, Pixel Maniacs’ software engineer, told The MagPi that the team wanted an LED matrix with 256 RGB LEDs to render sprite-sheet animations. “We knew we needed a powerful machine with enough RAM, and a huge community, to get the scripts running.”

Pixel Maniacs’ offices have several Raspberry Pi–controlled monitors and a soundboard, so the team knew the Pi’s potential.

The schematic for the 4D arcade machine, showing the importance of the Raspberry Pi as a controller.

The arcade version of the game runs off a gaming laptop cunningly hidden within the walls of the cabinet, while the Raspberry Pi delivers the game’s surprise elements such as an unexpected blast from a water spray. A fan can be triggered to simulate stormy weather, and lights start flashing crazily when the cars crash. Holtz explains that the laptop “constantly sends information about the game’s state to the Raspberry Pi, via a USB UART controller. The Pi reads these state messages, converts them, and sends according commands to the fans, water nozzle, camera, and the LED light matrix. So when players drive through water, the PC sends the info to the Pi, and [the latter] turns on the nozzle, spraying them.”

Having played your heart out, you get a photo-booth-style shot of you in full-on gaming action.

The arcade idea came about when Pixel Maniacs visited the offices of German gaming magazine M! Games and spied an abandoned, out-of-order 1980s arcade machine lurking unloved in a corner. Pixel Maniacs set about rejuvenating it, Da Doo Ron Ron soundtrack and all.

Sustained action

Ideas are one thing; standing up to the rigours of a full weekend’s uninterrupted gameplay at the world’s biggest games meet is something else. Holtz tells us, “The Raspberry Pi performed like a beast throughout the entire time. Gamescom was open from 9am till 8pm, so it had to run for eleven hours straight, without overheating or crashing. Fortunately, it did. None of the peripherals connected to the Pi had any problems, and we did not have a single crash.”

A Raspberry Pi 3B+ was used to trigger the water spray, lights, and fans, bringing an extra element to the gameplay, as well as rendering the arcade machine’s graphics.

Fans were enthusiastic too, with uniformly positive feedback, and one Gamescom attendee attempting to buy the arcade version there and then. As Andy Holtz says, though, you don’t sell your baby. Instead, Pixel Maniacs is demoing it at games conventions in Germany this autumn, before launching Can’t Drive This across gaming platforms at the end of the year.

This article was printed in The MagPi issue 75. Get your copy of The MagPi in stores now, or download it as a free PDF here.

The post Can’t Drive This, the 4D arcade machine appeared first on Raspberry Pi.

Brand-new books from The MagPi and HackSpace magazine

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/book-of-making-1-magpi-projects-book-4/

Hey folks, Rob from The MagPi here! Halloween is over and November has just begun, which means CHRISTMAS IS ALMOST HERE! It’s never too early to think about Christmas — I start in September, the moment mince pies hit shelves.

Elf GIF

What most people seem to dread about Christmas is finding the right gifts, so I’m here to help you out. We’ve just released two new books: our Official Raspberry Pi Projects Book volume 4, and the brand-new Book of Making volume 1 from the team at HackSpace magazine!

Book of Making volume 1

HackSpace magazine book 1 - Raspberry Pi

Spoiler alert: it’s a book full of making

The Book of Making volume 1 contains 50 of the very best projects from HackSpace magazine, including awesome project showcases and amazing guides for building your own incredible creations. Expect to encounter trebuchets, custom drones, a homemade tandoori oven, and much more! And yes, there are some choice Raspberry Pi projects as well.

The Official Raspberry Pi Projects Book volume 4

The MagPi Raspberry pi Projects book 4

More projects, more guides, and more reviews!

Volume 4 of the Official Raspberry Pi Projects Book is once again jam-packed with Raspberry Pi goodness in its 200 pages, with projects, build guides, reviews, and a little refresher for beginners to the world of Raspberry Pi. Whether you’re new to Pi or have every single model, there’s something in there for you, no matter your skill level.

Free shipping? Worldwide??

You can buy the Book of Making and the Official Raspberry Pi Projects Book volume 4 right now from the Raspberry Pi Press Store, and here’s the best part: they both have free worldwide shipping! They also roll up pretty neatly, in case you want to slot them into someone’s Christmas stocking. And you can also find them at our usual newsagents.

Both books are available as free PDF downloads, so you can try before you buy. When you purchase any of our publications, you contribute toward the hard work of the Raspberry Pi Foundation, so why not double your giving this holiday season by helping us put the power of digital making into the hands of people all over the world?

Anyway, that’s it for now — I’m off for more mince pies!

The post Brand-new books from The MagPi and HackSpace magazine appeared first on Raspberry Pi.

MagPi 75: 75 greatest projects, chosen by you

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-75-greatest-projects/

Hi folks, Rob from The MagPi here! A few weeks ago, we asked you to vote on your top 50 favourite Raspberry Pi projects from the last two-or-so years. We had thousands of responses, but there was one clear winner…and you can find out who that was in issue 75 of The MagPi, out tomorrow in stores, and available today online!

MagPi 75 Raspberry Pi magazine front cover

See who you folks voted for…

You heard right, the magazine is available a day early to download and buy online! Don’t say we never spoil you.

The community has voted

As well as counting down your 50 favourites, we’ve also got 25 other amazing projects selected by Eben Upton, Philip Colligan, Carrie Anne Philbin, and others!* Is your favourite project on the list?

MagPi 75 Raspberry Pi magazine

We don’t want to spoil the surprise — you’ll have to get the magazine to read the whole thing!

And there’s so much more!

On top of community favourites, we bring you a lot more in issue 75. This month we have a big feature on using the Raspberry Pi Camera Module, we show you ten of our favourite starter kits, and we also have a guide on building a secret radio chat device.

MagPi 75 Raspberry Pi magazine

Want to use the new Raspberry Pi TV HAT? We show you how.

All this along with news, reviews, community features, and competitions!

MagPi 75 Raspberry Pi magazine

See what we saw at Maker Faire New York!

Get The MagPi 75

You can get The MagPi 75 tomorrow from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. However, you can get the new issue online today! Check it out on our store, or digitally via our Android or iOS apps. And don’t forget, there’s always the free PDF.

Rolling subscription offer!

Want to support the Raspberry Pi Foundation and the magazine? You can now take out a monthly £5 subscription to the magazine, effectively creating a rolling pre‑order system that saves you money on each issue.

The MagPi subscription offer — The MagPi 75

You can also take out a twelve-month print subscription and get a Pi Zero W plus case and adapter cables absolutely free! This offer does not currently have an end date.

Thanks for sticking with The MagPi for 75 issues! Here’s to hundreds more.

*Oi, Zwetsloot, why wasn’t I asked?! – Alex

The post MagPi 75: 75 greatest projects, chosen by you appeared first on Raspberry Pi.

Explore the depths with the PiCam Marine

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/picam-marine/

This article from The MagPi issue 74 highlights the use of the Raspberry Pi Zero to build a marine camera for coral exploration. Get your copy of The MagPi in stores now, or download it as a free PDF here.

Raspberry Pi Picam Marine

The crew took 20 000 photos in total during the cruise.

Ecologists in Germany are deploying camera-equipped Pi Zero Ws off the coast of Norway to discover more about coral activity. Dr Autun Purser works in the Deep Sea Ecology and Technology group of the Alfred Wegener Institute. The group has a keen interest in cold-water corals, which are found in most European seas.

Raspberry Pi Picam Marine

Besides coral, they identified dozens of crabs.

“In the last three decades, we’ve started to understand these can form reefs whenever conditions are suitable for growth,” explains Autun. “During our cruise in the Skagerrak, we intended to map corals and see when, and under what conditions, they did most feeding.”

Feeding time

Their aim was to continue the development of “cheap camera systems which can be used for a range of applications in the deep sea, down to depths of at least 6000 metres. We investigated the use of Pi Zero W computers and [Raspberry Pi Camera Modules] to record video snippets of both the seafloor and any scientific devices that we place underwater, and we found the small size of the computers to be of great benefit to us.”

Raspberry Pi Picam Marine

The PiCam Marines are sent underwater in the deployment basket of a submarine. The captain, crew, and scientists aboard RV Poseidon cruise POS526 were also essential for the initial deployments.

The Pi Zero Ws and cameras are placed in strong, waterproof pressure containers, and powered by Li-ion batteries that can withstand the cold deep ocean conditions. “The WiFi connectivity allowed us to set up a router on deck to both initiate our cameras and, on retrieval from the sea-floor, download our collected images without having to reopen the pressure housings,” reveals Autun.


He and two colleagues programmed the camera system using Python 3 to turn on an LED light and take a maximum resolution image, at set times. It has proven “capable of imaging individual corals from 2 m distance, allowing us to tell if the tentacles were actively extended or not.”

The post Explore the depths with the PiCam Marine appeared first on Raspberry Pi.

MagPi 74: Build a Raspberry Pi laptop!

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-74-build-a-raspberry-pi-laptop/

Hey folks! Rob from The MagPi here with the good news that a brand new issue is out today, with a slightly new look. The MagPi 74 shows you how to build a Pi‑powered laptop, and gives tips on how to recycle an old laptop to use with Pi.

magpi 74

The laptop is not spooky, but the Halloween projects definitely are

We’ve got a pretty simple, tiny laptop build that you can follow along with, which will easily slip into your pocket once it’s completed. We also cover the basic Raspberry Pi Desktop experience, in case you fancy installing the x86 version to bring new life to an old laptop.

Welcome, foolish mortals…

I’m also very happy to announce that The MagPi Halloween projects feature is back this year! Put together by yours truly, Haunted Halloween Hacks should get you in the mood for the spookiest time of the year. October is the only month of the year that I’m allowed to make puns, so prepare yourself for some ghastly groaners.

magpi 74

Rob has unleashed his awful alliteration skills this issue, with some putrid puns

Still want more?

On top of all that, you can find more fantastic guides on making games in Python and in C/C++, along with our brand new Quickstart guide, a review of the latest Picade, and more inspiring projects than you can shake a Pi Zero at.

Qwerty the fish keeps this garden growing

magpi 74

Start making a Space Invaders clone with Pygame!

Get The MagPi 74

You can get The MagPi 74 today from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. You can also get the new issue online from our store, or digitally via our Android or iOS apps. And don’t forget, there’s always the free PDF as well.

Rolling subscription offer!

Want to support the Raspberry Pi Foundation and the magazine? You can now take out a monthly £5 subscription to the magazine, effectively creating a rolling pre‑order system that saves you money on each issue.

The MagPi subscription offer — The MagPi 74

You can also take out a twelve-month print subscription and get a Pi Zero W plus case and adapter cables absolutely free! This offer does not currently have an end date.

We need you!

Issue 75 is next month, and we’re planning to showcase 75 amazing Raspberry Pi projects! We need your help to vote for the top 50, so please head to the voting page and choose your favourite project. Click on a project name to cast your vote for that project.

That’s it for now! Oh, and if you make any Raspberry Pi Halloween projects this year, send them to us on Twitter or via email.

The post MagPi 74: Build a Raspberry Pi laptop! appeared first on Raspberry Pi.

Vote for your 50 favourite projects!

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/vote-for-your-favourite-projects/

Hi folks, Rob from The MagPi here. While we’re working on the next issue of The MagPi, we’re very aware that we’re almost at issue 75!

Rob didn’t give Alex an image to put here so she made one

To celebrate this milestone, we’re doing another countdown of projects. We ranked 50 projects for issue 50 of The MagPi, and this time we’re ranking 75 of the greatest Raspberry Pi projects — and we need your help to do that!

Vote for your favourite

You folks in the community never stop amazing us with the things you make, so our list will be full of the outstanding projects you’ve made since we released issue 50 for October 2016! Like last time, you can vote for your favourites, but we’re upping the ante: we want you to choose the top 50 projects from the list of 75 we’ve compiled.

Want to know more about the projects? Visit our blog post detailing all the options.

Make sure to choose your favourites before Tuesday 2 October!

Note: There is a poll embedded within this post, please visit the site to participate in this post’s poll.

The post Vote for your 50 favourite projects! appeared first on Raspberry Pi.

MagPi 73: make a video game!

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-73-make-video-game/

Hi folks, Rob from The MagPi here! As far back as I can remember, I always wanted to learn to code to make a video game. I’m technically working on one right now! It’s wildly behind my self-imposed schedule, though. If you too wish to learn how to make games, then check out issue 73 of The MagPi, out today!

The MagPi 73

Make video games in the latest issue of The MagPi!

Let’s play a game

There are many classifications of video games these days, and many tools to help make it easy. We take you through making a purely narrative experience on Twine, up to programming a simple 8-bit game for Pico-8 in this month’s main feature. Don’t forget our ongoing series on how to make games in C/C++ and Pygame as well!

The MagPi 73

Make games today on your Pi!

Boost your home security

If making games aren’t quite your thing, then we also have a feature for our more serious-sided readers on how to secure your home using a Raspberry Pi. We show you how to set up a CCTV camera, an IoT doorbell, and a door security monitor too.

Home security made easy with a Raspberry Pi

Maker Faire Tokyo

We also have a bumper five pages on Maker Faire Tokyo and the Japanese Raspberry Pi community! I went out there earlier this month and managed to drag myself away from the Gundam Base and the Mandarake in Akihabara long enough to see some of the incredible and inventive things Japanese makers had created.

The MagPi 73

See our report from Maker Faire Tokyo!

All of this along with our usual selection of tutorials, projects, and reviews? We spoil you.

The MagPi 73

Amazing projects to inspire!

Get The MagPi 73

You can get The MagPi 72 today from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. You can also get the new issue online from our store, or digitally via our Android or iOS apps. And don’t forget, there’s always the free PDF as well.

Rolling subscription offer!

Want to support the Raspberry Pi Foundation and the magazine? You can now take out a monthly £5 subscription to the magazine, effectively creating a rolling pre-order system that saves you money on each issue.

The MagPi subscription offer — The MagPi 73

You can also take out a twelve-month print subscription and get a Pi Zero W plus case and adapter cables absolutely free! This offer does not currently have an end date.

That’s it for now, see ya real soon!

Edit: I’m sure he’ll run out of Star Trek GIFs eventually – Alex

The post MagPi 73: make a video game! appeared first on Raspberry Pi.

MagPi 72: AI made easy for your Raspberry Pi

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-72/

Hi folks, Rob from The MagPi here! With AI currently a hot topic in hobby tech, we thought we’d demystify it for you and your Raspberry Pi in The MagPi 72, out now!

AI made easy, in issue 72 of The MagPi!

The MagPi 72

AI made easy covers several types of current AI and machine learning tech that you, as a hobbyist and consumer, can get your hands on and use with your Pi. Many companies offer voice and image recognition services that work with the help of machine learning, and it’s actually pretty easy to get started with these.



We asked several AI experts to help us out with this, and we cover robot automation, getting the details of an image, and offline voice recognition. We promise it’s Skynet-safe.

Make sweet music

Want to make music? Then follow our guide to create your own Raspberry Pi–powered recording studio — all you need to bring to the table is your own musical talent.


We’ve also got some great tutorials on how to make a mini magic mirror and hack Minecraft Pi with Mathematica, along with some fantastic project showcases such as the squirrel cafe and a ghost detector.



Still not satisfied? Then check out our reviews and community segments — there’s a lot of excellent stuff to read about this issue.

Get The MagPi 72

You can get The MagPi 72 today from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. You can also get the new issue online from our store, or digitally via our Android or iOS apps. And don’t forget, there’s always the free PDF as well.

Rolling subscription offer!

Want to support the Raspberry Pi Foundation and the magazine? You can now take out a monthly £5 subscription to the magazine, effectively creating a rolling pre-order system that saves you money on each issue.

The MagPi subscription offer — The Magpi 72 - AI Raspberry Pi

You can also take out a twelve-month print subscription and get a Pi Zero W plus case and adapter cables absolutely free! This offer does not currently have an end date.

See you next month!

The post MagPi 72: AI made easy for your Raspberry Pi appeared first on Raspberry Pi.

Build an oscilloscope using Raspberry Pi and Arduino

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/build-oscilloscope-raspberry-pi-arduino/

In this tutorial from The MagPi issue 71Mike Cook takes us through the process of building an oscilloscope using a Raspberry Pi and an Arduino. Get your copy of The MagPi in stores now, or download it as a free PDF here.

The oscilloscope is on the wish list of anyone starting out with electronics. Your author used to tell his students that it was your eyes, making electricity visible. Unfortunately, they are quite expensive: from a few hundred pounds to up to £5000 and beyond. However, by using an Arduino and some software on the Raspberry Pi, you can make a passable beginner’s oscilloscope.

Raspberry Pi Arduino oscilloscope magPi 71

Last September, in The MagPi #61, there was an article outlining the way the Raspberry Pi and the Arduino could be used together. We at the Bakery have been doing this for some time: we first had a major project in the Raspberry Pi Projects books by Andrew Robinson and Mike Cook. The big advantage of the Arduino from a signal processing point of view is that there is minimal interruption from the operating system and you can gather data at a constant uninterrupted rate. This is just what we need for making an oscilloscope. The idea is that the Arduino gathers a whole heap of voltage samples as fast as it can and stores it in memory. It then transfers that memory to the Raspberry Pi, again as fast as possible. The Pi plots the data and displays it, then the software allows measurements to be made on the samples.

So you can measure the time and voltage difference, known as a delta, between any two points on the samples. You can even display the frequency that the ‘time delta’ corresponds to by taking its reciprocal. These are features found in expensive oscilloscopes. We have also built in a trigger function; this is to synchronise the onset of the rapid data gathering with the occurrence of a positive transition on the input signal through a specified voltage. The result is that regular waveforms can look stable on the display.

The hardware

The schematic of the Arduino data acquisition module is shown in Figure 1.

Raspberry Pi Arduino oscilloscope magPi 71

Figure 1: Schematic of the Arduino acquisition module

You will notice that it is quite simple. It consists of three potentiometers for the oscilloscope’s controls and an AC coupled biased voltage input.

The capacitor ensures that no DC components from the input get through and gives a modicum of protection against overvoltage. The reference voltage, or ground, is similarly biased as +2.5V above the Pi’s ground level.

The use of a BNC socket for the input ensures that you can use this with proper oscilloscope probe leads; these normally have an X10 switchable attenuator fitted, thus allowing voltages of +/- 25V to be measured. Full construction details can be found in the numbered steps.

Raspberry Pi Arduino oscilloscope magPi 71

The BNC socket has a flat on each side of the thread to prevent it rotating with the twisting force it will be subjected to upon connecting any probe. We did this by first drilling an 8mm hole for the flats and then enlarging the hole with a circular file on each side to allow it to fit. An 8×12mm hole was filed opposite the USB connecter to allow access.

Arduino software

The software, or sketch, you need to put into the Arduino is shown in the Gather_A0.ino listing, and is quite simple. Normally an Arduino of this type will take samples at a rate of 10 000 per second — or as we say, a 10k sample rate. This is not too good for an oscilloscope, but we can increase this sample rate by speeding up the A/D converter’s clock speed from the default rate. It does not appear to affect the reading accuracy too much. By making this change, we can speed up the sample rate to 58k. This is much better and allows useful measurements to be made in the audio range.

Raspberry Pi Arduino oscilloscope magPi 71

We used an Arduino Nano and soldered the header pins to it. Then we took a 14 hole by 19 strips piece of stripboard and drilled some holes to fix it to the base of the box. You might want to make this longer than 19 strips if you are not using surface-mount resistors on the underside. Fit header sockets to the stripboard and break the tracks on the underside between the two rows.

So, first, the trigger function is optionally called and then the samples are gathered in and sent to the Pi. The trigger function has a time-out that means it will trigger anyway after one second, whether it sees a transition on the input signal or not. Then the three pots are measured and also sent to the Pi. Note here that the samples are ten bits wide and so have to be sent as two bytes that get joined together again in the Pi’s software.

Also note the use of the double read for the pots, with a bit of code between each. This ensures a more stable reading, as the input capacitor of the Arduino’s sample and hold circuit needs time to charge up, and it has less time than normal to do this due to the speeding up of the D/A. It does not affect the waveform samples too much, as in most waveforms one sample voltage is close to the previous one.

Raspberry Pi Arduino oscilloscope magPi 71

We then drilled three holes for the pots, and added the small slots for the anti-rotation lugs. Then we fitted the pots and wired them up using the diagram above. This is the view from inside the lid of the box; if you’re worried about touching the side of the box with your soldering iron, consider soldering them before attaching them to the box.

At the end of the transfer, the Arduino sits in a loop waiting for an acknowledge byte from the Pi so it can start again. This acknowledge byte also carries the information as to whether or not to use a trigger on the next sample.

Raspberry Pi Arduino oscilloscope magPi 71

Add the resistors and capacitors to the stripboard and wire up the BNC socket. Solder this up before mounting, otherwise you will melt the plastic. Remember to thread the central wire through the ground washer, crinkle washer, and nut before soldering it. Add labels Trigger, Time, and Volts to the knobs.

Finally, before each buffer full of data is gathered, pin 13 on the board is lit, and turned off after. This is so that we could time the process on a commercial oscilloscope to find the sample rate — something you will not have to do if you use the recommended AVR-type Arduinos running at 16MHz.

Pi software

The software for the Raspberry Pi is written in Python 3 and used the Pygame framework. It proved to be a lot more tricky to write than we first imagined, and is shown in the Scope.py listing. Python 3 uses Unicode characters by default, and allowed us to display the delta (Δ) and mu (μ) Greek characters for the difference and the time. The code first sets up the non-display part of the window; this is only drawn once, and then parts of it are updated when necessary. Depending on what type of Arduino you have, it can show up as a different USB port; we found that ours showed up as one of two ports. Comment out which one is not applicable when defining the sampleInput variable at the start of the listing.

Finally, we cobbled together a 168×78 pixel logo for the top-left corner, using a piece of clip art and fashioning the word ‘Oscilloscope’ from an outlined version of the Cooper Black font. We called it PyLogo.png and placed it in an images folder next to the Python code.

Using the oscilloscope

The oscilloscope samples at 58 kHz, which in theory means you can measure waveforms at 29 kHz. But that only gives you two samples per cycle, and as the samples can be anywhere on the waveform, they do not look very good. As a rough guide, you need at least ten points on a waveform to make it look like a waveform, so that gives a top practical frequency of 5.8 kHz. However, by using the Time Magnify options along with the Freeze function, you can measure much higher frequencies. The time and voltage cursor lines let you find out the values on any point of the waveform, and by clicking the Save functions, the current cursor is replaced by a dotted line that is fixed, and measurements can be made relative to that. The oscilloscope in action can be seen in Figure 2.

Raspberry Pi Arduino oscilloscope magPi 71

Figure 2: Taking measurements on a swept signal

Note that pressing the S key on the keyboard produces a screen dump of the display.

Taking it further

There are lots of ways you can take this project further. A simple upgrade would involve you having a second data buffer to allow you to display a saved waveform to compare against the current live one. You could also add a lower-speed acquisition mode to see slower waveforms. You can go the other way and use a faster Arduino so you can see the higher frequencies. This oscilloscope is AC coupled; you could add a DC coupling option with a switch potential divider and amplifier to the front end to extend the range of voltages you can measure. All these improvements, however, will need changes to the software to allow the measuring to take place on these wider-range parameters.

Finish the project

For the complete project code, download the free PDF of The MagPi issue 71, available on The MagPi website.

The post Build an oscilloscope using Raspberry Pi and Arduino appeared first on Raspberry Pi.

MagPi 71: Run Android on Raspberry Pi

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-71-android-raspberry-pi/

Hey folks, Rob here with good news about the latest edition of The MagPi! Issue 71, out right now, is all about running Android on Raspberry Pi with the help of emteria.OS and Android Things.

Raspberry Pi The MagPi Magazine issue 71 - Android

Android and Raspberry Pi, two great tastes that go great together!

Android and Raspberry Pi

A big part of our main feature looks at emteria.OS, a version of Android that runs directly on the Raspberry Pi. By running it on a touchscreen setup, you can use your Pi just like an Android tablet — one that’s easily customisable and hackable for all your embedded computing needs. Inside the issue, we’ve got a special emteria.OS discount code for readers.

We also look at Android Things, the official Android release for Raspberry Pi that focuses on IoT applications, and we show you some of the amazing projects that have been built with it.

More in The MagPi

If Android’s not your thing, we also have a big feature on building a Raspberry Pi weather station in issue 71!

Raspberry Pi The MagPi Magazine issue 71 - Android

Build your own Raspberry Pi weather station

On top of that, we’ve included guides on how to get started with TensorFlow AI and on building an oscilloscope.

Raspberry Pi The MagPi Magazine issue 71 - Android

We really loved this card scanning project! Read all about it in issue 71.

All this, along with our usual varied selection of project showcases, excellent tutorials, and definitive reviews!

Get The MagPi 71

You can get The MagPi 71 today from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. You can also get the new issue online from our store, or digitally via our Android or iOS apps. And don’t forget, there’s always the free PDF as well.

New subscription offer!

Want to support the Raspberry Pi Foundation and the magazine? We’ve launched a new way to subscribe to the print version of The MagPi: you can now take out a monthly £4 subscription to the magazine, effectively creating a rolling pre-order system that saves you money on each issue.

The MagPi subscription offer — Run Android on Raspberry Pi

You can also take out a twelve-month print subscription and get a Pi Zero W plus case and adapter cables absolutely free! This offer does not currently have an end date.

That’s it, folks! See you at Raspberry Fields.

The post MagPi 71: Run Android on Raspberry Pi appeared first on Raspberry Pi.

MagPi 70: Home automation with Raspberry Pi

Post Syndicated from Rob Zwetsloot original https://www.raspberrypi.org/blog/magpi-70-home-automation/

Hey folks, Rob here! It’s the last Thursday of the month, and that means it’s time for a brand-new The MagPi. Issue 70 is all about home automation using your favourite microcomputer, the Raspberry Pi.

Cover of The MagPi 70 — Raspberry Pi home automation and tech upcycling

Home automation in this month’s The MagPi!

Raspberry Pi home automation

We think home automation is an excellent use of the Raspberry Pi, hiding it around your house and letting it power your lights and doorbells and…fish tanks? We show you how to do all of that, and give you some excellent tips on how to add even more automation to your home in our ten-page cover feature.

Upcycle your life

Our other big feature this issue covers upcycling, the hot trend of taking old electronics and making them better than new with some custom code and a tactically placed Raspberry Pi. For this feature, we had a chat with Martin Mander, upcycler extraordinaire, to find out his top tips for hacking your old hardware.

Article on upcycling in The MagPi 70 — Raspberry Pi home automation and tech upcycling

Upcycling is a lot of fun

But wait, there’s more!

If for some reason you want even more content, you’re in luck! We have some fun tutorials for you to try, like creating a theremin and turning a Babbage into an IoT nanny cam. We also continue our quest to make a video game in C++. Our project showcase is headlined by the Teslonda on page 28, a Honda/Tesla car hybrid that is just wonderful.

Diddyborg V2 review in The MagPi 70 — Raspberry Pi home automation and tech upcycling

We review PiBorg’s latest robot

All this comes with our definitive reviews and the community section where we celebrate you, our amazing community! You’re all good beans

Teslonda article in The MagPi 70 — Raspberry Pi home automation and tech upcycling

An amazing, and practical, Raspberry Pi project

Get The MagPi 70

Issue 70 is available today from WHSmith, Tesco, Sainsbury’s, and Asda. If you live in the US, head over to your local Barnes & Noble or Micro Center in the next few days for a print copy. You can also get the new issue online from our store, or digitally via our Android and iOS apps. And don’t forget, there’s always the free PDF as well.

New subscription offer!

Want to support the Raspberry Pi Foundation and the magazine? We’ve launched a new way to subscribe to the print version of The MagPi: you can now take out a monthly £4 subscription to the magazine, effectively creating a rolling pre-order system that saves you money on each issue.

The MagPi subscription offer — Raspberry Pi home automation and tech upcycling

You can also take out a twelve-month print subscription and get a Pi Zero W plus case and adapter cables absolutely free! This offer does not currently have an end date.

That’s it for today! See you next month.

Animated GIF: a door slides open and Captain Picard emerges hesitantly

The post MagPi 70: Home automation with Raspberry Pi appeared first on Raspberry Pi.