Kategorie: Linux

  • TechWiser’s giant Raspberry Pi AirPod speaker (and more)

    TechWiser’s giant Raspberry Pi AirPod speaker (and more)

    Reading Time: 2 minutes

    YouTube is a haven for awesome Raspberry Pi projects, and we often spend time scanning through the platform’s wares for hidden gems. One such hidden gem is this video from TechWiser, in which they showcase some of their favourite Raspberry Pi projects:

    Cool Raspberry Pi 4 Projects We Use At TechWiser

    Here are some of the best projects we use at TechWiser office.

    From installing PiHole in the office, to upgrading a cupboard with RFID recognition for keyless entry, TechWiser has the whole ‘incorporating Raspberry Pi into everything’ thing down to a fine art.

    But it’s not all just about practicality. Does anyone really need a giant Apple AirPod? No. But, does the idea of a giant Apple AirPod sound cool? You betcha!

    And their YouTube button that flashes whenever they earn a new subscriber is rather lovely too. I wonder if they noticed it flash when Raspberry Pi subscribed to their channel?

    TechWiser’s YouTube channel contains a plethora of Raspberry Pi and tech tutorials and reviews, and you should definitely check them out.

    Website: LINK

  • Bit Time Rotary Dial Phone project showcase

    Bit Time Rotary Dial Phone project showcase

    Reading Time: 4 minutes

    The Rotary Dial Phone project is part of a wider initiative called Bit Time – a project that has been running in Basildon, Essex over recent months. It’s the brainchild of Dave Norton and Laura Travail. Dave is a digital Artist and drama practitioner whose work ranges from large-scale interactive installations to live theatre performed in a virtual world. Laura is an artist and context strategist with an outdoor theatre and live-art background.

    Lead artist Laura explains, “Bit Time is an intergenerational project, combining the skills and knowledge of the very young with those of our elders.

    Artists Dave Norton and Laura Travail run the intergenerational Bit Time project in Basildon, Essex

    „As artists and facilitators, we’ve been bringing together these ideas and possibilities into playable works that in themselves keep that momentum going. These are projects about communication technology, but they are also communication technologies in themselves. By interacting with the art, you are interacting with each other.”

    Cold calling

    So, the retro phones… where do they fit into this story? Phone project artist Dave Norton says, “The inspiration for the question/answer phones came from a desire to build a device that lets you share a message with someone you’ll never meet. A digital time capsule of anonymous thoughts, advice, stories, and memories that could be listened to by anyone. You have no idea who might hear your message and how it could affect them.”

    He explains how the system works: “You walk past a phone and it starts ringing, you pick it up and the operator asks you to answer a question, e.g. ‘what was your first phone?’, ‘what will a phone of the future look like?’ A ‘recording’ light comes on and you leave your message and hang up. Later on, you see another phone that also rings as you walk past; you pick it up and it plays back a random message left by someone else.”

    Testing a phone for use in the Rotary Dial Phone Project. Power constraints mean the phone's bell and the recording sign have to be disconnected when the Raspberry Pi that controls them boots up

    A motion detector identifies when someone walks past, while a push-button detects when the receiver is lifted. The phone’s mic and speaker are hooked up to a Raspberry Pi, which chooses a random audio file question to play. “The mic starts recording the user’s message for 15 seconds, or until they hang up, then the whole process restarts. The answer phone works in a similar way, but only chooses random audio files to play back.”

    The upcycled rotary phone: triggered by a motion detector, each phone starts ringing when someone walks past it. Raspberry Pi randomly selects and plays an audio file containing a question

    Since the installation needed to work in any kind of location, it couldn’t rely on WiFi to transfer audio files between the phones, particularly as the audio files needed to be checked manually before they could be shared with the public. “I ended up having to code a ‘syncing’ mode, which is activated when a USB drive is inserted into Raspberry Pi, which automatically transfers all the audio files to the drive,” reveals Dave.

    
