Skip to content
Snippets Groups Projects
Commit 03d2621a authored by 3d's avatar 3d
Browse files

update popcorn maker

parent ea205faa
No related branches found
No related tags found
No related merge requests found
Subproject commit e8a049414bca2b14b158444dac1b94c2ca90d9be Subproject commit 900377e4f72486f6699ecf736f96adfbc04e92da
...@@ -13,9 +13,18 @@ ...@@ -13,9 +13,18 @@
spi: spi:
miso_pin: GPIO19 - mosi_pin: GPIO23
mosi_pin: GPIO23 clk_pin: GPIO18
clk_pin: GPIO18 id: spi_display
- miso_pin: GPIO13
clk_pin: GPIO14
id: spi_temp
i2c:
sda: GPIO1
scl: GPIO22
scan: True
climate: climate:
- platform: pid - platform: pid
...@@ -25,9 +34,9 @@ climate: ...@@ -25,9 +34,9 @@ climate:
default_target_temperature: 264 default_target_temperature: 264
heat_output: pot_heater heat_output: pot_heater
control_parameters: control_parameters:
kp: 0.0 kp: 0.49460
ki: 0.0 ki: 0.00487
kd: 0.0 kd: 12.56301
visual: visual:
min_temperature: 0 min_temperature: 0
max_temperature: 275 max_temperature: 275
...@@ -40,11 +49,12 @@ button: ...@@ -40,11 +49,12 @@ button:
- climate.pid.autotune: pid_heater - climate.pid.autotune: pid_heater
sensor: sensor:
- platform: max31855 - platform: max6675
name: "Pot Temperature" name: "Pot Temperature"
spi_id: spi_temp
cs_pin: GPIO27
id: pot_sensor id: pot_sensor
cs_pin: GPIO15 update_interval: 1s
update_interval: 30s
- platform: pid - platform: pid
name: "PID Heater Result" name: "PID Heater Result"
type: RESULT type: RESULT
...@@ -60,14 +70,44 @@ sensor: ...@@ -60,14 +70,44 @@ sensor:
- platform: pid - platform: pid
name: "PID HEAT Result" name: "PID HEAT Result"
type: HEAT type: HEAT
- platform: bme280
temperature:
name: "Temp"
oversampling: 16x
filters:
- sliding_window_moving_average:
window_size: 3
send_every: 3
send_first_at: 3
pressure:
name: "Pressure"
oversampling: 16x
accuracy_decimals: 2
filters:
- sliding_window_moving_average:
window_size: 3
send_every: 3
send_first_at: 3
humidity:
name: "Humidity"
oversampling: 16x
accuracy_decimals: 2
filters:
- sliding_window_moving_average:
window_size: 3
send_every: 3
send_first_at: 3
address: 0x76
update_interval: 5s
iir_filter: 16x
output: output:
- platform: slow_pwm - platform: slow_pwm
pin: GPIO0 pin: GPIO33
id: pot_heater id: pot_heater
period: 15s period: 15s
- platform: ledc - platform: ledc
pin: GPIO4 pin: GPIO3
id: gpio_4_backlight_pwm id: gpio_4_backlight_pwm
binary_sensor: binary_sensor:
...@@ -121,21 +161,25 @@ color: ...@@ -121,21 +161,25 @@ color:
display: display:
- platform: ili9341 - platform: ili9341
model: TFT 2.4 model: TFT 2.4
spi_id: spi_display
cs_pin: GPIO5 cs_pin: GPIO5
dc_pin: GPIO16 dc_pin: GPIO16
reset_pin: GPIO17 reset_pin: GPIO17
rotation: 90° rotation: 90°
lambda: |- lambda: |-
it.printf(160,120,id(temp),TextAlign::CENTER,"%.1f°C",id(pid_heater).current_temperature); it.printf(160,120,id(temp),TextAlign::CENTER,"%.0f°C",id(pid_heater).current_temperature);
if ((id(pid_heater).action) == 0) { if ((id(pid_heater).action) == 0) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: OFF"); it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: OFF");
} }
else if ((id(pid_heater).action) == 3) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: HEATING");
}
else if ((id(pid_heater).action) == 4) { else if ((id(pid_heater).action) == 4) {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: IDLE"); it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: IDLE");
} }
else { else {
it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: ERROR"); it.printf(0,10,id(text),TextAlign::TOP_LEFT,"PID: ERROR %d",id(pid_heater).action);
}; };
it.printf(0,230,id(text),TextAlign::BOTTOM_LEFT,"Target: %.1f°C",id(pid_heater).target_temperature); it.printf(0,230,id(text),TextAlign::BOTTOM_LEFT,"Target: %.1f°C",id(pid_heater).target_temperature);
...@@ -150,19 +194,46 @@ light: ...@@ -150,19 +194,46 @@ light:
name: "ILI9341 Display Backlight" name: "ILI9341 Display Backlight"
id: back_light id: back_light
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
- platform: fastled_spi
rgb_order: BRG
chipset: WS2801
id: status_led
clock_pin: GPIO25
data_pin: GPIO26
num_leds: 3
name: "NeoPixel Light"
effects:
- addressable_scan:
- addressable_scan:
name: Scan Effect With Custom Values
move_interval: 500ms
scan_width: 1
- pulse:
- pulse:
name: "Fast Pulse"
transition_length: 0.5s
update_interval: 0.5s
- pulse:
name: "Slow Pulse"
# transition_length: 1s # defaults to 1s
update_interval: 2s
text_sensor: text_sensor:
- platform: template - platform: template
name: "PID State" name: "PID State"
id: pid_state id: pid_state
internal: True
lambda: |- lambda: |-
if ((id(pid_heater).action) == 0) { if ((id(pid_heater).action) == 0) {
return {"OFF"}; return {"OFF"};
} }
else if ((id(pid_heater).action) == 3) {
return {"HEATING"};
}
else if ((id(pid_heater).action) == 4) { else if ((id(pid_heater).action) == 4) {
return {"IDLE"}; return {"IDLE"};
} }
else { else {
return {"NaN"}; return {"ERROR see Display"};
} }
update_interval: 5s update_interval: 5s
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment