Pi model 3/4/400
The latest Pi OS HCSR04-P
L9110S motor controller DC motor
Micro USB breakout PSU for motor
7x F2F wires
2x M2F wires
Get the code https:// github.com/ lesp/ S3GPIOLXF283/ archive/ refs/heads/ main.zip
Over the past few issues we’ve learnt how to create games, control electronics and create shapes by calculating angles, all with Scratch 3. As good as Scratch 3 is there’s only so much that we can do with the GPIO, and the GPIO is the best feature of the Raspberry Pi. So how can we take our Scratch GPIO projects further? Well, for that we need S3GPIO.
S3GPIO is short for Scratch 3 GPIO and it was created by Simon Walters, a Raspberry Pi community member who’s campaigned for children to learn coding and electronics with Scratch. Walters first foray into the GPIO for Scratch was ScratchGPIO, based upon Scratch 1.4. This version is still active – in fact we can find out more at http://simplesi.net.
In this tutorial we’ll install S3GPIO, learn how to use an ultrasonic sensor as a controller for a DC motor, effectively setting the speed based on our distance from the sensor.
Connecting the electronic components is relatively simple, but the amount of wires may seem confusing. We’ll break it down into sections. S3GPIO uses physical pin numbering, not the BCM numbering standard set by the Raspberry Pi Foundation. This means that we have two columns of 20 pins. Holding the Pi with the USB ports pointing to the floor, the two columns start with pin 1 at the top left, and pin 2 at the top right. The left column is the “odd” column, with pins following an odd number pattern: 1, 3, 5, 7, 9 etc. The right column is the “even” column, with numbers progressing 2, 4, 6, 8 etc.
Our HCSR04-P ultrasonic sensor has four pins. Using female to female jumper wires, connect GND to any GND pin on the Raspberry Pi, Vcc to 3V (Pin 1). Trigger to pin 11, and echo to pin 13.
Continue reading your story on the app
Continue reading your story in the magazine
A fan of portable, modular distros, Mayank Sharma runs across a relatively new one and wonders how it stacks up against his all-time favourite: Slax.
Mayank Sharma is a busy man, but when it comes to privacy and security then, like Louis Armstrong, he has all the time in the world.
UBUNTU VS FEDORA
Jonni Bidwell wants to know everything – and he means everything – about the two most popular Gnome-based distros…
SERIAL PERIPHERAL INTERFACE: Driving SPI displays
Let’s go on an adventure into the SPI protocol, LCD displays and model trains with Sean Conway toot-tooting away!
Sensor and motor control with the GPIO
Les Pounder shows how we can take Scratch further with a community-developed tool that builds on our Scratch knowledge.
LICENCE TO BILL
Jonni Bidwell has been reading licence minutiae and fears big business threatens the future of copyleft and software freedom.
The backlash against Systemd resulted in this sysvinit-friendly distro, now on version 4. Mayank Sharma assesses its progress.
AUTOMOTIVE GRADE LINUX
Mats Tage Axelsson shows how open source frameworks and Linux can help navigate you safely to your coding destination.
Monetising nostalgia should be an easy win for Atari so Matt Safford can‘t believe it’s created another E.T.
How To Create Efficient Backups
Backups aren’t just a safety net for Trekkies such as Shashank Sharma, but a way of life. But they can take up quite a lot of space if not done right…
From Steer to Blueberries and Citrus, Lausanne Walter’s Family Knows Agriculture
El reloj que fue a la luna
Desde su lanzamiento en 1957, el Speedmaster ha pasado por algunos cambios, pero ha logrado mantenerse como uno de los modelos más emblemáticos de Omega y como el reloj oficial de las misiones espaciales.
BMX fan Rydz is riding a high and breaking now bones about it now...
The brilliant planning that made World War Two’s Great Escape possible
83 years on, Germany remembers Kristallnacht
GERMAN President Frank-Walter Steinmeier marked the 83rd anniversary of the anti-Jewish pogrom that was labelled Kristallnacht, the Night Of Broken Glass, when Nazis, among them many ordinary Germans, terrorised Jews in Germany and Austria.
Grandsons visit Walter's shrine
THE grieving family of former Rangers manager Walter Smith have visited a shrine outside Ibrox dedicated to him.
Presidents go for walkies..
EUROPE after Covid and the global vaccination programme were topics discussed between Ireland's President and his German counterpart yesterday.
Eat More - MEDJOOL DATES
You always remember your first good date. One nibble, and you’re courted by a deep caramel flavour, soft texture and delightfully sweet taste. For me, it was love at first bite.
GAEL GARCÍA BERNAL returns to Hollywood for M. Night Shyamalan’s high-concept thriller Old, in which his character starts to age rapidly. It’s got him thinking about his two decades as a globally celebrated actor, and how he’s always done it his way…
Europe flood toll rises to 170 as searches for missing on
143 people died in the flooding in Germany’s worst natural disaster in more than half a century.