pimoroni-pico/micropython/examples/pico_explorer/README.md

82 wiersze
3.3 KiB
Markdown
Czysty Zwykły widok Historia

2022-07-12 17:33:46 +00:00
# Pico Explorer MicroPython Examples <!-- omit in toc -->
2022-07-12 18:50:32 +00:00
- [PicoGraphics](#picographics)
- [Non-Wireless Examples](#non-wireless-examples)
- [Balls Demo](#balls-demo)
- [Button Test](#button-test)
- [Demo](#demo)
- [Noise](#noise)
- [Rainbow](#rainbow)
- [Thermometer](#thermometer)
- [Weather Station (BME280)](#weather-station-bme280)
- [Weather Station (BME68X)](#weather-station-bme68x)
- [Wireless Examples](#wireless-examples)
- [Cheerlights](#cheerlights)
2023-01-18 16:32:08 +00:00
- [Other Resources](#other-resources)
2022-07-12 17:33:46 +00:00
## PicoGraphics
You can draw on Pico Explorer's display using our tiny PicoGraphics display library.
- [PicoGraphics MicroPython function reference](../../modules/picographics)
## Non-Wireless Examples
### Balls Demo
[balls_demo.py](balls_demo.py)
2022-07-12 17:33:46 +00:00
LCD demo showing 100 bouncy balls!
2022-07-12 17:33:46 +00:00
### Button Test
[button_test.py](button_test.py)
2022-07-12 17:33:46 +00:00
This example shows you a simple, non-interrupt way of reading Pico Explorer's buttons with a loop that checks to see if buttons are pressed.
### Demo
[demo.py](demo.py)
2022-07-12 17:33:46 +00:00
A demo of all Pico Explorer's functions. Connect analog inputs like potentiometers up to ADC0-ADC3 and motors to the motor channels for best results. Connect AUDIO to GP0 with a jumper wire to hear noise.
### Noise
[noise.py](noise.py)
2022-07-12 17:33:46 +00:00
This example shows you how you can use Pico Explorer's onboard buzzer as a speaker to play different notes and string them together into a bleepy tune (you'll need to connect AUDIO to GP0 with a jumper wire to hear noise).
### Rainbow
[rainbow.py](rainbow.py)
2022-07-12 17:33:46 +00:00
This example borrows a CircuitPython hsv to rgb function to cycle through some rainbows on Pico Explorer's screen.
### Thermometer
[thermometer.py](thermometer.py)
2022-07-12 17:33:46 +00:00
This example takes the temperature from the Pico's onboard temperature sensor, and displays it on Pico Explorer, along with a little pixelly graph.
### Weather Station (BME280)
[weatherstation_BME280.py](weatherstation_BME280.py)
2022-07-12 17:33:46 +00:00
Plug a [BME280 breakout](https://shop.pimoroni.com/products/bme280-breakout) into your Pico Explorer and make a little indoor weather station, with barometer style descriptions.
2022-07-12 17:33:46 +00:00
### Weather Station (BME68X)
[weatherstation_BME68X.py](weatherstation_BME68X.py)
2022-07-12 17:33:46 +00:00
Plug a [BME680](https://shop.pimoroni.com/products/bme680-breakout) or [BME688](https://shop.pimoroni.com/products/bme688-breakout) breakout into your Pico Explorer to make a little indoor weather station, with barometer style descriptions.
2022-07-12 17:33:46 +00:00
## Wireless Examples
2022-07-14 15:53:32 +00:00
The wireless examples need `network_manager.py` and `WIFI_CONFIG.py` from the `common` directory to be saved to your Pico W. Open up `WIFI_CONFIG.py` in Thonny to add your wifi details (and save it when you're done).
2022-07-12 17:33:46 +00:00
2023-01-18 16:32:08 +00:00
You may also need to install the `micropython-urllib.urequest` library using Thonny's 'Tools' > 'Manage Packages'.
2022-07-12 17:33:46 +00:00
### Cheerlights
[cheerlights.py](cheerlights.py)
This Pico W example sets your Pico Explorer's screen (and optionally, a [RGB LED](https://shop.pimoroni.com/products/led-rgb-clear-common-cathode)) to the current #cheerlights colour.
2022-07-12 17:33:46 +00:00
2023-01-18 16:32:08 +00:00
## Other Resources
Here are some Pico Explorer community projects and resources that you might find useful! Note that code at the links below has not been tested by us and we're not able to offer support with it.
- :link: [PicoGraphics Zoomable Mandelbrot](https://github.com/ExperiMentor/PicoGraphics_Zoomable_Mandelbrot)