Pi Wars: How to win the Olympics of Raspberry Pi robotics

Pi Wars: How to win the Olympics of Raspberry Pi robotics

Pi Wars is one of the biggest events in the Raspberry Pi community calendar. This year’s event, in Cambridge UK, is getting ready to take place on Saturday 20 April. The Raspberry Pi has helped revolutionise many things. From computing education, to the maker community, and even how you play games at home, the Raspberry Pi has had a huge impact. It’s also helped change the face of hobby robotics, making it more accessible than ever before. Pi Wars celebrates hobby robotics. Spectator tickets for Pi Wars 2018 event are still available What is Pi Wars? To celebrate this renaissance of robotics, the organisers of the regular CamJam event hold a yearly contest known as Pi Wars that pits the Raspberry Pi community’s best automated efforts against each other. There’s no fighting, though: the robots take part in devious challenges designed to test how well they’ve been built and programmed, and at the end of the day they get to be taken home in one piece! Most of the time. This article first appeared in The MagPi magazine issue 68. Download your free digital edition of The MagPi magazine. See also Pi Wars 2018 Tiny 4WD Robot Rover: new Pi Zero robotics kit from Pi Wars designer Pi Wars USA: robot competition heads to America How to win Pi Wars This year, over 70 teams are taking part over two days. Here’s what you can expect from the event. Straight-line Speed Test: How fast can your robot go in a straight line? A shallow trough 7.3 m (24 feet) long comprises the course for the speed test. Your robot needs to traverse this course autonomously as fast as possible, without hitting the sides. The course is usually 534 mm wide, but there are sections where it will narrow. With a white line down the centre which you can use for navigation, the course will be run three times and the scores for each run added together. While it seems like it will be simple, any robot maker knows that very few robots go in a straight line without some coding help. Official tip: It’s important to get a balance between being as fast as possible and being as accurate as possible – we’ve added chicanes which count as ‘walls’ which incur penalties when touched. The Minimal Maze: Robots need to autonomously navigate a simple maze Don’t let this simple-looking maze fool you:…
Source: Pi Wars: How to win the Olympics of Raspberry Pi robotics

Keep cool with a Pi-powered fan

Keep cool with a Pi-powered fan

Nothing is as personal as the level of comfort someone feels. In shared office spaces it’s almost impossible to create a climate in which everyone feels comfortable, especially when these shared spaces are large. With about 40–50 people in a room, we can’t all be happy. We’ve put together some components, both hardware and software, to keep us cool. Here’s how you can do the same… You’ll need 3.5-inch touchscreen and case DHT22 sensor (on PCB) USB fan STEP-01 Wire up the sensor First things first: this project is all about monitoring temperature, so we need to attach the sensor. It’s important to do this before attaching the display. Wire up the temperature sensor using the PiFan wiring diagram below. Wiring up your system STEP-02 Attach the other components After you’ve attached the sensor, mount the display on the Raspberry Pi. It slots nicely on top of the GPIO pins, so this should be easy. Now you can build the acrylic case around it to support the display and protect your Raspberry Pi. Of course, you should make sure the sensor stays on the outside of the case. After completing the case, plug the USB fan into your Raspberry Pi. If your USB fan has a power switch, hit it to make sure it works. STEP-03 Set up the OS and display The manufacturer of this screen has an image of Raspbian (with Raspberry Pi Desktop) available, which has the display driver built in. Download it to burn to an SD card. Follow our guide to burn SD cards. If you want to install the driver manually, or have another type of screen, that’s no problem. Just be sure to use Raspbian with the Raspberry Pi Desktop so that Chromium is available. STEP-04 Download the software Open the Terminal (or dial in with SSH from another computer) to install and download all of the software. We’ll start with the prerequisites. Install them with the command:sudo apt-get install nginx-light supervisor git build-essential python-dev python-pipAlso install the Python framework Falcon by executing:sudo pip install falcon==1.0.0Now clone and install the sensor module driver:git clone https://github.com/adafruit/Adafruit_Python_DHT.git /tmp/dht cd /tmp/dht sudo python setup.py installNow clone the PiFan GitHub repo with the following command:git clone https://github.com/jeroenpeters1986/piFan.git /home/pi/pifanAll software needed will now be on the Raspberry Pi. STEP-05 Configure the software We now need to configure the software we just downloaded. The following commands will configure the…
Source: Keep cool with a Pi-powered fan