Maker Dave Norton says it was easy to snip the wires from each dial phone’s speaker, microphone and hang-up button and connect them to Raspberry Pi

    You talkin’ to me?

    The Bit Time project, including the rotary dial phones, ultimately became an exhibition which toured Basildon in summer 2019. Dave says, “There’s something really unburdening about being anonymous, and something really pleasing about being given an open platform to speak your mind. I loved the idea that the installation starts as a blank slate and, as it travels to different events and locations, it collects a mixture of stories and thoughts and shares them with anyone who cares to listen, something akin to a travelling storyteller.”

    He says the phones elicited a variety of reactions. “Some people just hang up straight away, some people audibly freak out that they’re actually being recorded, some yell bizarre phrases, but most people genuinely answer the question. No two answers have been similar and it makes for some really interesting listening… We’ve ended up with hundreds of varied audio responses – it would be lovely to build some sort of audio installation using all the clips.”

    The question phone plays a random question to whoever picks up the handset and records their response

    Quick facts

    • The phones project took around three weeks to complete

    • Basildon Library Creator Space provided a location to construct the Bit Time artwork

    • A 5 V solenoid is used to ring each phone’s bell

    • Dave programmed each Raspberry Pi using Python

    • He suggests the phones could be used in the foyer of a venue after an event, to glean honest views from attendees

  • Automate your door latch with a simple app-controlled system

    Automate your door latch with a simple app-controlled system

    Reading Time: < 1 minute

    Automate your door latch with a simple app-controlled system

    Arduino TeamJanuary 20th, 2020

    Adnan.R.Khan recently decided to give his room’s sliding door latch an upgrade by designing a mechanism to open and close it, using little more than an Arduino Uno and Bluetooth module. 

    His automated device is operated via a smartphone app written in MIT App Inventor, and it employs a shield to control a small DC motor. The motor then pulls a cable wrapped around two pulleys in order to move the simple barrel latch in or out.

    It’s an amazing display of what can be done with parts at hand and basic tools, and could certainly inspire other home security hacks. Be sure to check out the build process and the setup in action below! 

    [youtube https://www.youtube.com/watch?v=wtHWZ-TNMUU?feature=oembed&w=500&h=281]

    Website: LINK

  • Arduino Education nominated for Bett Award

    Arduino Education nominated for Bett Award

    Reading Time: 2 minutes

    Arduino Education nominated for Bett Award

    Arduino TeamJanuary 20th, 2020

    The Arduino Engineering Kit has been nominated as a BETT Awards 2020 finalist in the “Higher Education or Further Education Digital Services” category. 

    About the Bett Awards

    The Bett Awards are a celebration of the inspiring creativity and innovation that can be found throughout technology for education. The awards form an integral part of Bett each year, the world’s leading showcase of education technology solutions. The winners are seen to have excelled in ICT provision and support for nurseries, schools, colleges and special schools alike with a clear focus on what works in the classroom.

    About the Nomination

    The Arduino Engineering Kit, developed in partnership with MathWorks, is aimed at higher education engineering students. It features hands-on projects that will cover system modeling, controls, robotics, mechatronics, and other important engineering concepts.

    Despite Arduino and MathWorks being some of the most widely used products in the engineering field all over the world, there wasn’t any product that was teaching how to integrate MATLAB and Simulink software with Arduino hardware. Thus, Arduino together with MathWorks saw this as an opportunity to join forces to develop a learn-by-doing kit that provided real world example usage scenarios to teach both the software and engineering fundamentals of the following:

    • Robotics
    • Mechatronics
    • Control systems
    • Image and video processing
    • Physics and mathematics

    The kit is built on its own Education Learning Management System (LMS) with step-by-step instructions and lessons. It comes in a stackable toolbox for storage and years of reuse. The student will have access to a dedicated e-learning platform and other learning materials, including a one-year individual license for MATLAB and Simulink.

    Arduino at Bett:

    Arduino CEO Fabio Violante says: “We are delighted to feature a series of new Arduino Education programs at BETT 2020 which will expand STEAM learning for lower secondary to university students. Our technology, programming, and curriculum content are creative tools just like brushes and paint that students can use as they become part of our next generation of scientists and artists.

    Website: LINK

  • Monitor your home with this Nano 33 IoT-based system

    Monitor your home with this Nano 33 IoT-based system

    Reading Time: < 1 minute

    Monitor your home with this Nano 33 IoT-based system

    Arduino TeamJanuary 20th, 2020

    Using an Arduino Nano 33 IoT, Jithin Sanal designed a home monitoring system capable of detecting noxious gases with an MQ2 sensor as well as sensing temperature, pressure, humidity, and ambient light via a BME280 sensor and an LDR. All of this is mounted onto a custom PCB that’s powered by a 9V battery, or one could also use a 9-12V adapter if more convenient.

    Data is passed on to Ubidots over WiFi, which provides a configurable dashboard for viewing the readings anywhere in the world. The system can also send notifications via SMS, email, or Telegram to let you know if anything is awry.

    [youtube https://www.youtube.com/watch?v=b6uyj6gag0A?feature=oembed&w=500&h=281]

    Website: LINK

  • An educator’s summer dream – to add more robotics into their classroom

    An educator’s summer dream – to add more robotics into their classroom

    Reading Time: 3 minutes

    How Arduino Education helped educator James Jones boost students’ 21st century skills and robotics knowledge across 23 middle schools in Orlando, Florida. 

    More and more teachers face the difficulty of instilling the right skills and knowledge, as well as a flexible mindset, that better prepare their students for future career opportunities.

    Today, students need to be thinking about careers in middle school,” Jones said. “If students wait until they are juniors or seniors in high school to decide, their options are already getting slim. Finding a direction in middle school allows for research, job shadowing, and internships in high school. This will translate into more jobs that require more of these skills as part of the daily workplace. This way they know what a career really looks like, instead of jumping into a job and finding out that they are miserable.”

    The challenge: learning about careers you love at a young age

    Many countries have recently approved changes in their curricula and education systems to allow earlier access to technology in the classroom. In Finland, technology education is not a separate subject but a cross-curricular, interdisciplinary topic studied within various classes. In Florida, the Workforce Education law requires that students explore their career options during grades 6-8, at ages 12 to 14.

    How Arduino Education helped

    Jones spent last summer looking for a solution to assist him the following semester. He wanted to think big and reach as many schools as possible in Orange County, so he applied for and won the Title IV grant through the Every Student Succeeds Act (ESSA) program. He used the grant to fund 23 middle schools and chose Arduino Education’s products, CTC GO! Core Module and the Arduino Starter Kit, to improve students’ robotics, programming, and coding skills.

    This past summer we ran two weeks of camps for rising eighth-graders. It was a transition camp at our feeder high school,” Jones said. As an educator, he believes his students should not leave school with only basic knowledge of robotics and STEAM but a deeper and more concrete experience of real-world problem-solving. “More and more personal electronics have fewer buttons and more programming,” Jones said.

    Jones asked  Pitsco Education — an official Arduino Education Partner — for extra support during his teaching experience. Pitsco “teaches both coding and circuitry concepts in a real-world manner. Along the way, students encounter numerous careers which might spark their interest in pursuing an occupation they hadn’t considered before. A few of the endless possibilities open to students include engineering and design in any field (computer science, electricity, chemistry, mechanics), programming, and even costuming and music production.”

    Do you have an Arduino Education success story? We would love to hear it! your success story with Arduino Education! Find out more about Arduino Education at arduino.cc/education.

    Website: LINK

  • The Arduino Fundamentals Certification Exam is now available in Spanish and Italian!

    The Arduino Fundamentals Certification Exam is now available in Spanish and Italian!

    Reading Time: 3 minutes

    For enthusiasts, the Fundamentals Exam is the first tier in the Arduino Certification Program (ACP), designed to test entrants knowledge in Arduino-related electronics, programming, and physical computing.

    The exam is available for everyone interested in officially certifying their skills and knowledge on Arduino, that could, for example, be referred to in a resume for academic or professional purposes.

    Get your students, colleagues and friends certified!

    The Fundamentals Exam is now also open to schools, academic institutions, universities, and companies that are interested in getting their students and employees officially certified!

    The Fundamentals Certification offers the right balance of academic excellence and real world skills to give students the confidence and motivation they need to succeed both in educational and professional environments.

    It is a great opportunity for companies who are interested in certifying their employees to refresh and add new skills to their repertoire.

    Want to learn more? Additional information can be found here.

    El examen de Certificación Fundamentals, está ahora disponible en Español e Italiano

    Para entusiastas, el examen de Certificación Fundamentals, es el primer nivel del Programa de certificación Arduino (ACP), diseñado para evaluar el conocimiento de los participantes en electrónica, programación y computación física relacionadas con Arduino.

    El examen está disponible para todos los interesados ??en certificar oficialmente sus habilidades y conocimientos en Arduino, que podrían, por ejemplo, mencionarse en un currículum con fines académicos o profesionales.

    ¡Certifica a tus estudiantes, colegas y equipo de trabajo!

    La certificación también está disponible para escuelas, instituciones académicas, universidades y empresas que estén interesadas en certificar oficialmente a sus estudiantes y equipo de trabajo.

    La Certificación Fundamentals ofrece el equilibrio adecuado entre excelencia académica y habilidades del mundo real, para brindar a los estudiantes la confianza y la motivación que necesitan para tener éxito tanto en entornos académicos como profesionales.

    También es una gran posibilidad para compañías que están interesadas en certificar a su equipo de trabajo para actualizar y agregar nuevas habilidades a su repertorio.

    Para saber más visita: https://store.arduino.cc/digital/cert_fundamentals.

    Siamo lieti di annunciare che l’esame per la certificazione Arduino Fundamentals è da adesso disponibile anche in spagnolo e italiano! 

    Desideriamo rendere accessibile la Certificazione alle scuole, alle istitutuzioni, università e aziende che siano interessate a certificare ufficialmente i propri studenti e dipendenti! La certificazione Arduino Fundamentals offre il giusto equilibrio fra l’acquisizione di abilità accademiche e lavorative, fornendo agli studenti la sicurezza e la motivazione necessarie per riuscire nel mondo accademico e professionale. E’ inoltre un increndibile possibilità per le aziende interessate ad aggionarne, migliorare e/o accrescere le capacità dei propri dipendenti.

    Per saperne di più, visitate: https://store.arduino.cc/digital/cert_fundamentals.

    Website: LINK

  • The Arduino Fundamentals Certification Exam is now available in Spanish and Italian!

    The Arduino Fundamentals Certification Exam is now available in Spanish and Italian!

    Reading Time: 3 minutes

    For enthusiasts, the Fundamentals Exam is the first tier in the Arduino Certification Program (ACP), designed to test entrants knowledge in Arduino-related electronics, programming, and physical computing.

    The exam is available for everyone interested in officially certifying their skills and knowledge on Arduino, that could, for example, be referred to in a resume for academic or professional purposes.

    Get your students, colleagues and friends certified!

    The Fundamentals Exam is now also open to schools, academic institutions, universities, and companies that are interested in getting their students and employees officially certified!

    The Fundamentals Certification offers the right balance of academic excellence and real world skills to give students the confidence and motivation they need to succeed both in educational and professional environments.

    It is a great opportunity for companies who are interested in certifying their employees to refresh and add new skills to their repertoire.

    Want to learn more? Additional information can be found here.

    El examen de Certificación Fundamentals, está ahora disponible en Español e Italiano

    Para entusiastas, el examen de Certificación Fundamentals, es el primer nivel del Programa de certificación Arduino (ACP), diseñado para evaluar el conocimiento de los participantes en electrónica, programación y computación física relacionadas con Arduino.

    El examen está disponible para todos los interesados ??en certificar oficialmente sus habilidades y conocimientos en Arduino, que podrían, por ejemplo, mencionarse en un currículum con fines académicos o profesionales.

    ¡Certifica a tus estudiantes, colegas y equipo de trabajo!

    La certificación también está disponible para escuelas, instituciones académicas, universidades y empresas que estén interesadas en certificar oficialmente a sus estudiantes y equipo de trabajo.

    La Certificación Fundamentals ofrece el equilibrio adecuado entre excelencia académica y habilidades del mundo real, para brindar a los estudiantes la confianza y la motivación que necesitan para tener éxito tanto en entornos académicos como profesionales.

    También es una gran posibilidad para compañías que están interesadas en certificar a su equipo de trabajo para actualizar y agregar nuevas habilidades a su repertorio.

    Para saber más visita: https://store.arduino.cc/digital/cert_fundamentals.

    Siamo lieti di annunciare che l’esame per la certificazione Arduino Fundamentals è da adesso disponibile anche in spagnolo e italiano! 

    Desideriamo rendere accessibile la Certificazione alle scuole, alle istitutuzioni, università e aziende che siano interessate a certificare ufficialmente i propri studenti e dipendenti! La certificazione Arduino Fundamentals offre il giusto equilibrio fra l’acquisizione di abilità accademiche e lavorative, fornendo agli studenti la sicurezza e la motivazione necessarie per riuscire nel mondo accademico e professionale. E’ inoltre un increndibile possibilità per le aziende interessate ad aggionarne, migliorare e/o accrescere le capacità dei propri dipendenti.

    Per saperne di più, visitate: https://store.arduino.cc/digital/cert_fundamentals.

    Website: LINK

  • Connect your Raspberry Pi 4 to an iPad Pro

    Connect your Raspberry Pi 4 to an iPad Pro

    Reading Time: 2 minutes

    Have you ever considered attaching your Raspberry Pi 4 to an Apple iPad Pro? How would you do it, and why would you want to? Here’s YouTuber Tech Craft to explain why Raspberry Pi 4 is their favourite iPad Pro accessory, and why you may want to consider using yours in the same way.

    We’ve set the video to start at Tech Craft’s explanation.

    My Favourite iPad Pro Accessory: The Raspberry Pi 4

    The Raspberry Pi 4 is my favourite accessory to use with the iPad Pro. In this video, learn more about what the Pi can do, what gear you need to get running with one, how to connect it to your iPad and what you’ll find it useful for.

    Having installed Raspbian on Raspberry Pi and configured the computer to use USB-C as an Ethernet connection (read Ben Hardill’s guide to find out how to do this), Tech Craft could select it as an Ethernet device in the iPad’s Settings menu.

    So why would you want to connect your Raspberry Pi 4 to your iPad? For starters, using your iPad instead of a conventional HDMI monitor will free up desk space, and also allow you to edit your code on the move. And when you’ve connected the two devices like this, you don’t need a separate power lead for Raspberry Pi, because the iPad powers the computer. So this setup is perfect for train or plane journeys, or for that moment when your robot stops working at a Raspberry Jam, or for maker conventions.

    You can also use Raspberry Pi as a bridge between your iPad and portable hard drive, for disk management.

    Tech Craft uses the SSH client Blink to easily connect to their Raspberry Pi via its fixed IP address, and with Juno Connect, they connect to a running Jupyter instance on their Raspberry Pi to do data science work.

    For more information on using Raspberry Pi with an iPad, make sure you watch the whole video. And, because you’re a lovely person, be sure to subscribe to Tech Craft for more videos, such as this one on how to connect wirelessly to your Raspberry Pi from any computer or tablet:

    Mobile Raspberry Pi with ANY iPad. No USB-C needed.

    Following on my from earlier video about pairing the Raspberry Pi 4 with the iPad Pro over USB-C, this video show how to pair any iPad (or iPhone, or Android tablet) with a Pi4 or a Pi3 over WiFi.

    Website: LINK

  • Designing an extremely realistic animatronic heart with Arduino

    Designing an extremely realistic animatronic heart with Arduino

    Reading Time: 2 minutes

    Designing an extremely realistic animatronic heart with Arduino

    Arduino TeamJanuary 17th, 2020

    In his latest video, Will Cogley has created an animatronic heart so realistic that you might wonder if it’s the actual thing. 

    The device is made out of molded silicon with fake blood poured on top to enhance the effect, and inside a trio of servo motors push the lower and upper sections of the prop out in a very lifelike pattern. 

    Control is via an Arduino Micro along with an I2C servo controller, while power is provided by an external tether. A potentiometer on the back is used to vary heartbeat speed. 

    He also made a simpler — and less potentially terrifying — version with a cloth exterior. This one is battery-operated and runs on a motor and linkage system, perhaps making it good for a nice portable joke!

    [youtube https://www.youtube.com/watch?v=8-jlu4yoHm0?start=517&feature=oembed&w=500&h=281]

    Website: LINK

  • Fake cases — make sure yours is the real deal

    Fake cases — make sure yours is the real deal

    Reading Time: 4 minutes

    We’ve had some reports of people finding cases that pretend to be official Raspberry Pi products online — these are fakes, they’re violating our trademark, they’re not made very well, and they’re costing you and us money that would otherwise go to fund the Raspberry Pi Foundation’s charitable work. (Reminder, for those who are new to this stuff: we’re a not-for-profit, which means that every penny we makes goes to support our work in education, and that none of us gets to own a yacht.)

    Making sure your accessories are legit

    If you want to be certain that the Raspberry Pi accessories you buy are the real thing, make sure you’re purchasing from one of our Authorised Resellers: if you buy via our website, you’ll automatically be directed to the Authorised Resellers in your region. Lots of other vendors also sell the official case, so if you’re wondering whether yours is the real thing, we’ve found there are some easy ways to tell the difference.

    A wellwisher sent us one of the fake cases (elegantly photographed by Fiacre above), which we passed around the office with a great deal of wincing, imagining what you guys might say if you got your hands on one and thought we’d made it. They’re really not very nice; the moulding’s awful, the fit’s bad, the colour’s off, and we’d be embarrassed if we had made something like this ourselves.

    Asking the experts

    We thought we’d ask the good people at T-Zero, who did all the work on the tooling and injection moulding for the real case (which is a considerably harder job than we’d imagined at first — you can read about the very bumpy road we had before finding T-Zero, who are amazing partners, in this post from days of yore), why the fake cases look so hideous. Simon Oliver, Grand Poobah of Plastics, wrote back:

    Basically, what you are witnessing is very cheaply and quickly made tooling. The flash is just poor toolmaking. The rounded edges are due to the toolmaking method of milling everything, which is quick and cheap, but you can’t get definition of sharp corners because you have to have a radius in places. I have tried to explain it below, and you have to think in reverse for the tool.

    Milling artifacts

    Can you imagine how many electrodes are needed for the logo? The leaves around the top have to be laser-cut into an electrode to get the definition. See screen grabs of the tool and moulding — look how many sharp corners there are!

    CAD representations of logo and tool

    To properly make a tool for something this complicated, you need more electrodes than someone quickly copying a case like this would find economical. The official Raspberry Pi case needed 140 electrodes to produce the tool.

    Electrodes

    A few of the electrodes that went to make the injection moulding tool for the official case

    Reverse-engineering by digitising existing components in a CAD will also loose definition, particularly in sharp corners, as the moulding process will form a small radius even if the tool is a sharp corner.

    Plastic shrinks away from a 90 degree corner, leaving a smallish radius in any case. So your data from digitising will have a radius, and then [the producers] compound it by milling the lot.

    Finally, the colour is off! It took ages to get your Raspberry Pi red correct. A lot of suppliers can’t repeat it; the current supplier had five attempts!

    Thanks, Simon; and to everybody reading this, we hope it arms you with the confidence to make sure you’re buying a genuine product!

    FYI

    Before panic ensues, please note: we love third-party cases designed for Raspberry Pi. So much so that we sell a few of them in our store here in Cambridge.

    The internet is full of innovative cases you can purchase, as well as wonderful 3D-printable alternatives you can make yourself, and as long as they aren’t breaking any trademark rules — using our logo, copying the work of others, pretending to be official when they’re not — that’s great!

    If you’ve designed a case for any of the Raspberry Pi models, share it with us in the comments below, as we’d love to see your work. And if you see a case, or any other Raspberry Pi accessory, for sale that you think is breaking trademark rules or attempting to imitate our official products, please let us know.

    Website: LINK

  • Raspberry Pi Kit and Gadget Guide

    Raspberry Pi Kit and Gadget Guide

    Reading Time: 11 minutes

    We all know that Santa loves a mince pie, but did you know that he is often partial to leaving Raspberry Pi boards under the tree of those on his ‘nice’ list?

    Well, if you got a Raspberry Pi for Christmas, then you may want to know about some of the awesome accessories you can get for it to really get the most out of your brand new computer. With so many cool accessories available, it can be a minefield knowing which ones to go for, so let us help you make up your own mind based on some ideas of ours.

    Raspberry Pi cases

    We think Raspberry Pi looks cool as it is, but a case is a highly recommended accessory. Not only will it protect your Raspberry Pi and the delicate circuitry, it can also enhance the way some of the additional accessories work when used in combination.

    Official Raspberry Pi 4 Case

    If you want an affordable, reliable, and hackable case, then you cannot go wrong with the official Raspberry Pi case. Available in red and white or black and grey, this case will house your Raspberry Pi with ease. If you’re feeling adventurous, you can also hack the case to fit a small fan for cooling!

    Price: £5
    magpi.cc/case

    The official Raspberry Pi 4 case comes in black, red, white or grey

    Pibow Coupé 4

    The Pibow by Raspberry Pi veterans Pimoroni is a classic Raspberry Pi case. Designed to be quick, easy, and cheap, the Pibow is made up of multiple layers of laser-cut acrylic. The Coupé version is slimmed down and gives easy access to Raspberry Pi’s GPIO and other inputs.

    Price: £8
    magpi.cc/pibow

    Assembling the Pibow Coupe case’s rainbow layers is fun and the result looks great

    SecurePi Case

    The SecurePi case looks very futuristic, especially with those angles! This case provides protective covers for your microSD card, USB, Ethernet and micro HDMI ports, and also has venting which is ideal for providing airflow for keeping your Raspberry Pi cool. It has space for the PoE HAT or Fan SHIM too!


    Price:
    £10 magpi.cc/securepi

    SecurePi provides a protective cover for your microSD card, USB, Ethernet and microHDMI slots and also has an air vent on top

    Aluminium Raspberry Pi 4 Case

    Aluminium is a great, lightweight metal that is also strong and is an ideal choice for a Raspberry Pi case because of these properties. This case looks great, especially if used as part of a 4K home media setup. With the holes, the cooling potential is also fantastic.
    Price: Price: £10
    magpi.cc/aluminium

    The Aluminium Raspberry Pi 4 case is strong, light and has holes to keep things cool

    Anidees Raspberry Pi 4 Case

    Made of aluminium, the Anidees case provides ample protection for your precious Raspberry Pi. It comes in two colours – silver or black – and has an extra tall version to accommodate some HATs too. Oh, and it has an clear lid so you can see your Raspberry Pi in all its glory!

    Price: £37
    magpi.cc/anidees

    Anidees Raspberry Pi 4 case: choose the extra-tall model if you want your case to accommodate some HATs too

    Our biggest fan

    Raspberry Pi 4 is the most powerful Raspberry Pi yet. All this horsepower means it can get a bit hot, though. The most effective cooling method is active cooling, which is typically accomplished with a fan. The Fan SHIM is perfect as it is low-profile, inexpensive and allows you to use the GPIO pins for other accessories.

    The Fan SHIM has a low profile and effectively cools the Raspberry Pi 4

    Essential add-ons

    Raspberry Pi Keyboard

    You’ll need a keyboard in pretty much every Raspberry Pi project going. The Raspberry Pi Keyboard comes in a variety of layout options, and is available in two colour schemes. Not only does the keyboard connect via USB, it also has three additional USB 2.0 ports to free up ports on your Raspberry Pi.

    Price: £16 magpi.cc/keyboard

    The Official Raspberry Pi Keyboard double as a hub with three extra USB ports

    Raspberry Pi Mouse

    Something simple, yet extremely effective and an essential accessory for any Raspberry Pi project, allowing you to navigate through any graphical user interface. The Raspberry Pi Mouse, when combined with the Raspberry Pi Keyboard, can be powered from the keyboard’s USB hub, keeping those precious ports free on your Raspberry Pi itself.

    Price: £7
    magpi.cc/mouse

    Rii i8+ Mini Wireless Keyboard

    If you want to go one step further, why not combine the keyboard and mouse into one and make it wireless while you’re at it? With the Rii i8 Mini Wireless Keyboard with Touchpad, you can do just that! The supplied USB wireless dongle plugs into your Raspberry Pi and connects automatically.

    Price: £18
    magpi.cc/wirelesskeys

    The Rii i8+ mini wireless keyboard is a convenient way to add functionality to your Raspberry Pi setup

    Retro Cube Bluetooth Speaker

    Why use a USB port or cable when you can use Bluetooth to keep things wireless? This little speaker, by retro gamepad specialists 8bitdo, is a fantastic little Bluetooth speaker. Styled like a retro console controller, this rechargeable speaker provides up to eight hours play after one hour of charging.

    Price: £18 magpi.cc/speaker

    The 8bitdo Bluetooth speaker entertains for up to 8 hours before needing to be recharged

    4 Port USB Hub

    Whilst Raspberry Pi has four USB ports, they can be used up quickly depending on how you are using it. Having a dedicated USB hub is always handy, particularly if you have a Raspberry Pi Zero. This four-port hub has both USB and micro USB connectors, so works on any Raspberry Pi!

    Price: £8 magpi.cc/usbhub

    With both standard USB-A and microUSB ports, this 4-port hub has you covered

    We recommend: USB microSD card adapter

    If you’re regularly writing microSD card images for your Raspberry Pi, a USB microSD card adapter is a great tool to have, especially if your computer doesn’t have an SD card slot.

    magpi.cc/usbsd

    Cool HATs

    There are hundreds of HATs available for Raspberry Pi. As they are so easy to connect and set up, they are a perfect accessory

    Enviro

    The Enviro is a fantastic piece of kit. It allows you to monitor a number of environmental factors, such as temperature, light, and sound. The fully-featured Enviro + Air Quality version also includes a gas sensor. Simply connect to your Raspberry Pi, install the code, and you’ll have your very own monitoring station.

    Price: £28
    magpi.cc/enviro

    Use the Enviro HAT to monitor temperature, light and sound. There's also a version that measures air quality and acts as a gas sensor

    Display-O-Tron HAT

    The Display-O-Tron HAT is a fantastic little screen, backlit with controllable RGB LEDs, has six capacitive touch buttons, and also features a small LED bar graph! If you want to run your Raspberry Pi ‘headless’ (i.e. without a screen connected), then the Display-O-Tron HAT is ideal.

    Price: £23
    magpi.cc/displayotron

    Display-O-Tron HAT: ideal for displaying data without a computer screen

    Sense HAT

    If you want something a little more ‘out of this world’, then the Sense HAT is a perfect choice. Used on the International Space Station as part of AstroPi, the Sense HAT monitors temperature, humidity, pressure, and orientation. It also has an 8×8 LED matrix on top for additional display purposes.

    Price: £30 magpi.cc/sensehat

    The Sense HAT - as used on the International Space Station - is packed with environment-monitoring sensors

    TV HAT

    TV on a Raspberry Pi? Yes, that’s right! With the TV HAT and a bit of configuration, you can set your Raspberry Pi to receive terrestrial television channels. It is even possible to record TV shows so that you can watch them back at your leisure too!

    Price: £20
    magpi.cc/tvhat

    Use the TV HAT to receive terrestrial TV signals on your Raspberry Pi

    pHAT DAC

    A DAC (digital-to-analogue converter) is a must for anybody who takes listening to music seriously. The quality of your music is much better when a DAC is used, and the pHAT DAC is a great little accessory that you can use to play music to your heart’s content.

    Price: £13
    magpi.cc/phatdac

    pHAT DAC materially improves audio on your Raspberry Pi

    Electronic starter kits

    A Raspberry Pi can do more than play retro games or videos. Thanks to the GPIO pins, you can interact with a variety of sensors and devices.

    Jam HAT (LED & Buzzer Board)

    If you’re not that good at soldering and want something that is pre-assembled in a HAT form, then the Jam HAT is a great alternative. With LEDs, buttons and a buzzer, you can use the code examples provided to create your own unique projects, all for under a tenner!

    Price: £7
    magpi.cc/jamhat

    Jam HAT is a simple board that adds LEDs, buttons and a buzzer to give pizzazz to your coding projects

    CamJam EduKit

    Prototyping is a great way to start experimenting with sensors, LEDs, buzzers, and everything else that can be connected to a Raspberry Pi. The CamJam EduKit contains a breadboard, an essential tool that allows you to make your own prototype circuits without soldering a thing, as well as other essential components.

    Price: £5
    magpi.cc/edukit

    CamJam EduKit provides buzzers, sensors, LEDs, a breadboard and connectors for prototyping circuits

    We recommend: Resistor lead bending tool

    Prototyping is essential, and this handy tool makes it easier to bend those resistors into breadboard-friendly form.

    magpi.cc/resistorbend

    Gaming kits

    Feeling adventurous? Have a go at building your own Raspberry Pi-powered gaming setup.

    TinyPi Pro

    What good is a portable games console unless it fits in the smallest of pockets? Enter the TinyPi Pro – a do-it-yourself kit that is a small but perfectly formed games console. These sell like hot cakes, but are a real gem if you can get a hold of one, and you’ll learn lots during the build.

    Price: £90 magpi.cc/tinypipro

    TinyPi Pro offers a DIY approach to portable gaming

    BASIC Monster Arcade Controller Kit

    If the full Picade kit is a bit too lavish for you, then the Arcade Controller Kit by Monster is a great alternative. With this kit, you’ll build an arcade stick that houses your Raspberry Pi, which can be connected to your TV for a more portable setup.

    Price: £60
    magpi.cc/monsterbasic

    BASIC Arcade Controller Kit is a Raspberry Pi house-cum-joystick

    PiGRRL 2.0 kit

    If you fancy 3D-printing your own case (designs are included) and putting your build skills to the test, then consider the PiGRRL 2.0 kit. You’ll need to supply the Raspberry Pi and the case, but you’ll have a great time putting it all together and testing it out when complete.

    Price: £56
    magpi.cc/pigrll2

    PiGRRL 2: Make your own handheld games console with a case and parts you print yourself

    Picade

    When it comes to arcade kits, Pimoroni’s Picade is king, and for very good reason! The kit is expertly crafted and has been refined since it was initially launched after a successful Kickstarter campaign. It comes in two options – with an 8-inch or 10-inch display – and with detailed step-by-step build instructions and videos.

    Price: £150 to £195
    magpi.cc/picade

    Pimoroni Picade is an expertly crafted miniature arcade machine

    Gaming accessories

    Raspberry Pi is an excellent choice for emulating and playing retro games. But what accessories should you consider?

    SN30 Pro+ Bluetooth Gamepad

    There are so many controllers to choose from, but 8BitDo’s wireless gamepads are an excellent choice. The quality and looks of these controllers really add that ‘wow’ factor to any retro gaming build. This one has analogue thumbsticks and comes in a choice of three colours.

    Price: £45
    magpi.cc/sn30pro

    8bitdo SN30 Pro+ Bluetooth games controller adds a wow factor to Raspberry Pi gaming

    MEGAPi Case

    If you’re going to build a retro gaming system, what better than this fantastic scaled version of the Sega Mega Drive from RetroFlag? Their cases are spectacularly well designed and this one is the perfect combination of nostalgia and functionality, especially with the programmable shutdown buttons and cooling fan.

    Price: £25 magpi.cc/megapi

    MEGAPi Case: a scaled-down version of the classic Sega Mega Drive complete with programmable buttons

    GPi Case

    Why not go one step further and make a portable retro gaming system? The GPi Case is a beautiful replica of a retro handheld console, and the attention to detail is breathtaking. A Raspberry Pi Zero (not supplied) is housed in a detachable cartridge and it even runs off regular AA batteries for gaming on-the-go.

    Price: £60
    magpi.cc/gpicase

    Create your own Raspberry Pi Zero-based retro handheld games console with the GPi Case

    Classic USB Games Controller

    If you want functionality without breaking the bank, then the classic USB game controller is an excellent choice. Modelled on a classic controller, this connects to your Raspberry Pi via USB – and a generous cable length means you don’t need to sit too close to your TV to play!

    Price:
    £8
    magpi.cc/usbcontroller

    At £8, the Retro-bit USB game controller is an affordable way to use your Raspberry Pi as a gaming device

    We recommend: Micro USB to USB-C adapter

    This little adapter lets you use your existing micro USB power supplies with the new-style USB-C ports on Raspberry Pi 4.

    magpi.cc/microusbc

    Robot building kits

    R2-D2 or C-3PO? Or are you more of a BB-8 fan? No matter your favourite, you can always build your own with one of these kits.

    CamJam EduKit #3

    If you are after a budget kit, this CamJam one is a great introduction to robotics. You’ll need to supply your own Raspberry Pi and chassis (something to attach the kit to), but it’s a great way of getting into the world of robotics before delving into something a little more complex.

    Price: £18 magpi.cc/edukit3

    CamJam EduKit #3 offers a low-cost introduction to robotics

    STS-Pi

    The STS-Pi is a great little robot kit that gives you the bare bones to build a two-wheeled roving robot. You’ll need to supply a Raspberry Pi, Camera Module, and motor driver (such as the Explorer pHAT), but you’ll learn the basics of robotics with this nifty kit.

    Price: £23
    magpi.cc/stspi

    STS-Pi is a great two-wheeler robot kit

    MeArm

    These types of robots are used in manufacturing and engineering plants – well, maybe not Raspberry Pi versions, but the same style. With the MeArm kit, you can build a robotic arm that is controlled using the two supplied thumbsticks (or with code). An ideal option for a budding robotics engineer!

    Price: £70
    magpi.cc/mearm

    MeArm is a controllable robotic arm - just like those used in industry

    MonsterBorg

    The title says it all here: this is the ultimate Raspberry Pi robot and is designed to withstand some punishment. The chassis is rugged and made of aluminium, and the wheels make it a great off-road choice, especially with the three hours run time. Oh, and it runs any side up, too!

    Price: £210
    magpi.cc/monsterborg

    We recommend: MotoZero

    A motor driver capable of powering four motors, this board is a great and affordable choice for any robotic build.

    magpi.cc/motozero

    Picade X HAT USB-C

    If you fancy building your own arcade setup without a kit, this add-on makes controller configuration a breeze. It works with the Pi 4 too!

    magpi.cc/xhat

    Picade Plasma kit

    Want flashy LED arcade buttons instead of plain ones? This kit adds all the jazziness you’ll need! It comes in six- or ten-button options.

    magpi.cc/picadeplasma

  • Code a Boulder Dash mining game | Wireframe #30

    Code a Boulder Dash mining game | Wireframe #30

    Reading Time: 4 minutes

    Learn how to code a simple Boulder Dash homage in Python and Pygame. Mark Vanstone shows you how. 

    The original Boulder Dash was marked out by some devious level design, which threatened to squash the player at every turn.

    Boulder Dash

    Boulder Dash first appeared in 1984 for the Commodore 64, Apple II, and the Atari 400/800. It featured an energetic gem collector called Rockford who, thanks to some rather low-resolution graphics, looked a bit like an alien. His mission was to tunnel his way through a series of caves to find gems while avoiding falling rocks dislodged by his digging. Deadly creatures also inhabited the caves which, if destroyed by dropping rocks on them, turned into gems for Rockford to collect.

    The ingenious level designs were what made Boulder Dash so addictive. Gems had to be collected within a time limit to unlock the exit, but some were positioned in places that would need planning to get to, often using the physics of falling boulders to block or clear areas. Of course, the puzzles got increasingly tough as the levels progressed.

    Written by Peter Liepa and Chris Gray, Boulder Dash was published by First Star Software, which still puts out new versions of the game to this day. Due to its original success, Boulder Dash was ported to all kinds of platforms, and the years since have seen no fewer than 20 new iterations of Boulder Dash, and a fair few clones, too.

    Our homage to Boulder Dash running in Pygame Zero. Dig through the caves to find gems – while avoiding death from above.

    Making Boulder Dash in Python

    We’re going to have a look at the boulder physics aspect of the game, and make a simple level where Rockford can dig out some gems and hopefully not get flattened under an avalanche of rocks. Writing our code in Pygame Zero, we’ll automatically create an 800 by 600-size window to work with. We can make our game screen by defining a two-dimensional list, which, in this case, we will fill with soil squares and randomly position the rocks and gems.

    Each location in the list matrix will have a name: either wall for the outside boundary, soil for the diggable stuff, rock for a round, moveable boulder, gem for a collectable item, and finally, rockford to symbolise our hero. We can also define an Actor for Rockford, as this will make things like switching images and tracking other properties easier.

    Here’s Mark’s code, which gets an homage to Boulder Dash running in Python. To get it working on your system, you’ll first need to install Pygame Zero. And to download the full code, go here.

    Our draw() function is just a nested loop to iterate through the list matrix and blit to the screen whatever is indicated in each square. The Rockford Actor is then drawn over the top. We can also keep a count of how many gems have been collected and provide a congratulatory message if all of them are found. In the update() function, there are only two things we really need to worry about: the first being to check for keypresses from the player and move Rockford accordingly, and the second to check rocks to see if they need to move.

    Rockford is quite easy to test for movement, as he can only move onto an empty square – a soil square or a gem square. It’s also possible for him to push a boulder if there’s an empty space on the other side. For the boulders, we need to first test if there’s an empty space below it, and if so, the boulder must move downwards. We also test to see if a boulder is on top of another boulder – if it is, the top boulder can roll off and down onto a space either to the left or the right of the one beneath.
    There’s not much to add to this snippet of code to turn it into a playable game of Boulder Dash. See if you can add a timer, some monsters, and, of course, some puzzles for players to solve on each level.

    Testing for movement

    An important thing to notice about the process of scanning through the list matrix to test for boulder movement is that we need to read the list from the bottom upwards; otherwise, because the boulders move downwards, we may end up testing a boulder multiple times if we test from the beginning to the end of the list. Similarly, if we read the list matrix from the top down, we may end up moving a boulder down and then when reading the next row, coming across the same one again, and moving it a second time.

    Get your copy of Wireframe issue 30

    You can read more features like this one in Wireframe issue 30, available now at Tesco, WHSmith, all good independent UK newsagents, and the Raspberry Pi Store, Cambridge.

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

    Make sure to follow Wireframe on Twitter and Facebook for updates and exclusive offers and giveaways. Subscribe on the Wireframe website to save up to 49% compared to newsstand pricing!

    Website: LINK

  • Protect your veggies from hail with a Raspberry Pi Zero W

    Protect your veggies from hail with a Raspberry Pi Zero W

    Reading Time: 2 minutes

    Tired of losing vegetable crops to frequent summertime hail storms, Nick Rogness decided to build something to protect them. And the result is brilliant!

    Digital Garden with hail protection

    Tired of getting your garden destroyed by hail storms? I was, so I did something about it…maker style!

    “I live in a part of the country where hail and severe weather are commonplace during the summer months,” Nick explains in his Hackster tutorial. “I was getting frustrated every year when my wife’s garden was get demolished by the nightly hail storms losing our entire haul of vegetable goodies!”

    Nick drew up plans for a solution to his hail problem, incorporating liner actuators bolted to a 12ft × 12ft frame that surrounds the vegetable patch. When a storm is on the horizon, the actuators pull a heavy-duty tarp over the garden.

    Nick connected two motor controllers to a Raspberry Pi Zero W. The Raspberry Pi then controls the actuators to pull the tarp, either when a manual rocker switch is flipped or when it’s told to do so via weather-controlled software.

    “Software control of the garden was accomplished by using a Raspberry Pi and MQTT to communicate via Adafruit IO to reach the mobile app on my phone,” Nick explains. The whole build is powered by a 12V Marine deep-cycle battery that’s charged using a solar panel.

    You can view the full tutorial on Hackster, including the code for the project.

    Website: LINK

  • Learn R with Raspberry Pi

    Learn R with Raspberry Pi

    Reading Time: 3 minutes

    DataCamp

    Price: FREE (or $568 per year)

    Created by: datacamp.com

    R is a language intrinsically linked to data and statistical analysis. Popular with scientists and number crunchers, it has fans around the globe.

    If you’ve spent a lot of time in Python and other programming languages, some of the features of R are confusing at first. Assignment operators are arrows, and lists are one-indexed (with the first item starting at position one, rather than zero). All of this is designed to make working with large datasets more friendly.

    DataCamp is a great learning resource for R, Python, and SQL. It uses a web-based code editor (which admittedly, we have mixed feelings about). The basic course is free, and you can pay for a DataCamp subscription to access a wide range of advanced courses. A subscription isn’t cheap though, coming in at over $568 per year, although there are frequent half-price sales and it is aimed at budding data scientists.

    Datacamp helps you learn the statistic-focused language and is ideal for wannabe data scientists

    Coursera

    Created by: Duke University & John Hopkins University
    Price: £38 / $49 (per month)

    Coursera offers a range of courses from universities. There are two that should be of interest. The first is Introduction to Probability and Data from Duke University (magpi.cc/courseraprobability), with a 4.7 star rating. Led by Mine Çetinkaya-Rundel, Associate Professor of the Practice Department of Statistical Science, the course features R, but it’s more about learning to crank data. It gives you a grounding in probability and Bayes’ rule. It covers sampling methods, and forms part of a larger Statistics with R Specialization, which you can take to learn more about R.

    The second suggested course is R Programming from John Hopkins University (magpi.cc/courserar). This will get you closer to the R language.
    After a seven-day free trial, you’ll pay Coursera a monthly fee to access the courses.

    Coursera provides access to online learning tools provided by respected academic institutions

    Introduction to R for Data Science

    Created by: Microsoft

    Price: FREE ($99 certificate)

    We’re big fans of the edX platform, which offers a range of courses from respected universities and organisations. Its Introduction to R for Data Science course is provided by Microsoft and runs on the DataCamp platform (so it’s an interactive web approach). This is interspersed with video tutorials and short online quizzes. The edX community is vibrant, with an active forum that is ready to answer any questions you might have.

    It’s an accessible course and, thanks to being on edX, you can enrol and take the course for free. You only need to pay to get a certificate at the end.

    The edX platform offers curated learning content from the likes of Harvard, MIT and Microsoft

    R websites

    Bookmark these webpages while learning R.

    R-bloggers

    R-bloggers is a website aggregator for blogs on R. In it, you’ll find the latest contributions from hundreds of different R bloggers.

    Keep abreast of what's being posted online about R with the R-blogger content aggregator

    R-exercises

    R-exercises aims to help people develop and improve their R programming skills. R-exercises was initiated and is maintained by Research for Decisions, a Dutch research and consulting firm.

    Revolutions

    Revolutions (blog.revolutionanalytics.com) is a blog dedicated to news for the R community. It’s a great place to find out recent developments and news.

    Data sources

    Data

    The US and UK governments have made huge datasets open. Everything from business figures to the environment, through mapping and spending, can be found online at
    data.gov.uk.

    The UK and US governments publish vast data sets you can use. UK ones can be found at data.gov.uk

    Kaggle

    Kaggle is an online community owned by Google. It’s a great resource for datasets, as well as featuring blogs, competitions, and tools.

    Dataquest

    There’s a range of datasets around, from Google, Wikipedia, and Amazon, and even news outlets such as BuzzFeed. Dataquest has a great list of sources for you to bookmark.

  • Can algorithms be unethical?

    Can algorithms be unethical?

    Reading Time: 5 minutes

    At Raspberry Pi, we’re interested in all things to do with technology, from building new tools and helping people teach computing, to researching how young people learn to create with technology and thinking about the role tech plays in our lives and society. One of the aspects of technology I myself have been thinking about recently is algorithms.

    An illustration of a desktop computer above which 5 icons are shown for privacy, culture, law, environment, and ethics

    Technology impacts our lives at the level of privacy, culture, law, environment, and ethics.

    All kinds of algorithms — set series of repeatable steps that computers follow to perform a task — are running in the background of our lives. Some we recognise and interact with every day, such as online search engines or navigation systems; others operate unseen and are rarely directly experienced. We let algorithms make decisions that impact our lives in both large and small ways. As such, I think we need to consider the ethics behind them.

    We need to talk about ethics

    Ethics are rules of conduct that are recognised as acceptable or good by society. It’s easier to discuss the ethics of a specific algorithm than to talk about ethics of algorithms as a whole. Nevertheless, it is important that we have these conversations, especially because people often see computers as ‘magic boxes’: you push a button and something magically comes out of the box, without any possibility of human influence over what that output is. This view puts power solely in the hands of the creators of the computing technology you’re using, and it isn’t guaranteed that these people have your best interests at heart or are motivated to behave ethically when designing the technology.

    An icon with the word 'stakeholders' below it

    Who creates the algorithms you use, and what are their motivations?

    You should be critical of the output algorithms deliver to you, and if you have questions about possible flaws in an algorithm, you should not discount these as mere worries. Such questions could include:

    • Algorithms that make decisions have to use data to inform their choices. Are the data sets they use to make these decisions ethical and reliable?
    • Running an algorithm time and time again means applying the same approach time and time again. When dealing with societal problems, is there a single approach that will work successfully every time?

    Below, I give two concrete examples to show where ethics come into the creation and use of algorithms. If you know other examples (or counter-examples, feel free to disagree with me), please share them in the comments.

    Algorithms can be biased

    Part of the ‘magic box’ mental model is the idea that computers are cold instructions followers that cannot think for themselves — so how can they be biased?

    Humans aren’t born biased: we learn biases alongside everything else, as we watch the way our family and other people close to us interact with the world. Algorithms acquire biases in the same way: the developers who create them might inadvertently add their own biases.

    An illustration of four people using smartphones

    Humans can be biased, and therefore the algorithms they create can be biased too.

    An example of this is a gang violence data analysis tool that the Met Police in London launched in 2012. Called the gang matrix, the tool held the personal information of over 300 individuals. 72% of the individuals on the matrix were non-white, and some had never committed a violent crime. In response to this, Amnesty International filed a complaint stating that the makeup of the gang matrix was influenced by police officers disproportionately labelling crimes committed by non-white individuals as gang-related.

    Who curates the content we consume?

    We live in a content-rich society: there is much, much more online content than one person could possibly take in. Almost every piece of content we consume is selected by algorithms; the music you listen to, the videos you watch, the articles you read, and even the products you buy.

    An illustration of a phone screen showing an invented tweet asking where people get their news from

    Some of you may have experienced a week in January of 2012 in which you saw a lot of either cute kittens or sad images on Facebook; if so, you may have been involved in a global social experiment that Facebook engineers performed on 600,000 of its users without their consent. Some of these users were shown overwhelmingly positive content, and others overwhelmingly negative content. The Facebook engineers monitored the users’ actions to gage how they responded. Was this experiment ethical?

    In order to select content that is attractive to you, content algorithms observe the choices you make and the content you consume. The most effective algorithms give you more of the same content, with slight variation. How does this impact our beliefs and views? How do we broaden our horizons?

    Why trust algorithms at all then?

    People generally don’t like making decisions; almost everyone knows the discomfort of indecision. In addition, emotions have a huge effect on the decisions humans make moment to moment. Algorithms on the other hand aren’t impacted by emotions, and they can’t be indecisive.

    While algorithms are not immune to bias, in general they are way less susceptible to it than humans. And if a bias is identified in an algorithm, an engineer can remove the bias by editing the algorithm or changing the dataset the algorithm uses. The same cannot be said for human biases, which are often deeply ingrained and widespread in society.

    An icon showing a phone screen with an internet browser symbol

    As is true for all technology, algorithms can create new problems as well as solve existing problems.

    That’s why there are more and less appropriate areas for algorithms to operate in. For example, using algorithms in policing is almost always a bad idea, as the data involved is recorded by humans and is very subjective. In objective, data-driven fields, on the other hand, algorithms have been employed very successfully, such as diagnostic algorithms in medicine.

    Algorithms in your life

    I would love to hear what you think: this conversation requires as many views as possible to be productive. Share your thoughts on the topic in the comments! Here are some more questions to get you thinking:

    • What algorithms do you interact with every day?
    • How large are the decisions you allow algorithms to make?
    • Are there algorithms you absolutely do not trust?
    • What do you think would happen if we let algorithms decide everything?

    Feel free to respond to other people’s comments and discuss the points they raise.

    The ethics of algorithms is one of the topics for which we offer you a discussion forum on our free online course Impact of Technology. The course also covers how to facilitate classroom discussions about technology — if you’re an educator teaching computing or computer science, it is a great resource for you!

    The Impact of Technology online course is one of many courses developed by us with support from Google.

    Website: LINK

  • Smart classroom assistant machine learning tutorial

    Smart classroom assistant machine learning tutorial

    Reading Time: 7 minutes

    First, you’ll create an assistant that uses a list of rules for understanding commands, and you’ll learn why that approach isn’t very good. Next, you will teach the assistant to recognise commands for different devices by training it using examples of each command.

    Smart-Classroom: Use machine learning and Scratch to turn on a lamp and control a fan

    1. Get started

    Head to machinelearningforkids.co.uk in a web browser. You’ll then need to click on ‘Get Started’, and then click on ‘Try it now’.

    The Machine Learning for Kids website helps you get started with AI

    2. Create a project

    Click on Projects in the menu bar at the top, and then click on the ‘+ Add a new project’ button. Name your project ‘smart classroom’ and set it to learn to recognise text, then click on Create. You should now see ‘smart classroom’ in the projects list; click on this project.

    Select Project templates and name your new project 'smart classroom'

    3. Prepare the project

    Now we need to get a project ready in Scratch. Click on Make, click on Scratch 3, then click on ‘Scratch by itself’. The page then warns you that you haven’t done any machine learning yet. Ignore this and click on ‘Scratch by itself’ to launch Scratch. Finally, click on ‘Project templates’ and then click on the ‘Smart Classroom’ template.

    4. Add a list of rules

    Figure 1: click on 'classroom' in the Scratch sprites pane

    In this step, you will edit the project to include a list of rules to activate and deactivate the fan and the lamp. Click the classroom sprite to select it, as shown in Figure 1. Click on the Code tab and create the script shown in Figure 2. Once you’ve done that, click on File and then on ‘Save to your computer’, and save the program to a file.

    Figure 2: The Scratch code for a rules-based approach

    5. First tests

    Click on the green flag to test your program, and then type in a command and watch the program react! The following commands should all work:

    Turn on the lamp
    Turn off the lamp
    Turn on the fan
    Turn off the fan

    Type in anything else and your program does nothing! Even if you make a small spelling mistake, the program does not react.

    6. Beyond rules

    You’re telling your virtual classroom assistant to react to commands using a simple rules-based approach. But if you wanted your program to understand commands that are phrased differently, you would need to add extra ‘if’ blocks.

    The problem with this rules-based approach is that you need to exactly predict all the commands the smart classroom assistant will understand. Listing every possible command would take a very, very long time. Next, you will try a better approach: teaching the computer to recognise commands by itself.

    7. Examples for training

    Close the Scratch window and go back to the Training tool, then click on the ‘< Back to project’ link. Click on the Train button because you need to collect some examples so that you can train the computer. To collect different examples, you need to create ‘buckets’ to put the examples in.

    Train your computer to recognise commands by adding text examples to the project. Make sure you assign each command to the correct 'bucket' so it results in the correct action

    To create a bucket, click on ‘+ Add new label’ and call the bucket ‘fan on’. Click on ‘+ Add new label’ again and create a second bucket called ‘fan off’. Create a third and a fourth bucket called ‘lamp on’ and ‘lamp off’.

    Click on the ‘Add example’ button in the ‘fan on’ bucket, and type in a command asking for the fan to be turned on. For example, you could type ‘Please can you switch on the fan’. For the ‘fan off’ bucket, you’ll need to click ‘Add example’ again and then use something like ‘I want the fan off now’. Do the same for the ‘lamp on’ and ‘lamp off’ buckets.

    Add as many and as varied example phrases as you can for each command

    8. More examples for more training

    Continue to add examples until you have at least six examples in each bucket. Be imaginative! Try to think of lots of different ways to ask each command.

    For example:

    For ‘fan on’, you could complain that you’re too hot.
    For ‘fan off’, you could complain that it’s too breezy.
    For ‘lamp on’, you could complain that you can’t see.
    For ‘lamp off’, you could complain that it’s too bright.

    More is good: the more examples you give your program, the better the program should get at recognising your commands.

    Use equal numbers: add roughly the same number of examples for each command. If you have a lot of examples for one command and not the others, this can affect the way that the program learns to recognise commands.

    Make the examples really different from each other: try to come up with lots of different types of examples. For instance, make sure that you include some long examples and some very short ones.

    9. Start the training

    You will now train the program using the examples, and then test it. The program will learn from patterns in the examples you give it, such as the choice of words and the way sentences are structured. Then, based on the patterns the program finds, it can interpret new commands.

    Click on the ‘< Back to project’ link, then click on ‘Learn & Test’. Click on the ‘Train new machine learning model’ button. If you have enough examples, the program should start to learn how to recognise commands from these examples.

    10. Test the training

    Wait for the training to complete. This might take a minute or two but once the training has completed, a test box appears. Test your machine learning model to see what it has learned by typing in one of the commands you added to a bucket, and then press ENTER. The command should be recognised.

    Now type in commands that are not in the buckets. If you’re not happy with how the computer recognises the commands, go back to the previous step and add some more examples. Then select the ‘Train new machine learning model’ button again.

    Instead of writing rules for the program, you are giving the program examples. The program uses the examples to train a machine learning model. Because you are supervising the program’s training by giving examples, this machine learning approach is called supervised learning.

    11. Use it in Scratch

    Now update your Scratch program to include your machine learning model instead of the rules-based approach. Click on the ‘< Back to project’ link, click on Make, then Scratch 3. Here you can read the instructions on the page to learn how to use machine learning blocks in Scratch.

    Click on Open in Scratch 3, then on File and ‘Load from your computer’, and select the Scratch project you saved earlier. When Scratch asks you whether to replace the current project, click on OK.

    Click on the Code tab, and update your Scratch code (Figure 3) to use your machine learning model instead of the rules you first added. The ‘recognise text’ block is a new block added by your project. This new block can receive a message and return one of the four labels, based on the machine learning model you have trained.

    Figure 3: Revised for a machine learning approach, the code features ‘recognise text’ blocks

    12. Scratch AI

    Click the green flag to test your new code. Test your project by typing a command and pressing ENTER on your keyboard. The fan or lamp should react to your command.

    Make sure you test that this works even for commands that you didn’t include as examples in the buckets.

    Save your project as before. Your Scratch smart virtual classroom now uses a machine learning model instead of a rules-based approach. Using machine learning is better than using rules, because training a program to recognise commands for itself is much quicker than trying to make a list of every possible command.

    Top tip: machine learning

    You need to tell an AI what to learn. The more you give it to learn with, the better it will be. The more examples you use to train the machine learning model, the better your program should get at recognising commands.

    To learn about how to can improve the model with ‘confidence scores’, head to magpi.cc/smartclassroom.

    Top tip: Go further

    Can you get the model to tell you the weather or date? Give it a go!

    Top tip: Bring more projects to life

    Want to discover more great ‚makes‘? You can find this project and others on the Raspberry Pi projects website.

    Head to Raspberry Pi's dedicated Projects website for more great 'makes'

  • Pick colors from real things with this portable tool

    Pick colors from real things with this portable tool

    Reading Time: < 1 minute

    Pick colors from real things with this portable tool

    Arduino TeamJanuary 14th, 2020

    If you want a red piece of paper, or a blue pen, what does that really mean? If you’d like to get more specific, Michael Klements’ Arduino-based scanner lets you quantify colors in numerical RGB values via a TCS34725 sensor.

    User interface for the handheld device is extremely simple, with a single button to trigger the sensor and measure colors, along with a 16×2 panel. An optional RGB LED attempts to copy the shade of whatever object you’re aiming at, providing a handy reference to verify it’s working correctly. 

    You can see the build process in the video below, first constructed on a breadboard and then placed in a more permanent soldered configuration with a 3D-printed case.

    [youtube https://www.youtube.com/watch?v=JeYrPW01xNA?feature=oembed&w=500&h=281]

    Website: LINK

  • How to control multiple servo motors with Raspberry Pi

    How to control multiple servo motors with Raspberry Pi

    Reading Time: 2 minutes

    In the latest Explaining Computers video, Christopher Barnatt explains how to use servo motors with Raspberry Pi. Using servos is a great introduction to the digital making side of computing; servos allow you to control the movement of all manner of project components with your Raspberry Pi and a motor controller attached to its GPIO pins.

    Raspberry Pi Servo Motor Control

    Control of SG90 servos in Python on a Raspberry Pi, including an explanation of PWM and how a servo differs from a motor. You can download the code from the video at: https://www.explainingcomputers.com/pi_servos_video.html The five-pack of SG90 servos used in this video was purchased on Amazon.co.uk here: https://www.amazon.co.uk/dp/B07H9VC698/ref=nosim?tag=explainin-21 with a similar product on Amazon.com here: https://amzn.to/2QHshx3 (affiliate links).

    Servos and your Raspberry Pi

    Christopher picked up his SG90 servo motors online, where you’ll find a variety of servo options. What type of servo you need depends on the project you want to create, so be sure to consider the weight and size of what you plan to move, and the speed at which you need to move it.

    As the motor controller connects via GPIO, you can even use the tiny £5 Raspberry Pi Zero to control your servo, which makes adding movement to your projects an option even when you’re under tight space constraints.

    Find out more

    For other detailed computing videos, be sure to subscribe to the Explaining Computers YouTube channel.

    And for more Raspberry Pi projects, check out the Raspberry Pi projects page.

    Raspberry Pi projects PSA

    We’re always looking for people to join our incredible community of translators to help us translate our free resources, including the free projects found on our projects page.

    If you speak English and another language and would like to give a portion of your time to making our resources available to more people across the globe, sign up as a translator today.

    Website: LINK

  • Aquatic Mini Observation System

    Aquatic Mini Observation System

    Reading Time: 3 minutes

    “My project is named AMOS (Aquatic Mini Observation System),” Murray tells us. “It is a solar-powered, autonomous airboat for measuring water quality over large, distributed areas.”

    Murray has worked on a couple of prototypes for the boat. The first one was made out of a kayak beer cooler (a small kayak that acts as a beer cooler) and had propellers that would end up getting gunked up. He also tested distance measuring with a Raspberry Pi Compute Module’s stereo vision before settling on a lidar module and a Raspberry Pi 3B+.

    “During this past winter, I built a second prototype, this time using a longer surfboard-type design constructed from glued-together insulation foam that was given a coat of fibreglass to give it some added strength and stiffness,” Murray explains. “Instead of the water propellers, a single 10-inch drone propeller and motor were used and connected to a small waterproof servo motor at the stern end of the boat. This design was lighter (about 13 kg) and longer, and although the air propeller only produced about a tenth of the thrust provided by the dual water propellers, the improved draft and hydrodynamic shape made it slightly faster in the water.”

    Sensors of all kinds are placed on the AMOS, both for navigation and data collection

    A Raspberry Pi controls the speed and angle of the air propeller, takes sensor readings from the water, interacts with the lidar module, and has several other functions so that it knows its speed and heading.

    “I’m hoping that AMOS will be used for water testing by environmental services companies, and industrial customers such as mine operators that may be required by law to confirm that pollution limits in bodies of water surrounding their operations are not exceeded,” Murray reveals. “I’m hoping also to be able to offer it at an attractive price point, with modular components so that researchers or robotic boat enthusiasts could also use it, or some subset of it, in their own projects.”

    Major tests

    The prototypes aren’t just proofs of concept, either: they’re fully functioning test beds, as Murray explains: “Approximately 150 km of testing has been completed on the second AMOS prototype in 2019. It can work well in shallow water (as little as 2 cm depth) and can travel through regions of water with lots of grass or other vegetation without any worries about getting stuck. Its airboat design works best under conditions of low wind (less than 20 km/h) and it can travel at a top speed of about 2.7 knots (5 km/h). Provided the sun is shining on a clear day and higher than about 40 degrees in the sky, AMOS can run at top speed without depleting the charge of its battery.”

    Murray plans for AMOS to be on sale in the summer, so you don’t have too long to wait.

    The AMOS is solar powered, and can maintain itself all day when it's sunny

  • Playing The Doors with a door (and a Raspberry Pi)

    Playing The Doors with a door (and a Raspberry Pi)

    Reading Time: 2 minutes

    Floyd Steinberg is back with more synthy Raspberry Pi musical magic, this time turning a door into a MIDI controller.

    I played The Doors on a door – using a Raspberry PI DIY midi controller and a Yamaha EX5

    You see that door? You secretly want that to be a MIDI controller? Here’s how to do it, and how to play a cover version of “Break On Through” by The Doors on a door 😉 Link to source code and the DIY kit below.

    If you don’t live in a home with squeaky doors — living room door, I’m looking at you — you probably never think about the musical potential of mundane household objects.

    Unless you’re these two, I guess:

    When Mama Isn’t Home / When Mom Isn’t Home ORIGINAL (the Oven Kid) Timmy Trumpet – Freaks

    We thought this was hilarious. Hope you enjoy! This video has over 60 million views worldwide! Social Media: @jessconte To use this video in a commercial player, advertising or in broadcasts, please email [email protected]

    If the sound of a slammed oven door isn’t involved in your ditty of choice, you may instead want to add some electronics to that sweet, sweet harmony maker, just like Floyd.

    Trusting in the melodic possibilities of incorporating a Raspberry Pi 3B+ and various sensory components into a humble door, Floyd created The Doors Door, a musical door that plays… well, I’m sure you can guess.

    If you want to build your own, you can practice some sophisticated ‘copy and paste’ programming after downloading the code. And for links to all the kit you need, check out the description of the video over on YouTube. While you’re there, be sure to give the video a like, and subscribe to Floyd’s channel.

    And now, to get you pumped for the weekend, here’s Jim:

    The Doors – Break On Through HQ (1967)

    recorded fall 1966 – lyrics: You know the day destroys the night Night divides the day Tried to run Tried to hide Break on through to the other side Break on through to the other side Break on through to the other side, yeah We chased our pleasures here Dug our treasures there But can you still recall The time we cried Break on through to the other side Break on through to the other side Yeah!

    Website: LINK

  • CutiePi project showcase

    CutiePi project showcase

    Reading Time: 4 minutes

    Having long dreamt of owning a usable Linux-based portable device, a group of enthusiasts set out to create one and the CutiePi tablet was born. Based around a Raspberry Pi Compute Module 3+ Lite and custom carrier board, it features an 8in touchscreen, typical tablet features, and everything you need to make your Raspberry Pi projects portable.

    “We tried to make the CutiePi tablet on par with normal tablets,” says project lead Penk Chan. Penk is a digital nomad wannabe from Taiwan, currently living in Tokyo and working as a principal software engineer at The Qt Company. He’s leading a team of open-source enthusiasts to make the CutiePi tablet happen.

    Penk Chan and fellow open-source enthusiasts in Tokyo created the Raspberry Pi 3+-based CutiePi tablet

    “You’ll find a gyro, a micro-controller for battery and button monitoring, WiFi/Bluetooth and a speaker. We also kept the camera connector and made the remaining GPIO pins available, keeping it hacking friendly.” This will enable it to be used as a launchpad for users’ portable Raspberry Pi projects.

    Making a portable device isn’t easy, though. “It’s not just about the Li-Po battery nor the DC-DC step-up converter,” says Penk. “Those features that we take for granted in consumer electronics, like using the device while it’s charging, reading remaining battery level, or simply detecting a power cable plug-in, are very hard to get right with modules and kits, let alone having a user interface that works. To top it all off, you need a case that houses all the hardware parts and cables.”

    The CutiePi tablet has a Chromium-based web browser and supports all the common touch gestures

    Custom carrier

    The first CutiePi prototype was a cardboard box which housed an off-the-shelf HDMI display, a Raspberry Pi 3, and a power bank. For the second one, they stripped everything from the Raspberry Pi 3 board and soldered flex cables to replace the bulky HDMI connector, with the electronics now housed by a 3D-printed case.

    While most hobby projects would have stopped there, the team went on to create a third prototype, based on a Compute Module 3+ Lite connected to their own custom-designed carrier board. “Using the Compute Module allowed us to make the device a lot thinner, explore other form factors other than the regular Raspberry Pi 3’s, and probably most important of all, it allowed us to mass-produce the CutiePi tablet,” explains Penk.

    Taking around three months to develop, the CutiePi carrier board is based on the reference designs made freely available by Raspberry Pi, and the team have open-sourced their now OSHWA-certified hardware: magpi.cc/CutiePiBoard.

    “At the heart of this project is our love for open-source, and CutiePi is our expression of that affection,” says Penk. “All designs are available under open-source licence, and anyone who wants to produce it, or even build on it to make their next portable project, can freely do so. In fact, we advocate it.”

    Make your own CutiePi: 3D-printable files for the tablet case will be freely available

    Multi-touch display

    The CutiePi tablet features a 1280×800 MIPI-DSI display, with a five-point capacitive multi-touch panel. The user interface is built on top of Raspbian, and you can access the standard Raspberry Pi Desktop via a toggle switch. “When you toggle on over to our made-from-scratch, touch-friendly UI, you will have access to the CutiePi shell, including a WiFi settings manager, a Chromium-based web browser that supports all the common touch gestures, an on-screen keyboard with multiple languages layout, and a terminal emulator, as part of our software version 1.0 release.”

    A schematic for the CutiePi showing its components and features

    Penk tells us that in the future it will be possible to support native Raspberry Pi apps in the CutiePi shell through use of XWayland, a fully-fledged X server implementation for the Qt Wayland Compositor being used for the display.

    It all sounds very promising and, with the hardware parts near finalised, the team are focusing on the design for the final version of the tablet’s enclosure. They have decided to crowdfund the project in order to mass-produce CutiePi, so keep an eye on those crowdfunding sites for it.

    Quick facts

    • CutiePi gets its name from the Qt framework used

    • The carrier board features a sleep/wake button

    • The CutiePi prototype uses a 5000 mAh LiPo battery

    • A 3D-printable case design file will be released very soon

    • A Raspbian image will also be made available for testing

    CutiePi can be used as a ebook device as well as a touchscreen tablet