3rd Edition – Fully updated for Raspberry Pi 4
The Raspberry Pi is a very cheap but complete computer system that allows all sorts of electronics parts and extensions to be connected. This book addresses one of the strongest aspects of the Raspberry Pi: the ability to combine hands-on electronics and programming.
Combine hands-on electronics and programming
After a short introduction to the Raspberry Pi you proceed with installing the required software. The SD card that can be purchased in conjunction with this book contains everything to get started with the Raspberry Pi. At the side of the (optional) Windows PC, software is used which is free for downloading. The book continues with a concise introduction to the Linux operating system, after which you start programming in Bash, Python 3 and Javascript. Although the emphasis is on Python, the coverage is brief and to the point in all cases – just enabling you to grasp the essence of all projects and start adapting them to your requirements. All set, you can carry on with fun projects.
The book is ideal for self-study
No fewer than 45 exciting and compelling projects are discussed and elaborated in detail. From a flashing lights to driving an electromotor; from processing and generating analog signals to a lux meter and a temperature control. We also move to more complex projects like a motor speed controller, a web server with CGI, client-server applications and Xwindows programs.
Each project has details of the way it got designed that way
The process of reading, building, and programming not only provides insight into the Raspberry Pi, Python, and the electronic parts used, but also enables you to modify or extend the projects any way you like. Also, feel free to combine several projects into a larger design.
The Raspberry Pi 400 offers a quad-core 64-bit processor, 4 GB RAM, wireless networking, dual-display output, 4K video playback, and a 40-pin GPIO header. It's a powerful, compact computer built into a portable keyboard.
Specifications
Processor
Broadcom BCM2711 quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.8 GHz
RAM
4 GB LPDDR4-3200
Connectivity
Dual-band (2.4 GHz and 5.0 GHz) IEEE 802.11b/g/n/ac wireless LANBluetooth 5.0, BLEGigabit Ethernet2x USB 3.0 and 1x USB 2.0 ports
GPIO
Horizontal 40-pin GPIO header
Video & Sound
2 × micro HDMI ports (supports up to 4Kp60)
Multimedia
H.265 (4Kp60 decode)H.264 (1080p60 decode, 1080p30 encode)OpenGL ES 3.0 graphics
SD card support
MicroSD card slot for operating system and data storage
Keyboard
US keyboard
Power
5 V DC via USB connector
Operating temperature
0°C to +40°C
Dimensions
286 x 122 x 23 mm (maximum)
The 16 mm lens provides a higher quality image than the 6 mm lens. It has a narrow angle of view which is more suited to viewing distant objects.
Specifications
Resolution
10 MegaPixel
Image format
1'
Focal length
16 mm
Aperture
F1.4-16
Mount
C
Field Angle 1'Field Angle 2/3'Field Angle 1/1.8'Field Angle 1/2'
44.6° × 33.6°30.0° × 23.2°24.7° × 18.6°21.8° × 16.4°
Back Focal Length
17.53 mm
Optical Length
67.53 mm
Distortion
1'(-0.7%) 1/2'(-0.5%) 1/3'(-0.15%)
M.O.D.
0.2 m
Dimension
39 × 50 mm
Weight
133.7 g
Raspberry Pi Pico Breadboard Kit helps the user to configure GPIO of Raspberry Pi Pico for use with external devices.Raspberry Pi Pico Breadboard Kit is a multi-purpose Kit that consists of a “400 points half-size breadboard” on top, a Programmable Buzzer, 4 programmable LEDs, 4 push buttons, and dedicated 5 V, 3V3, and GND pins at a single place. SB Components developed Raspberry Pi Pico Breadboard Kit with advanced features like independently controllable LEDs, Switches, a 400 points half-size breadboard that helps the user to prototype their projects with Raspberry Pi Pico in an efficient way.Raspberry Pi Pico Breadboard Kit can be interfaced with Raspberry Pi Pico from which a user can run electronics experiments, prototypes, mini robots, games, interact with Linux-ready Raspberry Pi, Exploration of circuits, etc. One can also connect external components with the breadboard provided on the top of the Raspberry Pi Pico Breadboard Kit.Features
Four independent controlled LEDs
Four independent controlled push buttons
Compatible with Pico
A 400 points half size breadboard
Programmable buzzer
Dedicated 5 V, 3V3 and Gnd pins for easy use
Specifications
Operating voltage
3.3 VDC
Communication interface
GPIO
Dimensions
85 x 133 mm
Applications
Electrical experiments
Prototypes
Mini robots
Games
Exploration of circuits
Downloads
Manual
Example codes
Circuit diagram
GitHub
Included
1x Pico Breadboard Kit
5x Male to Male Jumper Wires
5x Female to Female Jumper Wires
5x Male to female Jumper Wires
Note: Raspberry Pi Pico is not included.
The default configuration holds a mini breadboard (included), an SD card adapter, 2x micro SD cards, 2x USB devices, a micro-USB shim and of course the Raspberry Pi Zero itself.
Users can decide to use the micro-USB shim slot to hold a micro-HDMI adapter, or you may want to hold a Portsplus or similar GPIO reference card in the SD adapter slot. You can choose to store your USB micro-SD card reader or even other larger USB devices such as the USBDoctor. Use it in whatever way works best for you.
All of the Raspberry Pi Zero ports are accessible from the ZeroDock, including the camera port and reset/composite pin header. pHATs are also not obstructed, so you’re free to prototype with your favourite add-on boards.
The case is a stylish mix of clear and black acrylic layers, black fixings and a clear breadboard, fitting in well alongside most desktop PCs/monitors.
Assembly guide available here.
Kit includes
4 layer laser-cut acrylic case
Case and Raspberry Pi fixings
Mini breadboard
Solderless breadboard labelled for the Raspberry Pi Pico It can be tricky to work out which pin is which when the Raspberry Pi Pico is attached to solderless breadboard. The MonkMakes Breadboard for Pico solves this problem by labelling the Pico pins on the 400 point solderless breadboard. Features 400 tie point 2 power busses Size: 8.2 x 5.5 x 0.85 cm Self-adhesive back
Multitasking and multiprocessing have become a very important topic in microcontroller-based systems, namely in complex commercial, domestic, and industrial automation applications. As the complexity of projects grows, more functionalities are demanded from the projects. Such projects require the use of multiple inter-related tasks running on the same system and sharing the available resources, such as the CPU, memory, and input-output ports. As a result of this, the importance of multitasking operations in microcontroller-based applications has grown steadily over the last few years. Many complex automation projects now make use of some form of a multitasking kernel.
This book is project-based and its main aim is to teach the basic features of multitasking using the Python 3 programming language on Raspberry Pi. Many fully tested projects are provided in the book using the multitasking modules of Python. Each project is described fully and in detail. Complete program listings are given for each project. Readers should be able to use the projects as they are, or modify them to suit their own needs.
The following Python multitasking modules have been described and used in the projects:
Fork
Thread
Threading
Subprocess
Multiprocessing
The book includes simple multitasking projects such as independently controlling multiple LEDs, to more complex multitasking projects such as on/off temperature control, traffic lights control, 2-digit, and 4-digit 7-segment LED event counter, reaction timer, stepper motor control, keypad based projects, car park controller, and many more. The fundamental multitasking concepts such as process synchronization, process communication, and memory sharing techniques have been described in projects concerning event flags, queues, semaphores, values, and so on.
SD card quality is crucial for a good Raspberry Pi experience. Raspberry Pi's A2 microSD cards support higher bus speeds and command queuing, improving random read performance and narrowing the gap with NVMe SSDs. These cards are rigorously tested for optimal performance with Raspberry Pi models.
Features
Capacity: 64 GB
Support for DDR50 and SDR104 bus speeds and command queueing (CQ) extension
Speed Class: C10, U3, V30, A2
Random 4 KB read performance: 3,200 IOPS (Raspberry Pi 4, DDR50) 5,000 IOPS (Raspberry Pi 5, SDR104)
Random 4 K write performance: 1,200 IOPS (Raspberry Pi 4, DDR50) 2,000 IOPS (Raspberry Pi 5, SDR104)
Shock-proof, X-ray–proof, and magnet-proof
microSDHC/microSDXC formats
Downloads
Datasheets
The Raspberry Pi M.2 HAT+ enables you to connect M.2 peripherals such as NVMe drives and AI accelerators to Raspberry Pi 5’s PCIe 2.0 interface, supporting fast (up to 500 MB/s) data transfer to and from NVMe drives and other PCIe accessories.
Raspberry Pi M.2 HAT+ supports devices that have the M.2 M key edge connector, in the 2230 and 2242 form factors. It is capable of supplying up to 3 A to connected M.2 devices.
Features
Supports single-lane PCIe 2.0 interface (500 MB/s peak transfer rate)
Supports devices that use the M.2 M key edge connector
Supports devices with the 2230 or 2242 form factor
Capable of supplying up to 3 A to connected M.2 devices
Power and activity LEDs
Included
1x Raspberry Pi 5 M.2 HAT+
1x Ribbon cable
1x GPIO stacking header
4x Spacers
8x Screws
Downloads
Datasheet
Schematics
Assembly instructions
This aluminium-based Armor Case is perfect for your Raspberry Pi 4 if it gets hot, as this protects it against shocks and heat equally. Channel milling combined with dual fans offers best cooling performance. That‘s why it is suitable for extreme settings. Another benefit is that this case does not need more space than the Raspberry Pi itself and can be integrated in existing projects.Features
Material: CNC milled aluminium alloy
Compatible with Raspberry Pi 4B
Assembly: 4 included screws connect the case to the Raspberry Pi
Special features: Large heat sink and dual fan each Ø24 mm, massive protection against heat and shocks, no additional space needed
Wiring: Fan 5V (Red) - 5V (Pin4), Fan GND (Black) - GND (Pin6)
Scope of delivery: Armor case “BLOCK ACTIVE”, screws, thermal tape
Size top side: 69 x 56 x 15.5 mm
Size bottom side: 87 x 56 x 7.5 mm
DownloadsManual
No more searching for micro-SD cards, SD adapters, USB-C adapters or USB devices. It’s all here, every time you’re ready to prototype a project, in one neat and tidy package.
Our example configuration holds your Raspberry Pi 4, a 400-point clear breadboard, 4 micro-SD cards, an SD-adapter, 4x USB devices and 2x universal slots (great for USB-C adapters or anything else you want to store).
You can of course use the storage slots for whatever you like... Customise it and use it in whatever way works best for you!
Despite sitting flush with the top glass-effect acrylic layer of the dock, all of the Raspberry Pi’s ports are accessible, including access to the micro-SD slot. HATs can also be fitted.
The dock is made up of 4 slick, sandwiched layers of matte black and glass-effect laser-cut acrylic! A really stunning and useful home for your Raspberry Pi and projects!
Assembly guide available here.
Kit includes
4 layer laser-cut acrylic dock
400-point clear breadboard
Fixings and spacers
SD card quality is crucial for a good Raspberry Pi experience. Raspberry Pi's A2 microSD cards support higher bus speeds and command queuing, improving random read performance and narrowing the gap with NVMe SSDs. These cards are rigorously tested for optimal performance with Raspberry Pi models.
Features
Capacity: 32 GB
Support for DDR50 and SDR104 bus speeds and command queueing (CQ) extension
Speed Class: C10, U3, V30, A2
Random 4 KB read performance: 3,200 IOPS (Raspberry Pi 4, DDR50) 5,000 IOPS (Raspberry Pi 5, SDR104)
Random 4 K write performance: 1,200 IOPS (Raspberry Pi 4, DDR50) 2,000 IOPS (Raspberry Pi 5, SDR104)
Shock-proof, X-ray–proof, and magnet-proof
microSDHC/microSDXC formats
Downloads
Datasheets
The robust plastic housing made of acrylic convinces by modern design and technical innovation. The only distinguishing feature is the new locking mechanism of this housing. It can be assembled in a few steps and the magnetic lock provides easy access to the GPIO pins and the Raspberry Pi 4 B at any time. Thanks to the strong magnets in the upper, middle and lower part of this housing, screw-less mounting is possible. So the cover can be removed at any time. The two integrated fans and the included heat sinks provide a constant cooling of the Raspberry PI 4B. The JOY-iT Acrylic Case with Dual Fan will protect your Raspberry Pi 4 B against exterior impacts and excessive heat development. You can assemble the screwless case in just 4 clicks. The silent twin fans work reliably under high load. Features Material: Plastic Colour: Black and transparent Compatible with Raspberry Pi 4 B Special Features: Built-in dual fan Dimensions: 67 x 97 x 27 mm Weight: 154 g Downloads Datasheet Manual
Ready to explore the world around you? By attaching the Sense HAT to your Raspberry Pi, you can quickly and easily develop a variety of creative applications, useful experiments, and exciting games.
The Sense HAT contains several helpful environmental sensors: temperature, humidity, pressure, accelerometer, magnetometer, and gyroscope. Additionally, an 8x8 LED matrix is provided with RGB LEDs, which can be used to display multi-color scrolling or fixed information, such as the sensor data. Use the small onboard joystick for games or applications that require user input. In Innovate with Sense HAT for Raspberry Pi, Dr. Dogan Ibrahim explains how to use the Sense HAT in Raspberry Pi Zero W-based projects. Using simple terms, he details how to incorporate the Sense HAT board in interesting visual and sensor-based projects. You can complete all the projects with other Raspberry Pi models without any modifications.
Exploring with Sense HAT for Raspberry Pi includes projects featuring external hardware components in addition to the Sense HAT board. You will learn to connect the Sense HAT board to the Raspberry Pi using jumper wires so that some of the GPIO ports are free to be interfaced to external components, such as to buzzers, relays, LEDs, LCDs, motors, and other sensors.
The book includes full program listings and detailed project descriptions. Complete circuit diagrams of the projects using external components are given where necessary. All the projects were developed using the latest version of the Python 3 programming language. You can easily download projects from the book’s web page. Let’s start exploring with Sense HAT.
Features Standard Raspberry Pi Pico female header for direct attaching Raspberry Pi Pico (if male header soldered), or just through jumper wires Two sets of 2x20 male header, allows connecting more Raspberry Pi Pico expansion modules Clear pinout labels on the front side, easy to use Immersion gold process, beautiful & practical, stunning aesthetic looking
Features Simple slide angle adjustment Camera Module protection 'sandwich' plates Made from crystal clear laser-cut acrylic in the UK 1/4 inch hole for tripod mounting Stable 4-leg base Here you can find the Assembly Instructions.
The official Raspberry Pi keyboard and hub is a standard 78-key US keyboard that includes an additional three USB 2.0 type A ports to power other peripherals. The keyboard is available in different language/country options as detailed below. 78-key US keyboard Three USB 2.0 type A ports for powering other peripherals Automatic keyboard language detection USB type A to micro USB type B cable included for connection to compatible computer Ergonomic design for comfortable use Compatible with all Raspberry Pi products
Add super-fast storage to your Raspberry Pi 5 allowing for lightning fast boots, NAS use, and snappy applications!
NVMe Base is a PCIe extension board for Raspberry Pi 5. Simply populate it with the included 500 GB M-Key NVMe SSD (2230 to 2280 sizes supported) and mount it under your RPi for a compact and fast storage solution.
It's the perfect solution for turning your Raspberry Pi 5 into a file server, media centre, reverse proxy, etc.
Included
NVMe Base PCB with M.2 Slot (M-Key)
'PCIe Pipe' Flat Flex Cable
4x Rubber feet
M2 bolt and 2x nuts for SSD mounting
4x 7 mm M2.5 standoffs for base mounting
8x short M2.5 bolts for base mounting
4x long M2.5 bolts for 'pass-thru' mounting with a HAT
500 GB NVMe SSD
Downloads
Documentation
This anodised aluminium heatsink case will protect your Raspberry Pi 4 and give you very effective passive cooling. It's great in cases where you want completely silent cooling, for instance, if you're building a home media center. The scope of delivery includes a thermal pad to provide thermal contact between the CPU and top case, and a handy Allen key and set of hex bolts to attach the case together. The case gives you access to all of the ports, pins, and connectors. Features Anodised aluminium top and bottom case Heatsink fins Thermal pad Hex bolts and Allen key included Access to all ports, pins, and connectors Compatible with Raspberry Pi 4 Assembly Assembling your heatsink case is pretty easy and should only take a couple of minutes. The first, and most important thing is to make sure that your Pi is powered off and unplugged before you fit the case. Take one of the thermal pads and peel the protective films off both sides of it (there's a white film and an easy-to-miss clear film on the other side. Stick the thermal pad onto your Pi's CPU (the metal square nearest the middle of the PCB). Sticking the thermal pad to the CPU first is a much better way to position it correctly than trying to stick it to the case. Only use one thermal pad with the Raspberry Pi 4. Position the top case and then, holding it in place, flip the whole thing over and position the bottom case on the underside of your Pi. Use the four hex bolts and allen key to secure the case. Notes The case is metal and hence conductive, so be careful not to short any components on it, and ensure that your RPi is powered off and unplugged when fitting the case It may be obvious, but the case will get hot in use Dimensions: 87 × 56 × 25.5 mm
Designed for environmental monitoring, Enviro+ lets you measure air quality (pollutant gases and particles*), temperature, pressure, humidity, light, and noise level.
Enviro+ is an affordable alternative to environmental monitoring stations that can cost tens of thousands of pounds and, best of all, it's small and hackable and lets you contribute your data to citizen science efforts to monitor air quality via projects like Luftdaten.
Features
BME280 temperature, pressure, humidity sensor (datasheet)
LTR-559 light and proximity sensor (datasheet)
MICS6814 analog gas sensor (datasheet)
ADS1015 analog to digital converter (ADC) (datasheet)
MEMS microphone (datasheet)
0.96' colour LCD (160 x 80)
pHAT-format board
Fully-assembled
Compatible with all 40-pin header Raspberry Pi models
Pinout
Python library
Citizen science air quality monitoring
This board was developed in collaboration with the University of Sheffield, with the aim of letting you contribute real-time air quality data from your local area to open data projects like Luftdaten.
Devices like Enviro+ allow fine-grained, detailed datasets that let us see shifts in air quality through time and across different areas of cities. The dataset gets better in quality every time an additional The more devices that contribute data, the better quality the dataset becomes.
Particulate matter (PM) is made up of tiny particles that are a mix of sizes and types, like dust, pollen, mould spores, smoke particles, organic particles and metal ions, and more. Particulates are much of what we think of as air pollution.
The analog gas sensor can be used to make qualitative measurements of changes in gas concentrations, so you can tell broadly if the three groups of gases are increasing or decreasing in abundance. Without laboratory conditions or calibration, you won't be able to say 'the concentration of carbon monoxide is n parts per million', for example.
Temperature, air pressure and humidity can all affect particulate levels (and the gas sensor readings) too, so the BME280 sensor on Enviro+ is really important to understanding the other data that Enviro+ outputs.
You can implement Enviro+ in IoT applications as well. By connection it to Alexa you can get information about the temperature and humidity of the air by simply asking, or there's also an option to set up a trigger action with IFTTT that turns your Philips Hue lights on when the light level drops below a certain level etc.
Software
With the Python library you can control control all the parts of your Enviro+. There's a bunch of examples for each of the individual parts, an all-in-one example that shows you the data from Enviro+'s sensors in a visual way.
The Raspberry Pi Bumper is a snap-on silicone cover that protects the bottom and edges of the Raspberry Pi 5.
Features
One-piece flexible silicone rubber bumper
Enables easy access to the power button
Mounting holes remain accessible underneath the bumper
Downloads
Datasheet