Endpreise in CHF – Versand inklusive Schweizer Unternehmen · 076 792 63 50 (WhatsApp/SMS)
Kurse › Raspberry Pi › Stufe 12
Raspberry Pi · Einsteiger · Stufe 12 / 40

SPI, UART and Analog Signals

Use SPI and serial devices, add true analog inputs and inspect bus traffic with a logic analyzer.

Einsteiger freischalten · CHF 9.90 Stufen 1–13, einmalig, kein Abo

10 Lektionen in dieser Stufe

  1. SPI Signals: Clock, MOSI, MISO and Chip Select
    Explain how SPI moves data in both directions at once and what the modes mean. · Lab: Label the four signals on a timing diagram and identify the clock mode.
  2. Talking to SPI Devices with spidev
    Enable SPI and exchange bytes with a device from Python. · Lab: Enable SPI and run a loopback test with MOSI wired to MISO.
  3. Adding Analog Inputs with an MCP3008
    Wire an ADC and read channels with gpiozero's MCP3008 class. · Lab: Wire the MCP3008 and print the value of a potentiometer as you turn it.
  4. Potentiometers, Joysticks and Soil Moisture Probes
    Connect common analog devices and map their output to a useful range. · Lab: Read a joystick on two channels and a soil probe in dry and wet soil.
  5. Higher Resolution with an ADS1115 over I2C
    Use programmable gain and differential inputs for small signals. · Lab: Measure a small voltage with the MCP3008 and the ADS1115 and compare the step size.
  6. Converting ADC Counts into Real Units
    Apply reference voltage, resolution and a two-point calibration. · Lab: Calibrate the soil probe and a voltage divider against a multimeter.
  7. UART Framing: Baud Rate, Start and Stop Bits
    Describe an asynchronous serial frame and what a baud mismatch looks like. · Lab: Decode one printed UART byte by hand at a given baud rate.
  8. Freeing the Header UART and the Serial Console
    Configure the serial port for your own devices on Pi 4 and Pi 5. · Lab: Disable the login console on the header UART and loop TX to RX to test it.
  9. Reading GPS NMEA Sentences with pyserial
    Parse a stream of serial text into position and time. · Lab: Read a GPS module, extract latitude, longitude and UTC time and log them.
  10. Decoding I2C, SPI and UART with a Logic Analyzer
    Capture bus traffic and read it with protocol decoders. · Lab: Capture one BME280 read, one MCP3008 read and one GPS sentence and annotate each.

Abschlussprojekt

A GPS-tagged field logger that samples analog probes through an ADC, records position and time, and whose bus traffic you have verified with a logic analyzer.

Teile für diese Stufe

  • 1 × Raspberry Pi 5 or Pi 4 set from Level 1
  • 1 × Breadboard and jumper wire set
  • 1 × MCP3008 8-channel ADC
  • 1 × ADS1115 16-bit ADC module
  • 2 × Potentiometer 10 k ohm
  • 1 × Analog joystick module
  • 1 × Capacitive soil moisture sensor
  • 1 × GPS receiver module with UART output
  • 1 × USB to TTL serial adapter (3.3 V)
  • 1 × USB logic analyzer 8-channel

In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Raspberry Pi →

Voraussetzung: Level 11: I2C, register access and byte manipulation.

🔒 Sichere Zahlung · 3D Secure 🔐 SSL-verschlüsselt 🚚 Versand in die ganze Schweiz 🇨🇭 Schweizer Unternehmen