STM32F103C8T6_WIFI_Heating_system

Dependencies:   mbed mbed-STM32F103C8T6 eeprom_flash Watchdog PinDetect DS1820

  1. Bluepill STM32F103C8T6 Heating system
    1. _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)

Revision:
23:33d6689834c6
Parent:
22:32beca745706
Child:
24:4c5909becda6
--- a/main.cpp	Thu Sep 13 18:19:14 2018 +0000
+++ b/main.cpp	Sat Sep 15 19:42:24 2018 +0000
@@ -8,6 +8,8 @@
 static char recieved = 0;
 
 Serial  pc(PA_2, PA_3);
+DigitalOut  myled(LED1);
+DigitalIn   pb(PA_11);
 
 // This function is called when a character goes into the RX buffer.
 void rxCallback() {
@@ -30,12 +32,17 @@
     };
 };
  
+ 
+void pb_hit_interrupt (void) {
+    pc.printf("Button pressed\r\n"); 
+}; 
   
 int main() {
         
     confSysClock();     //Configure system clock (72MHz HSE clock, 48MHz USB clock)
     
-    DigitalOut  myled(LED1);
+    pb.mode(PullUp);
+    pb.fall(&pb_hit_interrupt);
     
     float temp[5] = {
                     85,85,85,85,85  // initial temperature