Most people are increasingly confronted with the applications of Artificial Intelligence (AI). Music or video ratings, navigation systems, shopping advice, etc. are based on methods that can be attributed to this field.
The term Artificial Intelligence was coined in 1956 at an international conference known as the Dartmouth Summer Research Project. One basic approach was to model the functioning of the human brain and to construct advanced computer systems based on this. Soon it should be clear how the human mind works. Transferring it to a machine was considered only a small step. This notion proved to be a bit too optimistic. Nevertheless, the progress of modern AI, or rather its subspecialty called Machine Learning (ML), can no longer be denied.
In this book, several different systems will be used to get to know the methods of machine learning in more detail. In addition to the PC, both the Raspberry Pi and the Maixduino will demonstrate their capabilities in the individual projects. In addition to applications such as object and facial recognition, practical systems such as bottle detectors, person counters, or a “talking eye” will also be created.
The latter is capable of acoustically describing objects or faces that are detected automatically. For example, if a vehicle is in the field of view of the connected camera, the information 'I see a car!' is output via electronically generated speech. Such devices are highly interesting examples of how, for example, blind or severely visually impaired people can also benefit from AI systems.
This book is about teaching the Python programming language using the Raspberry Pi 4 computer. The book makes an introduction to Raspberry Pi 4 and then teaches Python with the topics: variables, strings, arrays, matrices, tuples, lists, dictionaries, user functions, flow of control, printing, keyboard input, graphics, GUI, object oriented programming and many more topics.
The book is aimed for beginners, students, practising engineers, hobbyists, and for anyone else who may want to learn to program in Python.
The book includes many example programs and case studies. All the example programs and case studies have been tested fully by the author and are all working. The example programs aim to teach the various programming concepts of Python. The case studies cover the use of Python in the analysis and design of electronic circuits. Some of the case study topics are:
Resistor colour code identification
Resistive potential divider circuits
Resistive attenuator design
Zener diode voltage regulator design
RC and RLC transient circuits
Circuit frequency response
Saving data on external memory stick
Mesh and node circuit analysis using matrices
Resonance in RLC circuits
Transistor Biasing analysis
Transistor amplifier design
Design of active filters
Interfacing hardware with GPIO, I²C and SPI
Using Wi-Fi with Python and TCP/IP and UDP programs
Using Bluetooth from Python
Full program listings of all the programs used in the book are available at the Elektor website of the book. Readers should be able just to copy and use these programs in their Raspberry Pi projects without any modifications.
Features: 1.54' IPS TFT display with 240x240 resolution that can show text or video Stereo speaker ports for audio playback - either text-to-speech, alerts or for creating a voice assistant. Stereo headphone out for audio playback through a stereo system, headphones, or powered speakers. Stereo microphone input - perfect for making your very own smart home assistants Two 3-pin JST STEMMA connectors that can be used to connect more buttons, a relay, or even some NeoPixels! STEMMA QT plug-and-play I2C port can be used with any of Adafruits 50+ I2C STEMMA QT boards or can be used to connect to Grove I2C devices with an adapter cable. 5-Way Joystick + Button for user interface and control. Three RGB DotStar LEDs for colorful LED feedback. The STEMMA QT port means you can attach heat image sensors like the Panasonic Grid-EYE or MLX90640. Heat-Sensitive cameras can be used as a person detector, even in the dark! An external accelerometer can be attached for gesture or vibration sensing such as machinery/industrial predictive maintenance projects Please note: A Raspberry Pi 4 is not included.
De Raspberry Pi DAC+ (voorheen bekend als IQaudio DAC+) is een hoogwaardige audio-HAT, ontworpen voor elke Raspberry Pi met een 40-pins GPIO-header. Uitgerust met de Texas Instruments PCM5122 DAC, levert hij kristalheldere analoge stereo-audio via een paar phono (RCA)-connectoren.
Er is geen externe voeding nodig – de DAC+ wordt rechtstreeks aangesloten op de GPIO-header van de Raspberry Pi, zonder dat er gesoldeerd hoeft te worden of kabels nodig zijn.
Kenmerken
Power-LED
Analoge audio-uitgang (0-2 V RMS) via stereo-installatie op het paneel
Phono (RCA)-aansluitingen met MUTE-signaal (hoofdtelefoondetectie)
Speciale hoofdtelefoonversterker, uitgang via 3,5 mm cilindervormige aansluiting op het paneel
40-pins pass-through GPIO-header
HAT EEPROM-schrijffunctie
Downloads
Datasheet
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.
Features
RP2040 microcontroller chip ontwikkeld door Raspberry Pi in Engeland
Dual-core ARM Cortex M0+ processor, met een kloksnelheid tot 133 MHz
264 kB SRAM, en 2 MB on-board Flash geheugen
Castellated module maakt solderen direct op draagborden mogelijk
USB 1.1 host- en apparaatondersteuning
Energiezuinige slaap- en slapende modi
Programmering via slepen en neerzetten met behulp van massaopslag via USB
26x multifunctionele GPIO-pinnen
2x SPI, 2x I²C, 2× UART, 3x 12-bit ADC, 16x bestuurbare PWM-kanalen
Nauwkeurige klok en timer op de chip
Temperatuursensor
Versnelde drijvende-kommabibliotheken op de chip
8x programmeerbare IO (PIO) toestandsmachines voor aangepaste randapparatuur
Waarom een Raspberry Pi Pico?
Zelf een microcontroller designen in plaats van een bestaande aanschaffen brengt een aantal voordelen met zich mee. Volgens Raspberry Pi zelf komt niet een van de bestaande beschikbare producten hiervoor in de buurt van hun prijs/performance verhouding.
Deze Raspberry Pi Pico heeft Raspberry Pi tevens de mogelijkheid gegeven om zelf een aantal innovatieve en krachtige features toe te voegen. Deze features zijn nergens anders beschikbaar.
Een derde reden is dat de Raspberry Pi Pico de mogelijkheid aan Raspberry Pi heeft gegeven om krachtige software rondom het product te creëren. Rondom deze software stack zit een uitgebreide documentatie set. De software en documentatie voldoen aan de hoge standaard van de kernproducten van Raspberry Pi (zoals de Raspberry Pi 400, Pi 4 Model B en Pi 3 Model A+).
Voor wie is deze microcontroller geschikt?
De Raspberry Pi Pico is voor zowel de gevorderde als beginnende gebruiker geschikt. Van het bedienen van een lichtscherm tot het bedienen van veel verschillende apparaten die je dagelijks gebruikt. Veel dagelijkse bewerkingen worden door deze technologie mogelijk gemaakt.
Beginnende gebruikers
De Raspberry Pi Pico is programmeerbaar in de talen C en MicroPython en aanpasbaar voor een breed scala aan apparaten. Daarnaast is de Pico net zo eenvoudig in gebruik als het slepen en neerzetten van bestanden. Dit maakt deze microcontroller bij uitstek geschikt voor de beginnende gebruiker.
Gevorderde gebruikers
Voor de gevorderde gebruikers is het mogelijk om gebruik te maken van de uitgebreide randapparatuur van de Pico. De randapparatuur bestaat onder andere uit de SPI, I²C en acht programmeerbare I/O (PIO) -toestandsmachines.
Wat is uniek aan de Raspberry Pi Pico?
Uniek aan de Pico is dat deze is ontwikkeld door Raspberry Pi zelf. De RP2040 is voorzien van een dual-core Arm Cortex-M0 + processor met 264 KB intern RAM en ondersteuning voor maximaal 16 MB off-chip Flash.
De Raspberry Pi Pico is verder uniek om verschillende redenen:
Het product heeft de hoogste prijs/kwaliteit verhouding in de markt van de microcontrollerboards
De Raspberry Pi Pico is door Raspberry Pi zelf ontwikkeld
De software stack rondom dit product is van hoogwaardige kwaliteit en komt in combinatie met een uitgebreide documentatie set.
Specificaties
Dubbele ARM Cortex-M0+ @ 133 MHz
264 kB on-chip SRAM in zes onafhankelijke banken
Ondersteuning tot 16 MB off-chip Flash memory via speciale QSPI bus
DMA-controller
Volledig aangesloten AHB crossbar
Interpolator en integer divider peripherals
On-chip programmeerbare LDO om spanning voor de core te genereren
2x on-chip PLL's om USB en core kloksignalen te genereren
30x GPIO pins, waarvan er 4 als analoge ingangen kunnen worden gebruikt
Randapparatuur
2x UARTs
2x SPI controllers
2x I²C controllers
16x PWM kanalen
USB 1.1 controller en PHY, met host en device support
8x PIO state machines
Wat je krijgt
10x RP2040 ICs
Build robust, intelligent machines that combine Raspberry Pi computing power with LEGO components.The Raspberry Pi Build HAT provides four connectors for LEGO Technic motors and sensors from the SPIKE Portfolio. The available sensors include a distance sensor, a colour sensor, and a versatile force sensor. The angular motors come in a range of sizes and include integrated encoders that can be queried to find their position.The Build HAT fits all Raspberry Pi computers with a 40-pin GPIO header, including?–?with the addition of a ribbon cable or other extension device?—?Raspberry Pi 400. Connected LEGO Technic devices can easily be controlled in Python, alongside standard Raspberry Pi accessories such as a camera module.Features
Controls up to 4 motors and sensors
Powers the Raspberry Pi (when used with a suitable external PSU)
Easy to use from Python on the Raspberry Pi
De Raspberry Pi Pico 2 is een nieuw microcontrollerbord van de Raspberry Pi Foundation, gebaseerd op de RP2350. Het beschikt over een hogere kloksnelheid, het dubbele van de on-chip SRAM, het dubbele van het ingebouwde flashgeheugen, krachtigere Arm-cores, optionele RISC-V-cores, nieuwe beveiligingsfuncties en verbeterde interfacemogelijkheden. De Raspberry Pi Pico 2 biedt een aanzienlijke verbetering in prestaties en functies, terwijl de hardware- en softwarecompatibiliteit met eerdere leden van de Raspberry Pi Pico-serie behouden blijft.
De RP2350 biedt een uitgebreide beveiligingsarchitectuur gebouwd rond Arm TrustZone voor Cortex-M. Het bevat ondertekend opstarten, 8 KB antifuse OTP voor sleutelopslag, SHA-256-versnelling, een hardware TRNG en snelle glitch-detectoren.
Dankzij de unieke dual-core en dual-architectuurmogelijkheden van de RP2350 kunnen gebruikers kiezen tussen een paar industriestandaard Arm Cortex-M33-kernen en een paar open-hardware Hazard3 RISC-V-kernen. Programmeerbaar in C/C++ en Python, en ondersteund door gedetailleerde documentatie, is de Raspberry Pi Pico 2 het ideale microcontrollerbord voor zowel liefhebbers als professionele ontwikkelaars.
Specificaties
CPU
Dual Arm Cortex-M33 of dubbele RISC-V Hazard3-processors @ 150 MHz
Geheugen
520 KB SRAM op de chip; 4 MB ingebouwde QSPI-flitser
Interfaces
26 multifunctionele GPIO-pinnen, waaronder 4 die kunnen worden gebruikt voor AD
Randapparatuur
2x UART
2x SPI-controllers
2x I²C-controllers
24x PWM-kanalen
1x USB 1.1-controller en PHY, met host- en apparaatondersteuning
12x PIO-statusmachines
Ingangsvermogen
1,8-5,5 V DC
Afmetingen
21 x 51 mm
Downloads
Datasheet (Pico 2)
Datasheet (RP2350)
De Raspberry Pi Debug Probe is een alles-in-één USB-naar-debug-kit die alle benodigde hardware en kabels biedt voor eenvoudig, soldeerloos, plug-and-play debuggen.
Het beschikt over zowel een seriële debug-interface voor de processor (standaard de ARM Serial Wire Debug-interface, maar andere interfaces kunnen worden ondersteund) en een industriestandaard UART-interface. Beide interfaces gebruiken de Raspberry Pi 3-pins debug-connector.
Het is ontworpen om het debuggen en programmeren van Raspberry Pi Pico en RP2040 gemakkelijk te maken met een reeks hostplatforms, waaronder Windows, Mac en typische Linux-computers.
Hoewel de Debug Probe ontworpen is voor gebruik met Raspberry Pi-producten, biedt hij standaard UART- en CMSIS-DAP-interfaces via USB, zodat hij ook met andere processors kan worden gebruikt, of zelfs gewoon als USB-naar-UART-kabel. Het werkt met OpenOCD en andere tools die CMSIS-DAP ondersteunen.
De Debug Probe is gebaseerd op Raspberry Pi Pico-hardware en draait op de open source Raspberry Pi Picoprobe-software. De firmware wordt op dezelfde manier bijgewerkt als de Raspberry Pi Pico-firmware, dus het is gemakkelijk om het apparaat up-to-date te houden met de nieuwste firmware of om aangepaste firmware te gebruiken.
Kenmerken
USB naar ARM Serial Wire Debug (SWD)-poort
USB naar UART-brug
Compatibel met de CMSIS-DAP standaard
Werkt met OpenOCD en andere tools die CMSIS-DAP ondersteunen
Open source, eenvoudig te upgraden firmware
Specificaties
Dimensions: 22 x 32 mm
Nominal I/O voltage: 3.3 V
Operating temperature: -20°C to +70°C
Inbegrepen
1x Raspberry Pi Debug Probe
1x Kunststof koffer
1x USB-kabel
3x Debug-kabels
3-pins JST-connector naar 3-pins JST-connectorkabel
3-pins JST-connector naar 0,1-inch header (vrouwelijk)
3-pins JST-connector naar 0,1-inch header (mannelijk)
Downloads
Datasheet
3-pin Debug Connector
Schematics
Diagram
Latest Firmware
De Raspberry Pi Zero W is de nieuwste telg van de Raspberry Pi Zero-familie. De Raspberry Pi Zero W heeft alle functionaliteit van de originele Raspberry Pi Zero, maar wordt geleverd met toegevoegde connectiviteit bestaande uit:
802.11 b/g/n WLAN
Bluetooth 4.1
Bluetooth Low Energy (BLE)
Overige kenmerken
1 GHz, single-core CPU
512 MB RAM
Mini HDMI en USB On-The-Go poorten
Micro-USB voeding
HAT-compatibele 40-pins header
Composiet video en reset headers
CSI-camera-aansluiting
Downloads
Mechanische tekening
Schema's
De Raspberry Pi Pico W is een microcontroller board gebaseerd op de Raspberry Pi RP2040 microcontroller chip.
De RP2040-microcontrollerchip ('Raspberry Silicon') heeft een dual-core ARM Cortex-M0+ processor (133 MHz), 256 KB RAM, 30 GPIO-pinnen, en nog vele andere interface opties. Daarnaast is er 2 MB on-board QSPI-flashgeheugen voor code- en gegevensopslag.
De Raspberry Pi Pico W is ontworpen als een goedkoop maar flexibel ontwikkelingsplatform voor de RP2040, met een 2,4 GHz draadloze interface met de Infineon CYW43439. De draadloze interface is via SPI aangesloten op de RP2040.
Kenmerken van de Pico W
RP2040 microcontroller met 2 MB flashgeheugen
On-board single-band 2,4 GHz draadloze interfaces (802.11n)
Micro USB B poort voor voeding en data (en voor het herprogrammeren van de flash)
40 pin 21 x 51 mm 'DIP' stijl 1 mm dikke PCB met 0,1' through-hole pinnen met ook gegroefde gaten.
Beschikt over 26 multifunctionele 3,3 V I/O voor algemeen gebruik (GPIO)
23 GPIO zijn alleen digitaal, en 3 GPIO die ook geschikt zijn voor ADC
Kan als opbouw-module worden gemonteerd
3-pins ARM serial wire debug (SWD) poort
Eenvoudige maar zeer flexibele mogelijkheden voor de voeding:
Verschillende opties om het apparaat eenvoudig van stroom te voorzien via micro-USB, externe voedingen of batterijen
Hoge kwaliteit, lage kosten, hoge beschikbaarheid
Uitgebreide SDK, voorbeeldsoftware en documentatie
Kenmerken van de RP2040 microcontroller
Dual-core cortex M0+ tot maximaal 133 MHz
On-chip PLL maakt variabele core-frequentie mogelijk
264 kByte multi-bank SRAM met hoge prestaties
Externe Quad-SPI Flash met eXecute In Place (XIP) en 16 kByte on-chip cache
Hoogwaardige full-crossbar bus architecture
Ingebouwde USB1.1 (device of host)
30 multifunctionele algemene I/O (vier kunnen worden gebruikt voor ADC)
1,8-3,3 V I/O-spanning
12-bits 500 ksps analoog naar digitaal converter (ADC)
Diverse digitale randapparatuur
2x UART, 2x I²C, 2x SPI, 16x PWM kanalen
1x timer met 4 alarmen, 1x real time clock
2x programmeerbare I/O (PIO) blokken, 8 state machines in totaal
Flexibele, door de gebruiker programmeerbare high-speed I/O
Kan interfaces zoals SD-kaart en VGA emuleren
Note: De Raspberry Pi Pico W I/O-spanning is 3,3 V.
Downloads
Datasheet
Specifications of 3-pin Debug Connector