Fixed LED colors

This commit is contained in:
-help 2024-01-26 19:09:12 +02:00
parent 6c8a12c87a
commit 84c246d3d7
3 changed files with 18 additions and 6 deletions

View File

@ -0,0 +1,11 @@
{
"folders": [
{
"name": "Solder Plate",
"path": ".."
}
],
"settings": {
"CodeGPT.apiKey": "CodeGPT Plus Beta"
}
}

View File

@ -28,9 +28,9 @@ void LEDS::handleButtonStateChange(Pair<ButtonKind, StateChangeEvent<ButtonState
break;
case ButtonKind::DOWN:
if (change.second.to == ButtonState::PRESSED) {
digitalWrite(greenLED, HIGH);
} else {
digitalWrite(greenLED, LOW);
digitalWrite(yellowLED, HIGH);
} else if (!yellowLEDUPOn) {
digitalWrite(yellowLED, LOW);
}
break;
case ButtonKind::BACK:
@ -42,9 +42,9 @@ void LEDS::handleButtonStateChange(Pair<ButtonKind, StateChangeEvent<ButtonState
break;
case ButtonKind::SELECT:
if (change.second.to == ButtonState::PRESSED) {
digitalWrite(yellowLED, HIGH);
} else if (!yellowLEDUPOn) {
digitalWrite(yellowLED, LOW);
analogWrite(greenLED, 30);
} else {
digitalWrite(greenLED, LOW);
}
yellowLEDSeleOn = change.second.to == ButtonState::PRESSED;

View File

@ -33,6 +33,7 @@ int Thermistor::getTemperature()
int temp = 0;
uint8_t samples = 5;
for (int i = 0; i < samples; i++)
{
getResistance();