""" uv-belichter-software - Configuration file Copyright (C) 2024 Benjamin Burkhardt This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . """ """ --------------------------- ----- LOGGING SECTION ----- --------------------------- """ LOG_LEVEL = 2 # there are three log levels: warn (0), info (1), debug (2) # this value defines which log messages to show # e.g. 2 means show [debug], [warn] and [info] messages """ --------------------------- ----- STARTUP SECTION ----- --------------------------- """ STARTUP_PROJECT_NAME = " UV-Belichter " # the name to show at startup STARTUP_MESSAGE_STARTING = "Starting..." # the message to show at startup STARTUP_MESSAGE_FINISHED = " Started! " # the message to show at startup STARTUP_WELCOME_SHOW = True # show the name and a startup message STARTUP_WELCOME_CYCLES = 1 # how often shall "Starting..." run over the screen """ -------------------------- ----- PINOUT SECTION ----- -------------------------- """ from machine import Pin BTN_1 = Pin(15, Pin.IN, Pin.PULL_DOWN) # input of the first btn BTN_2 = Pin(14, Pin.IN, Pin.PULL_DOWN) # input of the second btn SWITCH = Pin(13, Pin.IN, Pin.PULL_DOWN) # input of switch LCD_SDA = Pin(8) # just some standard I2C serial data (SDA) outputs (on I2C channel 0 on Pi Pico) LCD_SCL = Pin(9) # just some standard I2C serial clock (SCL) outputs (on I2C channel 0 on Pi Pico) #LCD_SDA = Pin(16) # another pinout (soldered on the original project's circuit board) #LCD_SCL = Pin(17) # another pinout (soldered on the original project's circuit board) RELAIS = Pin(21, Pin.OUT) # where the relais is connected (for the UV lights) """ ----------------------- ----- LCD SECTION ----- ----------------------- """ from machine import I2C, Pin from lib.PCF8574T import I2C_LCD LCD_I2C_ADDR = 0x27 # the i2c adress of the display (yours might be different to this one) LCD_I2C_NUM_ROWS = 2 # how many rows for character display has the display? LCD_I2C_NUM_COLS = 16 # and how many characters can it display per row? LCD = I2C_LCD(I2C(0, sda=LCD_SDA, scl=LCD_SCL, freq=400000), LCD_I2C_ADDR, LCD_I2C_NUM_ROWS, LCD_I2C_NUM_COLS)