Compare commits
4 Commits
3c294a135f
...
v1.4.12
Author | SHA1 | Date | |
---|---|---|---|
7b18266534 | |||
d81acb2b61 | |||
8c7fc159d3 | |||
476d3e82e2 |
@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.4.12] - 2025-03-30
|
||||||
|
### Added
|
||||||
|
- add touch sensor connection check and update logic
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update platformio.ini for version v1.4.12
|
||||||
|
- update README files to clarify PN532 DIP switch settings
|
||||||
|
|
||||||
|
|
||||||
## [1.4.11] - 2025-03-30
|
## [1.4.11] - 2025-03-30
|
||||||
### Added
|
### Added
|
||||||
- Renamed states of NFC state machine and introduced new state machine for spoolman API
|
- Renamed states of NFC state machine and introduced new state machine for spoolman API
|
||||||
|
@ -82,7 +82,7 @@ Discord Server: [https://discord.gg/my7Gvaxj2v](https://discord.gg/my7Gvaxj2v)
|
|||||||
| PN532 SCL | 22 |
|
| PN532 SCL | 22 |
|
||||||
| TTP223 I/O | 25 |
|
| 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**
|
**Nutze den 3V Pin vom ESP für den Touch Sensor**
|
||||||
|
|
||||||

|

|
||||||
|
@ -86,7 +86,7 @@ Discord Server: [https://discord.gg/my7Gvaxj2v](https://discord.gg/my7Gvaxj2v)
|
|||||||
| PN532 SCL | 22 |
|
| PN532 SCL | 22 |
|
||||||
| TTP223 I/O | 25 |
|
| 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**
|
**Use the 3V pin from the ESP for the touch sensor**
|
||||||
|
|
||||||

|

|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "1.4.11"
|
version = "1.4.12"
|
||||||
to_old_version = "1.4.0"
|
to_old_version = "1.4.0"
|
||||||
|
|
||||||
##
|
##
|
||||||
|
13
src/main.cpp
13
src/main.cpp
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
bool mainTaskWasPaused = 0;
|
bool mainTaskWasPaused = 0;
|
||||||
uint8_t scaleTareCounter = 0;
|
uint8_t scaleTareCounter = 0;
|
||||||
|
bool touchSensorConnected = false;
|
||||||
|
|
||||||
// ##### SETUP #####
|
// ##### SETUP #####
|
||||||
void setup() {
|
void setup() {
|
||||||
@ -59,6 +60,16 @@ void setup() {
|
|||||||
|
|
||||||
// Touch Sensor
|
// Touch Sensor
|
||||||
pinMode(TTP223_PIN, INPUT_PULLUP);
|
pinMode(TTP223_PIN, INPUT_PULLUP);
|
||||||
|
if (digitalRead(TTP223_PIN) == HIGH)
|
||||||
|
{
|
||||||
|
Serial.println("Touch Sensor is not connected");
|
||||||
|
touchSensorConnected = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Serial.println("Touch Sensor is connected");
|
||||||
|
touchSensorConnected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -100,7 +111,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) == HIGH && currentMillis - lastButtonPress > debounceDelay)
|
if (touchSensorConnected && digitalRead(TTP223_PIN) == HIGH && currentMillis - lastButtonPress > debounceDelay)
|
||||||
{
|
{
|
||||||
lastButtonPress = currentMillis;
|
lastButtonPress = currentMillis;
|
||||||
scaleTareRequest = true;
|
scaleTareRequest = true;
|
||||||
|
Reference in New Issue
Block a user