This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: co2 | |
rp2040: | |
board: rpipicow | |
framework: | |
# Required until https://github.com/platformio/platform-raspberrypi/pull/36 is merged | |
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git | |
# Enable logging | |
logger: | |
# Enable Home Assistant API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as g | |
import time | |
from subprocess import call | |
call('clear') | |
# set the board | |
g.setmode(g.BOARD) | |
# set up PIN 12 for output |