OpenCat: Robot cat purrs with Raspberry Pi

OpenCat: Robot cat purrs with Raspberry Pi

OpenCat is a robot cat project built by Chinese roboticist Rongzhong Li. He has created a robotic cat from scratch, including realistic movements and Alexa integration. Rongzhong started with some modelling sticks and a Raspberry Pi beginner kit, all of which is “still integrated somewhere on the cat,” he tells us. You can see OpenCat’s evolution in this video:

The maker wanted to use a Raspberry Pi to power OpenCat because of the “easy access to hardware interfaces under a Linux environment” rather than the Pi being “a tiny and cheap computer.” An early iteration of OpenCat, using modelling sticks to make the body OpenCat: Building a robot cat with Raspberry Pi Rongzhong studied many mammalian gaits, and believes “different gaits can be generated by simple tuning amplitude, phase duration, and other tiny parameters”. OpenCat is “not constrained by [being a] cat.” He found that he had to use an Arduino ‘slave’ to handle the robotics, while the Raspberry Pi handles higher functions such as the Alexa integration. Currently, OpenCat uses Alexa “to trigger certain behaviours,” but there are also references to ‘hosting video streams’ through OpenCat. As Rongzhong says, voice assistants “can now run on a pet-like body, and interact with people in a pet-like manner. [This] may encourage more people to embrace robotics at home.” Rongzhong is currently developing ways to make OpenCat financially self-supporting – whether that means selling OpenCat kits or something else, we’ll have to wait and see. The post OpenCat: Robot cat purrs with Raspberry Pi appeared first on The MagPi Magazine.
Source: OpenCat: Robot cat purrs with Raspberry Pi

Making music with a Raspberry Pi

Making music with a Raspberry Pi

Making music on a Raspberry Pi is simple enough thanks to Sonic Pi. However, demoscene musician Yerzmyey decided to go one step further and make an entire album using the Raspberry Pi as his instrument. You can listen to RPi ZWEI while you read through our interview with him. This article first appeared in The MagPi 68 and was written by Rob Zwetsloot Tell us about your album! What kind of music would you say it is? Typical demoscene music is usually divided in two basic types: chiptunes and modules. Generally we might say that chiptune music is usually synthetic and full modules – like MOD, S3M, XM, etc. – are sample-based. The songs on my Raspberry Pi album are modules – the XM modules to be exact – made with a Raspberry Pi 2 and MilkyTracker working on the regular Raspbian system. In general you can find all kinds of electronic music, although every song is different: from electro/techno-pop, through Eurodance, to instrumental electronica [a bit like] Mike Oldfield. It then ends in a chiptune style with BitPusher2600’s remix made on the Pi. Why a Raspberry Pi? I bought one when the Pi 2 was still the new model. However, my decision back then was motivated directly by the announcement that the Raspberry Pi outsold the ZX Spectrum. I thought, “Aha! I have to get one NOW!” The Raspberry Pi, being a British computer, is important to me as I’ve been a ZX Spectrum fan and user since the eighties. The Pi is a modern, and potent, machine. Obviously, it’s not old school, but you can feel some cool old-school philosophy behind it. The entire idea of the project was to use only Pi 2 and nothing else. I composed this music on the Pi and then recorded it all directly from the headphone output of the board. The Pi 2 is powerful so the songs can be complicated and use multichannel, which makes for a great tune for the listener. The most complex song on the album consists of 26 independent channels of digi-music. The Pi can surely manage more, but that wasn’t the point of this album. How did you go about composing the album? I programmed all notes one-by-one, as is customary on the music trackers. You have to put all the notes/sounds in manually without any automatic help. Otherwise I use loops, but only when it…
Source: Making music with a Raspberry Pi

AIY Projects 2 revealed; Pi Zero WH in the box

