STM32F103C8T6_WIFI_Heating_system
Dependencies: mbed mbed-STM32F103C8T6 eeprom_flash Watchdog PinDetect DS1820
- Bluepill STM32F103C8T6 Heating system
- _This project is core part of bigger heating system project!_
Features
- Reading temperature from four DS18B20 sensors
- Making a decision about switching on/off heater and pomp
- Executing simple user commands from UART
- Storing state parameters to program memory (EEPROM emulation)
Diff: main.cpp
- Revision:
- 41:978c2d85a0e7
- Parent:
- 39:aa5f95061409
- Child:
- 42:03cbc2a6f63b
--- a/main.cpp Fri Sep 21 17:57:02 2018 +0000 +++ b/main.cpp Fri Sep 21 19:23:45 2018 +0000 @@ -16,6 +16,7 @@ Watchdog wd; unsigned int eeprom_config_value; +extern char working_mode; Serial pc(PA_2, PA_3); // (TX, RX) Pin definition char a[128] = ""; // RX command buffer @@ -55,7 +56,11 @@ //writeEEPROMWord(0, 666 ); //epprom_config_value++; - pc.printf("Button pressed\r\n"); + working_mode ++; + if (working_mode == 6) working_mode=0; + + pc.printf("working_mode %d \r\n", working_mode); + //pc.printf("Button pressed \r\n"); }; void pb_out_interrupt (void) { @@ -137,7 +142,7 @@ queue.call( start_temp ); queue.call_every(100, at_command); queue.call_every(2000, check_temp); - queue.call_every(3000, process_temp); + queue.call_every(500, process_temp); // Start queue queue.dispatch();