fix: update TTP223 pin configuration and adjust touch sensor logic
This commit is contained in:
parent
823db6157c
commit
29868e7101
31
README.de.md
31
README.de.md
@ -55,19 +55,22 @@ Discord Server: [https://discord.gg/my7Gvaxj2v](https://discord.gg/my7Gvaxj2v)
|
|||||||
## Hardware-Anforderungen
|
## Hardware-Anforderungen
|
||||||
|
|
||||||
### Komponenten
|
### Komponenten
|
||||||
- **ESP32 Entwicklungsboard:** Jede ESP32-Variante.
|
- **ESP32 Development Board:** Any ESP32 variant.
|
||||||
[Amazon Link](https://amzn.eu/d/aXThslf)
|
[Amazon Link](https://amzn.to/3FHea6D)
|
||||||
- **HX711 5kg Wägezellen-Verstärker:** Für Gewichtsmessung.
|
- **HX711 5kg Load Cell Amplifier:** For weight measurement.
|
||||||
[Amazon Link](https://amzn.eu/d/06A0DLb)
|
[Amazon Link](https://amzn.to/4ja1KTe)
|
||||||
- **OLED 0.96 Zoll I2C weiß/gelb Display:** 128x64 SSD1306.
|
- **OLED 0.96 Zoll I2C white/yellow Display:** 128x64 SSD1306.
|
||||||
[Amazon Link](https://amzn.eu/d/0AuBp2c)
|
[Amazon Link](https://amzn.to/445aaa9)
|
||||||
- **PN532 NFC NXP RFID-Modul V3:** Für NFC-Tag-Operationen.
|
- **PN532 NFC NXP RFID-Modul V3:** For NFC tag operations.
|
||||||
[Amazon Link](https://amzn.eu/d/jfIuQXb)
|
[Amazon Link](https://amzn.to/4iO6CO4)
|
||||||
- **NFC Tags NTAG213 NTA215:** RFID Tag
|
- **NFC Tags NTAG213 NTAG215:** RFID Tag
|
||||||
[Amazon Link](https://amzn.eu/d/9Z6mXc1)
|
[Amazon Link](https://amzn.to/3E071xO)
|
||||||
|
- **TTP223 Touch Sensor (optional):** For reTARE per Button/Touch
|
||||||
|
[Amazon Link](https://amzn.to/4hTChMK)
|
||||||
|
|
||||||
### Pin-Konfiguration
|
|
||||||
| Komponente | ESP32 Pin |
|
### Pin Konfiguration
|
||||||
|
| Component | ESP32 Pin |
|
||||||
|-------------------|-----------|
|
|-------------------|-----------|
|
||||||
| HX711 DOUT | 16 |
|
| HX711 DOUT | 16 |
|
||||||
| HX711 SCK | 17 |
|
| HX711 SCK | 17 |
|
||||||
@ -77,8 +80,10 @@ Discord Server: [https://discord.gg/my7Gvaxj2v](https://discord.gg/my7Gvaxj2v)
|
|||||||
| PN532 RESET | 33 |
|
| PN532 RESET | 33 |
|
||||||
| PN532 SDA | 21 |
|
| PN532 SDA | 21 |
|
||||||
| PN532 SCL | 22 |
|
| PN532 SCL | 22 |
|
||||||
|
| TTP223 I/O | 25 |
|
||||||
|
|
||||||
**Achte darauf, dass am PN532 die DIP-Schalter auf I2C gestellt sind**
|
**!! Achte darauf, dass am PN532 die DIP-Schalter auf I2C gestellt sind**
|
||||||
|
**Nutze den 3V Pin vom ESP für den Touch Sensor**
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
16
README.md
16
README.md
@ -60,15 +60,17 @@ Discord Server: [https://discord.gg/my7Gvaxj2v](https://discord.gg/my7Gvaxj2v)
|
|||||||
|
|
||||||
### Components
|
### Components
|
||||||
- **ESP32 Development Board:** Any ESP32 variant.
|
- **ESP32 Development Board:** Any ESP32 variant.
|
||||||
[Amazon Link](https://amzn.eu/d/aXThslf)
|
[Amazon Link](https://amzn.to/3FHea6D)
|
||||||
- **HX711 5kg Load Cell Amplifier:** For weight measurement.
|
- **HX711 5kg Load Cell Amplifier:** For weight measurement.
|
||||||
[Amazon Link](https://amzn.eu/d/06A0DLb)
|
[Amazon Link](https://amzn.to/4ja1KTe)
|
||||||
- **OLED 0.96 Zoll I2C white/yellow Display:** 128x64 SSD1306.
|
- **OLED 0.96 Zoll I2C white/yellow Display:** 128x64 SSD1306.
|
||||||
[Amazon Link](https://amzn.eu/d/0AuBp2c)
|
[Amazon Link](https://amzn.to/445aaa9)
|
||||||
- **PN532 NFC NXP RFID-Modul V3:** For NFC tag operations.
|
- **PN532 NFC NXP RFID-Modul V3:** For NFC tag operations.
|
||||||
[Amazon Link](https://amzn.eu/d/jfIuQXb)
|
[Amazon Link](https://amzn.to/4iO6CO4)
|
||||||
- **NFC Tags NTAG213 NTAG215:** RFID Tag
|
- **NFC Tags NTAG213 NTAG215:** RFID Tag
|
||||||
[Amazon Link](https://amzn.eu/d/9Z6mXc1)
|
[Amazon Link](https://amzn.to/3E071xO)
|
||||||
|
- **TTP223 Touch Sensor (optional):** For reTARE per Button/Touch
|
||||||
|
[Amazon Link](https://amzn.to/4hTChMK)
|
||||||
|
|
||||||
|
|
||||||
### Pin Configuration
|
### Pin Configuration
|
||||||
@ -82,8 +84,10 @@ Discord Server: [https://discord.gg/my7Gvaxj2v](https://discord.gg/my7Gvaxj2v)
|
|||||||
| PN532 RESET | 33 |
|
| PN532 RESET | 33 |
|
||||||
| PN532 SDA | 21 |
|
| PN532 SDA | 21 |
|
||||||
| PN532 SCL | 22 |
|
| PN532 SCL | 22 |
|
||||||
|
| TTP223 I/O | 25 |
|
||||||
|
|
||||||
**Make sure that the DIP switches on the PN532 are set to I2C**
|
**!! Make sure that the DIP switches on the PN532 are set to I2C**
|
||||||
|
**Use the 3V pin from the ESP for the touch sensor**
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ uint16_t defaultScaleCalibrationValue = 430;
|
|||||||
|
|
||||||
// ***** TTP223 (Touch Sensor)
|
// ***** TTP223 (Touch Sensor)
|
||||||
// TTP223 circuit wiring
|
// TTP223 circuit wiring
|
||||||
const uint8_t TTP223_PIN = 15;
|
const uint8_t TTP223_PIN = 25;
|
||||||
// ***** TTP223
|
// ***** TTP223
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ void loop() {
|
|||||||
unsigned long currentMillis = millis();
|
unsigned long currentMillis = millis();
|
||||||
|
|
||||||
// Überprüfe den Status des Touch Sensors
|
// Überprüfe den Status des Touch Sensors
|
||||||
if (digitalRead(TTP223_PIN) == LOW && currentMillis - lastButtonPress > debounceDelay)
|
if (digitalRead(TTP223_PIN) == HIGH && currentMillis - lastButtonPress > debounceDelay)
|
||||||
{
|
{
|
||||||
lastButtonPress = currentMillis;
|
lastButtonPress = currentMillis;
|
||||||
scaleTareRequest = true;
|
scaleTareRequest = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user