AIY Projects 2 revealed; Pi Zero WH in the box

Google has launched updated versions of its wildly successful AIY Projects Vision and AIY Voice Kits. The new kits include a Raspberry Pi Zero WH, a pre-provisioned microSD card, and – with the Vision Kit V1.2 – a Raspberry Pi Camera Module V2. “Everything you need to get started is right there in the box,” says Billy Rutledge, Google’s Director of AIY Projects. As mentioned, the AIY Vision Kit also comes with a Raspberry Pi Camera V2. The aim is to put everything in the box so users no longer need to buy additional parts, or download the software image. See also: AIY Voice Essentials Control a motor with the AIY projects Voice HAT AIY Projects: Vision Kit: build your own intelligent camera AIY Projects 2 with Pi Zero WH “The updates allow Google “to continue to give makers an easy way to integrate AI in their products and creatively use AI to solve their own challenges,” explains Billy. The aim of AIY Projects is to make it cheaper and easier to add AI processing to a project. “We knew from our research that even though makers are interested in AI, many felt that it adding it to their projects was too difficult or required expensive hardware,” says Billy. Voice and image recognition were “the two biggest areas of interest for the community”, Billy tells us, so that’s where the AIY Projects team started. Both the AIY Vision and AIY Voice Kits have “sold out of inventory with each production run,” Billy reveals. The new kits move away from using a Raspberry Pi 3 towards the smaller Pi Zero form factor. As Billy explains, “we designed our first version of Voice Kit around the Raspberry Pi 3,” but many AIY builds used “the lower-cost Raspberry Pi Zero, even with some of the Google Assistant SDK features being limited for the ARM v6 instruction set.” “We thought it would be a great opportunity to showcase the performance and flexibility of the smallest Raspberry Pi. Not to mention lower the cost of the kit,” says Billy.   High demand for AI in the classroom The AIY Projects kits were huge hits amongst the maker community, but they also proved popular in classroom environments. “We’re seeing continued demand for the kits,” explains Billy, “especially from the STEM audience where parents and teachers alike have found the products to be great tools for the…
Source: AIY Projects 2 revealed; Pi Zero WH in the box

NES case review

NES case review

Cases for the Raspberry Pi are a dime a dozen these days, so it’s nice to see people selling fun themed cases for your Pi projects like this NES case. It sets them apart from the myriad plastic, yet functional, cases for the Raspberry Pi. The maker of this case, Kintaro, sells a couple of retro-console-themed cases. Along with this NES-inspired case, you can also get a (US purple) SNES-style case. The NES one is smaller and simpler than the SNES version, but still functions as a proper Raspberry Pi case. Putting a Raspberry Pi in the case couldn’t be easier – the two halves come unfastened in the box so you can separate the two. Inside you’ll find four screws and a couple of heat sinks in bags which you’ll need to remove. Place the Raspberry Pi inside the bottom half, replace the top half, and then use the provided screws to secure the halves together from below. Job’s a good ’un. Flip the flap While on the original NES the controller ports were located on the front of the machine, the USB ports on the Raspberry Pi aren’t quite arranged like that. In a rather ingenious move by Kintaro, the cartridge flap has been recreated on this case – simply flip it up to gain access to all the USB ports and the Ethernet port. Otherwise, all the important ports and slots are accessible while the Raspberry Pi is in the case, even the microSD slot. The case is really useful for using a Raspberry Pi as a standard computer or a retro gaming system. However, even with the ‘vents’ on the side of the case, accessing the GPIO pins is tricky, and putting a camera cable through the USB flap isn’t ideal. While the case was not designed with this in mind, it’s worth mentioning in the event that you were planning to use this as your only case. Last word 4/5 A great, simple case that might be good for your home media setup if you’re missing the elusive NES Classic Mini. Don’t get it for hacky electronics projects, though. The post NES case review appeared first on The MagPi Magazine.
Source: NES case review

VNC Connect accounts to be “deactivated”

VNC Connect accounts to be “deactivated”

Some VNC Accounts will be “deactivated” according to an alert posted by RealVNC. VNC Connect, provided by RealVNC, is included as a stock part of Raspbian – the official desktop for the Raspberry Pi. The software enables users to connect to a Raspberry Pi remotely, from another computer (or a smartphone or tablet). Users can even connect to a Raspberry Pi over the internet and control a Raspberry Pi board from anywhere in the world. See: How to use VNC on a Raspberry Pi RealVNC is set to deactivate all accounts used by under 16-year-olds (or those that it can’t confirm used by adults). This is to comply with new General Data Protection Regulation (GDPR) act arriving on May 25, 2018. “Under the terms of this new regulatory framework, we are no longer able to collect or process data from people under 16 years of age,” says Adam Byrne, Chief Executive Officer, RealVNC Ltd. GDPR is a great step forward in ensuring that all of our personal data is handled responsibly and in accordance to individual wishes. The team at RealVNC is very positive about GDPR and we whole-heartedly support the privacy objectives of this new regulation. To meet the May 2018 deadline, we have been working for more than a year to ensure that every part of our organization is aligned with our compliance obligations. RealVNC displaying a Raspberry Pi desktop from a Windows PC RealVNC accounts restricted Anybody signing up for a new RealVNC account, from now on, will be asked to confirm they are 16-years-old or over. For those users under 16, a parent or guardian is required to create the new account. Implementing GDPR retroactively is more challenging. As Adam Byrne elaborates: For existing VNC Connect account owners it’s a bit trickier since we never asked for age information when creating accounts in the past. This means that we will be sending out emails to all VNC Connect account holders with registered Raspberry Pi devices. Everyone will be asked to verify if they are over the age of 16. Account will remain active for those people that verify that they are over 16. If they are under 16, the existing account will be deactivated and a new account will need to be created with registration details from a parent or guardian. Read more: Privacy changes for VNC Connect accounts on Raspberry Pi   The post VNC Connect…
Source: VNC Connect accounts to be “deactivated”

Simple Pi Geiger counter display

Simple Pi Geiger counter display

The MightyOhm Geiger counter is a great DIY project, and there is a simple way to connect it to a Raspberry Pi for data logging and displaying with a Pimoroni Scroll pHAT. The code supports either the newer HD Scroll pHAT or the older version with a simple variable change at the start of the Python program. This article first appeared in The MagPi 67 and was written by Bill Ballard You’ll need Raspbian Lite MightyOhm Geiger counter with Geiger tube Geiger counter case to protect you from high voltage 5 V USB power supply Pimoroni Scroll pHAT HD Software setup Download and install the latest version of Raspbian Lite on your microSD card using any of the excellent instructions in the Raspberry Pi Forum. If you copy your wpa_supplicant.conf file to the boot partition before the first startup, your wireless network connection will be active immediately. Initialise Raspbian with raspi-config to the proper Internationalisation Options (time zone, keyboard, wireless country code, etc.), change the default password, and set the host name in Advanced Options to something like ‘geiger’. Make sure that you enable I2C in the Advanced Options of raspi‑config, and SSH if you will be connecting remotely. Next, edit:sudo nano /boot/cmdline.txt…and remove:console=serial0,115300…from the line. Save, then exit the file and reboot the Raspberry Pi. Now you should do the usual update and upgrade to the operating system:sudo apt-get update && sudo apt-get upgrade -yNext, install the Python pip and scrollphathd applications (just leave off the ‘hd’ if using an older Scroll pHAT):sudo apt-get install python3-pip python3‑scrollphathdFinally, install pySerial and flask:sudo pip3 install pySerial flask…and you are all set. Download the geiger.py file from GitHub and customise it for your desired log file location and your Scroll pHAT version (HD = True or False). Hardware setup Assuming you have already assembled the Geiger counter with the MightyOhm instructions, you only need to solder the header to the Scroll pHAT and connect a few wires. Optionally, you can use an extra-tall 2×20 stacking header so you can use a connector. To connect the pHAT to the Raspberry Pi, you need to solder three wires to the Scroll pHAT corresponding to GPIO physical pins 6, 8, and 10. Pin 6 (GND) connects to the Geiger counter’s J7 connector pin 2, pin 8 (GPIO 14) connects to the J7 pin 4, and pin 10 (GPIO 15) connects to the J7 pin 5. Feel free to use…
Source: Simple Pi Geiger counter display

