This repository contains a collection of scripts and libraries designed to help you quickly get started with the Raspberry Pi Pico 2 W and various sensors or modules. Each directory corresponds to a specific sensor or module and includes the necessary code to interface with it.
Scripts for the SCD41 sensor. Includes I2C scanning and test scripts. Module arrived non-functional. My tests were thorough, triple checked my wiring and never got any life from the i2c_scan. Code should work to get a functional sda41 started.
Code for the AHT20 temperature and humidity sensor. Includes examples and libraries.
Combines the AHT20 and BMP280 sensors for temperature, humidity, and pressure measurements.
Scripts for using the AHT20 sensor alongside the ENS160 air quality sensor.
Code for the APDS9960 proximity and gesture sensor.
Scripts for the BME680 environmental sensor, which measures temperature, humidity, pressure, and gas.
Code for the BMI160 inertial measurement unit (IMU) for motion sensing.
Scripts for the LD2410C microwave-based human/object presence sensor.
Code for the MMC5603 magnetometer sensor.
A simple script to generate PWM signals for testing an oscilloscope.
Scripts for the SHT45 temperature and humidity sensor.
Code for the SSD1306 OLED display module.
Scripts to host a basic webpage on the Raspberry Pi Pico for controlling an LED and displaying temperature readings.
An enhanced version of the working_webpage directory with improved HTML and CSS styling.
- Hardware Setup: Connect the Raspberry Pi Pico 2 W to the sensor or module as per the datasheet or documentation. If it doesn't work, congratulations, you have likely encountered the hardware tinkerer's infinite annoyance, some minor connection issue. But I all the code has been thoroughly tested.
- Software Setup: Copy the relevant directory to your Raspberry Pi Pico 2 W. With a blank pico, you can just directly copy the given directory and it's ready to run.
- Run the Script: Use a MicroPython-compatible IDE (e.g., Thonny) to run the script. I've only ever used Thonny, it makes working with microcontrollers in micropython very straightforward. One can use other IDEs like Mu or Visual Studio Code with the Pymakr extension, but Thonny is the only one I can speak to.
- Each directory contains a
lib/folder with the necessary libraries for the sensor or module. - Some scripts may require additional configuration, such as Wi-Fi credentials for web-based examples.
- Portions of the scripts were sourced from various places on the web. Every effort has been made to cite these sources where possible, but some attributions may have been missed.
This repository is licensed under the MIT License. It is provided as-is for educational and prototyping purposes. Please ensure compliance with any licenses or terms associated with the included libraries.
466f724a616e6574