Fixed typos, improved understandability

This commit is contained in:
BlueFox 2024-11-16 15:43:07 +01:00
parent 72bc662cb8
commit a6b531c394
Signed by: BlueFox
GPG Key ID: 327233DA85435270

View File

@ -5,15 +5,15 @@ A collection of programs run on a Raspberry Pi Pico to control a uv exposure uni
## Hardware
This program is strongly customized to my needs, and my DIY exposure unit has **two buttons** and **one switch** to interact with the software (and a power switch FWIW). Also, a **16x2 display** (maybe 20x4 or others do also work, but these are not tested) can show information to the user.
This software is strongly customized to my needs, and my DIY exposure unit has **two buttons** and **one switch** to interact with the software (and a power switch FWIW). Also, a **16x2 display** (maybe 20x4 or others do also work, but these are not tested) can show information to the user.
A **relais** is used for switching all the LEDs.
| Device Pin | Pi Pico Pin |
| ------------------ | ----------- |
| BTN_1 Pin 1 | 3.3V |
| BTN_1 Pin 2 | GPIO15 |
| BTN_2 Pin 1 | 3.3V |
| BTN_2 Pin 2 | GPIO14 |
| BTN\_1 Pin 1 | 3.3V |
| BTN\_1 Pin 2 | GPIO15 |
| BTN\_2 Pin 1 | 3.3V |
| BTN\_2 Pin | GPIO14 |
| SWITCH Pin 1 | 3.3V |
| SWITCH Pin 2 | GPIO13 |
| LCD SDA | GPIO8 |
@ -23,12 +23,12 @@ A **relais** is used for switching all the LEDs.
| Relais control pin | GPIO21 |
## Installation
## Software installation
To install this software on your Pi Pico, first clone the repository with `git clone --recurse-submodules` to populate the submodules also (some libraries are included as submodules). Then use [Thonny](https://thonny.org/), open all the files present in this repository and then save them onto a [Raspberry Pi Pico](https://www.raspberrypi.com/products/raspberry-pi-pico/) (or [Pico 2](https://www.raspberrypi.com/products/raspberry-pi-pico-2/), but it's not tested on this platform yet) running [MicroPython](https://micropython.org/). Then, given you followed above wiring, it should just be running! Then you can jump over the configuration section.
## Configuration
## First configuration
All the configuration can be done in the [config.json](config.json) file in JSON format just have a look around there. Some hints for editing this file:
@ -40,6 +40,8 @@ All the configuration can be done in the [config.json](config.json) file in JSON
- If your display doesn't work properly - the first issue might be a wrong i2c address. To find the address of your display, just follow some of the tutorials on the internet on scanning for i2c devices (e.g. [here](https://randomnerdtutorials.com/raspberry-pi-pico-i2c-scanner-micropython/)).
- The most basic configuration changes can be made directly from the device, without the need of connecting it to a PC, essentially making it a kind-of standalone device once flashed!
### Attribute table
@ -59,8 +61,8 @@ All the configuration can be done in the [config.json](config.json) file in JSON
| `"PIN_SCL"` | int | the pin number of the scl wire connected to the lcd | `9` |
| `"LCD_I2C_CH"` | int | the channel of the i2c bus used | `0` |
| `"LCD_I2C_ADDR"` | int | the i2c address of the lcd; make sure to convert hexadecimal to decimal numbers | `38` |
| `"LCD_I2C_NUM\_ROWS"` | int | how many rows for character display has the display? | `2` |
| `"LCD_I2C_NUM\_COLS"` | int | and how many characters can it display per row? | `16` |
| `"LCD_I2C_NUM_ROWS"` | int | how many rows for character display has the display? | `2` |
| `"LCD_I2C_NUM_COLS"` | int | and how many characters can it display per row? | `16` |
| `"TIMER_1_DURATION"` | int | the timer duration of the first timer; IN SECONDS | `60` (1min) |
| `"TIMER_2_DURATION"` | int | as above, but of the seconds timer; IN SECONDS | `2400` (40min) |
| `"TIMER_3_DURATION"` | int | as above, but of the third timer; IN SECONDS | `2700` (45min) |