PinPong

PinPong is an Python library designed to facilitate direct hardware control across multiple platforms, including Arduino, micro:bit, Raspberry Pi, and UNIHIKER. By providing a unified API, it allows developers to execute Python code on a host computer to manipulate sensors, actuators, and communication protocols (I2C, SPI, UART) on connected microcontroller boards without firmware modification. This Wiki serves as the official documentation hub, offering installation guides, API references for board and pin classes, and extensive example codes for basic, common, and extended libraries to support rapid hardware prototyping.
Clear

Introduction

This section introduces the basic principle of the PinPong library.

Installation Guide

This document provides instructions for installing the PinPong Python library on different operating systems, including Linux, macOS, and Windows. It also introduces the basic environment setup and simple steps to run the first example program after installation.

Basic Library Examples

This document provides basic example programs of the PinPong library, demonstrating how to use Python to perform digital input/output, analog input, PWM output, and pin interrupt control on supported hardware boards.

Common Library Examples

This document provides example programs for commonly used modules in the PinPong library, demonstrating how to control devices such as servo motors, buzzers, ultrasonic sensors, temperature and humidity sensors, and WS2812 LEDs using Python.

Extended Library Examples

This document provides example programs for the PinPong extension libraries, demonstrating how to control various modules such as LCD/OLED displays, sensors, ultrasonic modules, RGB displays, infrared temperature sensors, and NFC modules using Python.

Unihiker Examples

This document introduces example resources for using the PinPong library on the UNIHIKER K10&M10.

More Examples

This section explains how to locate additional PinPong example programs in the library installation directory and access the built-in examples provided in the examples folder.

Board Class

This document introduces the Board class in the PinPong library, including its constructor, parameters, supported board types, and the begin() method used to initialize and connect to the hardware board.

Pin Class

This document introduces the Pin class in the PinPong library, including how to initialize pins and use basic methods for digital input/output and interrupt control.

ADC Class

This document introduces the ADC class in the PinPong library, including how to initialize an ADC object and read analog values from a specified analog pin.

PWM Class

This document introduces the PWM class in the PinPong library, including how to initialize PWM output and configure parameters such as frequency and duty cycle.

PinPong FAQ

This document provides answers to common questions when using the PinPong library, including hardware operation requirements and troubleshooting common serial port connection issues.

TOP