Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Para introducir valores con un potenciómetro en una Rpi 1B
# Script para leer una señal analógica y convertirla en digital
# Raspberry Pi 1
# MCP3008
from gpiozero import MCP3008, PWMLED
from time import sleep
pot = MCP3008(0) # Pot is connected to CH0
led = PWMLED(25)
while True:
led.value = pot.value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment