Easy way to connect hardware and use gpio in raspberry pico
Project description
GPIO CONTROL IN RASPBERRY PI PICO
## Hardware control
### Input Devices
- Touch Sensor
- Potenciometer
- Joystick
- PIR
- LM35
- Nextion Display
### Ouput Devices
- LED
- Relay
- Solid state relay
- Motor DC
- RGB
- Servo motor
### Descargar paquete
```
pip install gpiopico
```
### Blink
```python
from gpiopico import Led
from utime import sleep
if __name__=='__main__':
led = Led(pin=0, inverted_logic=True)#common anode
for _ in range(4):
led.on()
sleep(1)
led.off()
sleep(1)
for pwm in range(256):
led.pwm_value(pwm)#0-255
sleep(0.2)
```
### Button
```python
from gpiopico import Led, Button
from utime import sleep
if __name__=='__main__':
led = Led(pin=0, inverted_logic=True)#common anode
button = Button(pin=1)
button.when_pressed = led.on
button.on_hold = led.off
while True:
button.check_state()
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gpiopico-1.2.0.tar.gz
(8.6 kB
view details)
File details
Details for the file gpiopico-1.2.0.tar.gz.
File metadata
- Download URL: gpiopico-1.2.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88a9714dc04919016cd05bce5f8452698d136ecda14dd826c8362469713deb03
|
|
| MD5 |
d98a410174adf2372f40fc40de9c652e
|
|
| BLAKE2b-256 |
5a6a800385c6f5ba68dbb0546f866ef1b79c53d3fc4cd3d1851f8be646839440
|