mirror of
https://github.com/arwidcool/Solder-Plate.git
synced 2024-11-12 01:10:52 +01:00
Fixed LED colors
This commit is contained in:
parent
6c8a12c87a
commit
84c246d3d7
11
src/Solder Plate.code-workspace
Normal file
11
src/Solder Plate.code-workspace
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"name": "Solder Plate",
|
||||
"path": ".."
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"CodeGPT.apiKey": "CodeGPT Plus Beta"
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
|
@ -33,6 +33,7 @@ int Thermistor::getTemperature()
|
||||
int temp = 0;
|
||||
|
||||
uint8_t samples = 5;
|
||||
|
||||
for (int i = 0; i < samples; i++)
|
||||
{
|
||||
getResistance();
|
||||
|
Loading…
Reference in New Issue
Block a user