Qrocodile: QR reader for Sonos speaker system

Qrocodile: QR reader for Sonos speaker system

The qrocodile is a a snappy Raspberry Pi project that makes it easier to control a Sonos multi-room speaker system. Keen to find a way to enable his young children to quickly and easily search for and play their favourite music tracks on the family’s Sonos sound system, Chris Campbell had a brainwave. “Usually my kids ask me to play certain songs that they already know, and then I have to use the Sonos app on my phone or computer to hunt them down. One night at the dinner table I was lamenting how many steps are involved in using the Sonos apps to search for music or to enable the turnable… That’s when the seed of an idea was planted.” Initially he thought of creating a simple button that just enabled the vinyl turntable linked to the Sonos, but grander plans soon started to take shape, centred on the use of QR codes. This Project Showcase was written by Nicola King and first appeared in The MagPi 68. The cute croc-shaped case is built from his son’s green LEGO bricks Project qcrocodile: Scanning for Sonos codes Printed on cards, the QR codes are read by a mini camera connected to a Raspberry Pi 3, housed in a LEGO crocodile case. “When my software sees a QR code that it understands (for example, a code representing a music library track), it builds up and sends the appropriate request(s) to the Sonos system,” explains Chris. In addition to playing tracks, some of the cards contain commands such as ‘Play music in living room’ or ‘Build a list of songs’. The qrocodile also speaks to you, to tell you what it is doing! Chris spent around four weeks working on the project in his spare time, ironing out several issues along the way, such as with the QR encoding algorithm. His first implementation simply encoded the full artist, album, and song title metadata in the QR code. “This worked fine for short names/titles, but not so well for songs or albums with really long titles. It hadn’t occurred to me that the more information you cram into a QR code, the tinier those little black and white squares get. And the smaller those squares get, the harder it becomes for the camera to read.” His solution was to apply a hash function to the metadata, so that only a few characters need…
Source: Qrocodile: QR reader for Sonos speaker system

Pixel Electromechanical Display

Pixel Electromechanical Display

Looking to create a decorative project for his office party, Gavan Fantom decided that a standard LED matrix display would be too obvious. “Somehow I started thinking about electromechanical things like the flip-dot display and wondered what I could do that would be a little bit different,” he tells us. The result is the Pixel, an amazing electromechanical matrix display controlled by a Raspberry Pi. Each of its 64 ‘pixels’ is turned on and off by a servo rotating a 3D propeller-like shape to reveal its bright yellow vanes from a black casing. Unique design “I don’t know of any other implementation of this shape for a display,” says Gavan. “The idea came from the AWS visual display (a.k.a. sunflower) in a train cab, which in its active state displays interleaved yellow and black segments, but this was an exercise in extending the yellow part to cover the whole circle. This is not possible to do with a part rotating behind a shutter, and meant that there had to be a third dimension to the moving part.” Each individual ‘pixel’ is 3D printed Unlike in a traditional flip-dot display, the 3D-printed pixels can be rotated to intermediate positions to achieve greyscale-style shading. “There are definitely things you can do with this display that you couldn’t do with a two-state display. Perhaps my favourite has to be a ripple effect.” The Pixel display can show animations, too. “The frame rate is just a few frames per second,” reveals Gavan. “There’s nothing stopping the software from emitting data to the servo controllers faster, but the servos do take a little while to rotate. Too high a frame rate just leads to ghosting effects on high-contrast features such as text.” Two phases In total, from concept to finish, the Pixel took Gavan three and a half weeks to make, split between design and manufacturing phases. A lot of wiring is involved “The design phase involved learning about screw threads and what can be 3D-printed. The first few iterations of the design had various problems with friction and sticking, which were resolved by having two separate screw threads – one to drive the correct motion and one for the display element.” Due to time pressure, Gavan had to live with a few design issues. “The end result is that some parts are a bit fragile, leading to reliability issues.” While much of the design…
Source: Pixel Electromechanical Display