Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stackxp/picogo-circuitpython
A Circuitpython library for the PicoGo
https://github.com/stackxp/picogo-circuitpython
circuitpython circuitpython-library circuitpython-pico pico raspberry-pi-pico robotics
Last synced: about 2 months ago
JSON representation
A Circuitpython library for the PicoGo
- Host: GitHub
- URL: https://github.com/stackxp/picogo-circuitpython
- Owner: stackxp
- License: mit
- Created: 2024-10-02T16:43:52.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-02T16:45:55.000Z (3 months ago)
- Last Synced: 2024-11-06T21:52:35.114Z (about 2 months ago)
- Topics: circuitpython, circuitpython-library, circuitpython-pico, pico, raspberry-pi-pico, robotics
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PicoGo Library for Circuitpython
This is a port of the [Micropython library](https://github.com/MKesenheimer/pico-go) for [Waveshare's PicoGo](https://www.waveshare.com/wiki/PicoGo) robot.
> [!NOTE]
> This library only works with the Raspberry Pi Pico's version of Circuitpython as the PicoGo can only be used with that board.## Requirements
Place the following librarys in the `lib` folder on your Pico.
```
- adafruit_bus_device
- adafruit_hcrs04.mpy
- adafruit_st7789.mpy
- neopixel.mpy
```## Examples
Drive forwards for 3 seconds then blink the first neopixel:
```python
from picogo import PicoGo
import timego = PicoGo()
# Range forwards: 0 (stop) 1 (full speed)
# Range backwards: 0 (stop) -1 (full speed)
go.set_motors(0.5, 0.5)
time.sleep(3)
go.set_motors(0, 0)for i in range(3):
go.NEOPIXEL[0] = (255, 255, 255)
time.sleep(0.5)
go.NEOPIXEL[0] = (0, 0, 0)
time.sleep(0.5)
```Display the distance of the ultrasonic sensor on the display:
(Note that you'll need the `adafruit_display_text` library)
```python
import time, terminalio
from picogo import PicoGo
from adafruit_display_text import labelgo = PicoGo()
text = label.Label(terminalio.FONT, text="", color=0xFFFFFF, y=10, scale=2)
go.DISPLAY.root_group = textwhile True:
text.text = f"Distance: {go.measure_distance()}"
time.sleep(0.1)
```The library uses standard Circuitpython objects. For documentation on these, look at https://learn.adafruit.com or https://docs.circuitpython.org.