Endpreise in CHF – Versand inklusive Schweizer Unternehmen · 076 792 63 50 (WhatsApp/SMS)
Kurse › Arduino › Stufe 27
Arduino · Advanced · Stufe 27 / 40

Writing and Publishing Your Own Libraries

Turn working code into versioned, documented, portable libraries that others can install and trust.

Advanced freischalten · CHF 29.90 Stufen 27–40, einmalig, kein Abo

10 Lektionen in dieser Stufe

  1. Version Control with Git for Firmware Projects
    Track changes with commits, branches and tags and write useful commit messages. · Lab: Put an existing project under Git, make three meaningful commits and undo a mistake.
  2. Anatomy of an Arduino Library Folder
    Lay out src, examples and metadata so the IDE recognises the library. · Lab: Create a skeleton library and include it from a sketch.
  3. Designing a Clean, Non-Blocking Public API
    Define a small set of clear functions that never stall the caller. · Lab: Write the header for a sensor driver with begin, update and read functions before any implementation.
  4. Writing a Device Driver from a Datasheet
    Implement register access, configuration and conversion to physical units. · Lab: Complete the driver for an I2C sensor and verify readings against a second instrument.
  5. Hardware Abstraction: Injecting Wire, SPI and Stream Objects
    Accept bus objects as parameters so the library works on any port and board. · Lab: Run the same driver on a second I2C port of an ESP32 without changing the library.
  6. Supporting Several Boards with Conditional Compilation
    Handle architecture differences with preprocessor checks and feature flags. · Lab: Make the library compile cleanly for AVR, ESP32 and ESP8266.
  7. Example Sketches, keywords.txt and library.properties
    Provide working examples and complete metadata. · Lab: Add a minimal and an advanced example and fill in all metadata fields.
  8. Documentation, Semantic Versioning and Changelogs
    Write a README that answers user questions and number releases meaningfully. · Lab: Document wiring and API and tag version 1.0.0 with a changelog entry.
  9. Error Codes, Return Values and Defensive Checks
    Report failures clearly and never hang on a missing device. · Lab: Add status codes and timeouts and test with the sensor unplugged.
  10. Publishing a Library, Choosing a Licence and Handling Issues
    Release publicly, pick an open-source licence and respond to bug reports. · Lab: Publish the repository, install the library from its archive on a clean computer and fix a reported issue.

Abschlussprojekt

A published, versioned driver library for an I2C sensor with non-blocking API, examples for AVR and ESP32, documentation and a changelog.

Teile für diese Stufe

  • 1 × UNO-compatible board
  • 1 × ESP32 development board
  • 2 × USB cable matching each board
  • 1 × Solderless breadboard 830 points
  • 1 × Jumper wire set male-male and male-female
  • 1 × I2C temperature sensor module LM75 or similar
  • 1 × I2C light sensor module BH1750
  • 1 × SPI thermocouple converter module MAX6675 with probe
  • 1 × USB logic analyzer 8 channel

In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Arduino-kompatibel →

Voraussetzung: Levels 1–26: classes, multiple files, register-level drivers, I2C and SPI and several board families.

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