Welcome to the Raspberry Pi Pico repository! This repository contains various scripts and projects designed to run on the Raspberry Pi Pico. Whether you're a beginner or an experienced developer, you'll find useful code and examples to get the most out of your Pico.
The Raspberry Pi Pico is a low-cost, high-performance microcontroller board built around the Raspberry Pi RP2040 chip. With its dual-core ARM Cortex-M0+ processor and flexible I/O options, it's perfect for a wide range of applications, from simple LED blinking to complex IoT systems.
To get started with the Raspberry Pi Pico, you'll need:
- A Raspberry Pi Pico board
- Micro-USB cable
- A computer with USB ports
- MicroPython or C/C++ development environment
- Download and install Thonny IDE.
- Connect your Pico to your computer using the micro-USB cable.
- In Thonny, go to
Tools
>Options
>Interpreter
and selectMicroPython (Raspberry Pi Pico)
.
For detailed instructions, refer to the official Raspberry Pi Pico documentation.
This project is a smart watering plant station using MicroPython and a Raspberry Pi Pico. It includes the following features:
- Battery Voltage Checker: Monitors the battery level to ensure reliable operation.
- Soil Moisture Sensor: Measures soil moisture to determine when watering is needed.
- Environmental Monitoring: Measures air temperature and humidity with a DHT22 sensor.
- MQTT Communication: Integrates with a Node.js dashboard for remote monitoring and control.
- 5V Pump Control: Uses a relay to control a 5V water pump for irrigation.
- Remote Irrigation: Allows remote control of irrigation via the Node.js dashboard (using MQTT).
- Custom DeepSleep: Implements a low energy consumption mode to extend battery life.
- Settings Management: Saves default and custom settings in a text file on the Pico, configurable via MQTT.
- Status LED: Uses the onboard LED to indicate system status.
This repository also includes various utility scripts for the Raspberry Pi Pico:
blink.py
: A simple script to blink an onboard LED.deepsleep.py
: Low energy consumption mode to extend battery life (resolve a RP critical issues)batterystatus.py
: A script to check battery level (voltage) for a 18650 lithium 4.2V battery (using voltage divider circuit).myntptime.py
: A script to set RP time using NTP public server (with winter/summer time support).lcd.py
: LCD Micropyhton library to interface RP with LCD screens.
Each script is well-documented with comments to help you understand how it works and how to modify it for your own purposes.
We welcome contributions! If you have a project or script you'd like to share, please fork the repository and submit a pull request. Make sure to follow the existing code style and include comments in your code.
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -m 'Add YourFeature'
) - Push to the branch (
git push origin feature/YourFeature
) - Open a pull request