#include #include #include #include #include #define OLED_RESET 12 Adafruit_SSD1306 display(OLED_RESET); #define LED_PIN PB8 #define BRIGHTNESS 255 #define LED_TYPE WS2812 #define COLOR_ORDER GRB #define screeny 10 CRGB leds[screeny]; CRGBPalette16 currentPalette; TBlendType currentBlending; #define UPDATES_PER_SECOND 5000 extern CRGBPalette16 myRedWhiteBluePalette; #define heiza PB1 #define heizb PB10 #define pump PB11 #define vdampf PA8 #define vcafe PB15 #define mahl PB14 #define aufzugan PB13 #define aufzugreverse PB12 #define wasserda PB4 #define aufzugoben PA5 //PA3 #define schubladeda PA4 #define aufzugunten PB5 //PA5 #define aufzugmitte PA12 #define factory PA15 #define tempa PA0 #define tempb PA1 #define durchlauf PA2 #define tlinks PA6 #define tmitte PA7 #define trechts PB0 const unsigned char PROGMEM tasse [] = // width 42px height 35 { 0x07, 0xFF, 0xFF, 0x00, 0x00, 0x00, // ################### 0x0F, 0xFF, 0xFF, 0xC0, 0x00, 0x00, // ###################### 0x7C, 0x00, 0x00, 0xF0, 0x00, 0x00, // ##### #### 0x78, 0x00, 0x00, 0x78, 0x00, 0x00, // #### #### 0x7E, 0x00, 0x00, 0x79, 0xF8, 0x00, // ###### #### ###### 0x67, 0xFF, 0xFF, 0xFB, 0xFE, 0x00, // ## ######################## ######### 0x61, 0xFF, 0xFF, 0xEF, 0xFE, 0x00, // ## #################### ########### 0xE0, 0x00, 0x00, 0x0F, 0x0E, 0x80, // ### #### ### # 0xE5, 0x00, 0x00, 0x0E, 0x07, 0x80, // ### # # ### #### 0xEA, 0x80, 0x00, 0x0C, 0x03, 0x80, // ### # # # ## ### 0xE8, 0x80, 0x00, 0x0C, 0x01, 0xC0, // ### # # ## ### 0xE5, 0x00, 0x00, 0x0C, 0x01, 0xC0, // ### # # ## ### 0xE2, 0x00, 0x00, 0x0C, 0x00, 0xC0, // ### # ## ## 0xE0, 0x70, 0x06, 0x0C, 0x00, 0xC0, // ### ### ## ## ## 0xE0, 0xF8, 0x0F, 0x0C, 0x00, 0xC0, // ### ##### #### ## ## 0xE1, 0x9C, 0x0D, 0x8C, 0x00, 0xC0, // ### ## ### ## ## ## ## 0xE1, 0x84, 0x08, 0x8C, 0x00, 0xC0, // ### ## # # # ## ## 0xE1, 0x00, 0x00, 0x0C, 0x00, 0xC0, // ### # ## ## 0xE0, 0x31, 0xC0, 0x0C, 0x00, 0xC0, // ### ## ### ## ## 0xE0, 0x08, 0x8E, 0x0E, 0x01, 0xC0, // ### # # ### ### ### 0xE0, 0x30, 0x04, 0x0D, 0x01, 0xC0, // ### ## # ## # ### 0xE0, 0x40, 0x02, 0x0F, 0xFF, 0x80, // ### # # ############# 0xE0, 0x01, 0x80, 0x0F, 0xFE, 0x00, // ### ## ########### 0xE0, 0x19, 0x90, 0x0D, 0xF8, 0x00, // ### ## ## # ## ###### 0xE0, 0x0E, 0x60, 0x0C, 0x00, 0x00, // ### ### ## ## 0xE0, 0x00, 0x00, 0x0C, 0x00, 0x00, // ### ## 0x70, 0x00, 0x00, 0x1C, 0x00, 0x00, // ### ### 0x78, 0x00, 0x00, 0x18, 0x00, 0x00, // #### ## 0x78, 0x00, 0x00, 0x1C, 0x00, 0x00, // #### ### 0x2C, 0x00, 0x00, 0x3C, 0x00, 0x00, // # ## #### 0x1E, 0x00, 0x00, 0x78, 0x00, 0x00, // #### #### 0x0F, 0x80, 0x00, 0xE8, 0x00, 0x00, // ##### ### # 0x07, 0xFF, 0xFF, 0xF0, 0x00, 0x00, // ####################### 0x01, 0xFF, 0xFF, 0xE0, 0x00, 0x00, // #################### 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, // ################## }; const unsigned char PROGMEM ex4 [] = // width 56px height 26 { 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, // # # # 0x00, 0x0C, 0x00, 0x10, 0x00, 0x60, 0x00, // ## # ## 0x00, 0x0A, 0x00, 0x28, 0x00, 0xC0, 0x00, // # # # # ## 0x00, 0x05, 0x00, 0x28, 0x01, 0x40, 0x00, // # # # # # # 0x00, 0x04, 0x80, 0x24, 0x02, 0x40, 0x00, // # # # # # # 0x00, 0x02, 0x40, 0x44, 0x04, 0x80, 0x00, // # # # # # # 0x00, 0x02, 0x30, 0x42, 0x04, 0x80, 0x00, // # ## # # # # 0x00, 0x02, 0x08, 0x42, 0x08, 0x80, 0x00, // # # # # # # 0x00, 0x01, 0x04, 0x41, 0x11, 0x00, 0x00, // # # # # # # 0x00, 0x01, 0x02, 0x81, 0x21, 0x00, 0x00, // # # # # # # 0x00, 0x01, 0x01, 0x80, 0xC2, 0x00, 0x03, // # ## ## # ## 0x00, 0x00, 0x80, 0x80, 0x82, 0x00, 0x1E, // # # # # #### 0xC0, 0x00, 0x80, 0x40, 0x82, 0x00, 0x6C, // ## # # # # ## ## 0x7C, 0x00, 0x80, 0x40, 0x84, 0x03, 0x90, // ##### # # # # ### # 0x33, 0xC0, 0x40, 0x00, 0x04, 0x1C, 0x20, // ## #### # # ### # 0x08, 0x38, 0x40, 0x00, 0x04, 0x60, 0x40, // # ### # # ## # 0x04, 0x07, 0xA0, 0x00, 0x0B, 0x80, 0x80, // # #### # # ### # 0x03, 0x00, 0x70, 0x00, 0x0C, 0x03, 0x00, // ## ### ## ## 0x00, 0x80, 0x0C, 0x00, 0x18, 0x04, 0x00, // # ## ## # 0x00, 0x40, 0x00, 0x00, 0x30, 0x08, 0x00, // # ## # 0x00, 0x30, 0x00, 0x00, 0x00, 0x10, 0x00, // ## # 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // # # 0x00, 0x04, 0x00, 0x00, 0x00, 0xC0, 0x00, // # ## 0x00, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, // ## # 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00, // # # 0x00, 0x00, 0x7F, 0xFF, 0xFE, 0x00, 0x00, // ###################### }; const unsigned char PROGMEM ex3 [] = // width 56px height 25 { 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, // # # # 0x00, 0x0C, 0x00, 0x10, 0x00, 0x60, 0x00, // ## # ## 0x00, 0x0E, 0x00, 0x38, 0x00, 0xC0, 0x00, // ### ### ## 0x00, 0x07, 0x00, 0x38, 0x01, 0xC0, 0x00, // ### ### ### 0x00, 0x07, 0x80, 0x3C, 0x03, 0xC0, 0x00, // #### #### #### 0x00, 0x03, 0xC0, 0x7C, 0x07, 0x80, 0x00, // #### ##### #### 0x00, 0x03, 0xF0, 0x7E, 0x07, 0x80, 0x00, // ###### ###### #### 0x00, 0x03, 0xF8, 0x7E, 0x0F, 0x80, 0x00, // ####### ###### ##### 0x00, 0x01, 0xFC, 0x7F, 0x1F, 0x00, 0x00, // ####### ####### ##### 0x00, 0x01, 0xFE, 0xFF, 0x3F, 0x00, 0x00, // ######## ######## ###### 0x00, 0x01, 0xFF, 0xFF, 0xFE, 0x00, 0x03, // ######################## ## 0x00, 0x00, 0xFF, 0xFF, 0xFE, 0x00, 0x1E, // ####################### #### 0xC0, 0x00, 0xFF, 0xFF, 0xFE, 0x00, 0x7C, // ## ####################### ##### 0x7C, 0x00, 0xFF, 0xFF, 0xFC, 0x03, 0xF0, // ##### ###################### ###### 0x3F, 0xC0, 0x7F, 0xFF, 0xFC, 0x1F, 0xE0, // ######## ##################### ######## 0x0F, 0xF8, 0x7F, 0xFF, 0xFC, 0x7F, 0xC0, // ######### ##################### ######### 0x07, 0xFF, 0xBF, 0xFF, 0xFB, 0xFF, 0x80, // ############ ################### ########### 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // ########################################## 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, // ###################################### 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xF8, 0x00, // #################################### 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, // ################################## 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, // ############################### 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, // ############################# 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0x00, 0x00, // ########################## 0x00, 0x00, 0xFF, 0xFF, 0xFE, 0x00, 0x00, // ####################### 0x00, 0x00, 0x7F, 0xFF, 0xFE, 0x00, 0x00, // ###################### }; const unsigned char PROGMEM ex2 [] = // width 35px height 17 { 0x01, 0x00, 0x40, 0x20, 0x00, // # # # 0x01, 0x80, 0x40, 0x60, 0x00, // ## # ## 0x00, 0xC0, 0x40, 0xA0, 0x00, // ## # # # 0x00, 0xA0, 0xE1, 0xA0, 0x00, // # # ### ## # 0x00, 0xD0, 0xB3, 0x60, 0x00, // ## # # ## ## ## 0x00, 0x59, 0x96, 0x40, 0x00, // # ## ## # ## # 0x00, 0x4D, 0x1C, 0xC0, 0x00, // # ## # ### ## 0x80, 0x63, 0x0C, 0x81, 0xE0, // # ## ## ## # #### 0xE0, 0x61, 0x09, 0x8F, 0x80, // ### ## # # ## ##### 0x7E, 0x20, 0x01, 0xFB, 0x00, // ###### # ###### ## 0x33, 0x30, 0x01, 0x86, 0x00, // ## ## ## ## ## 0x19, 0xF8, 0x03, 0x0C, 0x00, // ## ###### ## ## 0x0C, 0x18, 0x06, 0x18, 0x00, // ## ## ## ## 0x06, 0x00, 0x00, 0x10, 0x00, // ## # 0x03, 0x00, 0x00, 0x70, 0x00, // ## ### 0x01, 0xC0, 0x00, 0xC0, 0x00, // ### ## 0x00, 0x7F, 0xFF, 0x80, 0x00, // ################ }; const unsigned char PROGMEM ex1 [] = // width 35px height 17 { 0x01, 0x00, 0x40, 0x38, 0x00, // # # ### 0x01, 0x80, 0x40, 0x70, 0x00, // ## # ### 0x00, 0xC0, 0x40, 0xF0, 0x00, // ## # #### 0x00, 0xE0, 0xE1, 0xE0, 0x00, // ### ### #### 0x00, 0xF0, 0xF3, 0xE0, 0x00, // #### #### ##### 0x00, 0x79, 0xF7, 0xC0, 0x00, // #### ##### ##### 0x00, 0x7D, 0xFF, 0xC0, 0x00, // ##### ########### 0x80, 0x7F, 0xFF, 0x81, 0xE0, // # ################ #### 0xE0, 0x7F, 0xFF, 0x8F, 0x80, // ### ################ ##### 0x7E, 0x3F, 0xFF, 0xFF, 0x00, // ###### ###################### 0x3F, 0x3F, 0xFF, 0xFE, 0x00, // ###### ##################### 0x1F, 0xFF, 0xFF, 0xFC, 0x00, // ########################### 0x0F, 0xFF, 0xFF, 0xF8, 0x00, // ######################### 0x07, 0xFF, 0xFF, 0xF0, 0x00, // ####################### 0x03, 0xFF, 0xFF, 0xE0, 0x00, // ##################### 0x01, 0xFF, 0xFF, 0xC0, 0x00, // ################### 0x00, 0x7F, 0xFF, 0x80, 0x00, // ################ }; const unsigned char PROGMEM dampf1 [] = // width 33px height 21 { 0x00, 0x00, 0x0C, 0x00, 0x00, // ## 0x00, 0x40, 0x06, 0x00, 0x00, // # ## 0x00, 0x20, 0x02, 0x00, 0x00, // # # 0x00, 0x30, 0x01, 0x00, 0x00, // ## # 0x00, 0x10, 0x01, 0x80, 0x00, // # ## 0x00, 0x18, 0x00, 0x80, 0x00, // ## # 0x00, 0x08, 0x01, 0x80, 0x00, // # ## 0x04, 0x08, 0x01, 0x00, 0x00, // # # # 0x00, 0x18, 0x03, 0x00, 0x00, // ## ## 0x00, 0x30, 0x06, 0x10, 0x00, // ## ## # 0x80, 0x20, 0x04, 0x00, 0x00, // # # # 0x40, 0x60, 0x0C, 0x00, 0x00, // # ## ## 0x40, 0xC0, 0x08, 0x00, 0x80, // # ## # # 0x20, 0x81, 0x08, 0x01, 0x00, // # # # # # 0x10, 0x80, 0x0C, 0x02, 0x00, // # # ## # 0x08, 0xC0, 0x04, 0x04, 0x00, // # ## # # 0x00, 0x60, 0x03, 0x08, 0x00, // ## ## # 0x00, 0x30, 0x01, 0x00, 0x00, // ## # 0x00, 0x18, 0x40, 0x00, 0x00, // ## # 0x00, 0x00, 0x00, 0x80, 0x00, // # 0x00, 0x40, 0x00, 0x00, 0x00, // # }; const unsigned char PROGMEM dampf2 [] = // width 35px height 21 { 0x00, 0x00, 0x00, 0x80, 0x00, // # 0x00, 0x08, 0x00, 0xC0, 0x00, // # ## 0x00, 0x0C, 0x00, 0x40, 0x00, // ## # 0x00, 0x04, 0x00, 0xC0, 0x00, // # ## 0x00, 0x04, 0x00, 0x80, 0x00, // # # 0x08, 0x0C, 0x01, 0x80, 0x00, // # ## ## 0x00, 0x18, 0x03, 0x02, 0x00, // ## ## # 0x00, 0x10, 0x02, 0x00, 0x00, // # # 0x00, 0x30, 0x06, 0x00, 0x00, // ## ## 0x00, 0x60, 0x04, 0x00, 0x00, // ## # 0x80, 0x40, 0x84, 0x00, 0x00, // # # # # 0xE0, 0x40, 0x06, 0x00, 0x20, // ### # ## # 0x20, 0x60, 0x02, 0x00, 0x60, // # ## # ## 0x18, 0x30, 0x01, 0x80, 0xC0, // ## ## ## ## 0x00, 0x18, 0x00, 0xC1, 0x80, // ## ## ## 0x00, 0x0C, 0x00, 0x20, 0x00, // ## # 0x00, 0x02, 0x00, 0x60, 0x00, // # ## 0x00, 0x42, 0x04, 0x40, 0x00, // # # # # 0x00, 0x06, 0x00, 0x08, 0x00, // ## # }; const unsigned char PROGMEM dampf3 [] = // width 40px height 17 { 0x00, 0x00, 0x00, 0x10, 0x00, // # 0x00, 0x01, 0x80, 0x30, 0x00, // ## ## 0x02, 0x03, 0x00, 0x60, 0x00, // # ## ## 0x00, 0x02, 0x00, 0x40, 0x10, // # # # 0x00, 0x06, 0x00, 0xC0, 0x00, // ## ## 0x10, 0x0C, 0x00, 0x80, 0x00, // # ## # 0x10, 0x08, 0x08, 0x80, 0x00, // # # # # 0x00, 0x08, 0x00, 0xC0, 0x21, // # ## # # 0xC6, 0x0C, 0x00, 0x40, 0x12, // ## ## ## # # # 0x00, 0x06, 0x00, 0x38, 0x00, // ## ### 0x10, 0x03, 0x00, 0x1C, 0x12, // # ## ### # # 0x10, 0x01, 0xC0, 0x06, 0x21, // # ### ## # # 0x00, 0x00, 0x40, 0x02, 0x00, // # # 0x00, 0x10, 0x40, 0x06, 0x00, // # # ## 0x00, 0x00, 0x40, 0x8C, 0x00, // # # ## 0x00, 0x00, 0xC0, 0x08, 0x00, // ## # 0x00, 0x01, 0x80, 0x08, 0x00, // ## # 0x00, 0x02, 0x00, 0x00, 0x20, // # # }; const unsigned char PROGMEM dampf4 [] = // width 42px height 18 { 0x00, 0x01, 0x80, 0x30, 0x00, 0x00, // ## ## 0x01, 0x01, 0x00, 0x20, 0x00, 0x00, // # # # 0x00, 0x03, 0x00, 0x60, 0x02, 0x00, // ## ## # 0x00, 0x06, 0x00, 0x40, 0x00, 0x00, // ## # 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, // # # 0x08, 0x04, 0x04, 0x60, 0x00, 0x00, // # # # ## 0x00, 0x06, 0x00, 0x20, 0x00, 0x00, // ## # 0x00, 0x03, 0x00, 0x18, 0x30, 0xC0, // ## ## ## ## 0x00, 0x01, 0x80, 0x0E, 0x20, 0x40, // ## ### # # 0x80, 0x80, 0xE0, 0x03, 0x00, 0x00, // # # ### ## 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, // # ## 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, // # ## 0x00, 0x10, 0x60, 0x4C, 0x20, 0x40, // # ## # ## # # 0x08, 0x00, 0xC0, 0x08, 0x30, 0xC0, // # ## # ## ## 0x00, 0x03, 0x00, 0x18, 0x00, 0x00, // ## ## 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ## ## 0x00, 0x06, 0x00, 0x0C, 0x04, 0x00, // ## ## # 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, // # }; const unsigned char PROGMEM milch [] = // width 16px height 25 { 0x1F, 0xF0, // ######### 0x10, 0x18, // # ## 0x1F, 0xFC, // ########### 0x22, 0x17, // # # # ### 0x45, 0x15, // # # # # # # 0x82, 0x29, // # # # # # 0xFF, 0xF1, // ############ # 0x80, 0x21, // # # # 0x80, 0x21, // # # # 0x80, 0x21, // # # # 0x80, 0x21, // # # # 0x80, 0x21, // # # # 0xA0, 0xA1, // # # # # # 0xB1, 0xA1, // # ## ## # # 0xAA, 0xA1, // # # # # # # # 0xA4, 0xA1, // # # # # # # 0xA0, 0xA1, // # # # # # 0xA0, 0xA1, // # # # # # 0xA0, 0xA1, // # # # # # 0x80, 0x21, // # # # 0x80, 0x22, // # # # 0x80, 0x24, // # # # 0x80, 0x28, // # # # 0x80, 0x30, // # ## 0xFF, 0xE0, // ########### }; const unsigned char PROGMEM bohne [] = // width 25px height 19 { 0x00, 0x07, 0xE0, 0x00, // ###### 0x00, 0x7C, 0x38, 0x00, // ##### ### 0x01, 0xC0, 0x0C, 0x00, // ### ## 0x07, 0x00, 0xFC, 0x00, // ### ###### 0x0C, 0x03, 0xFF, 0x00, // ## ########## 0x18, 0x03, 0xE1, 0x80, // ## ##### ## 0x30, 0x07, 0x00, 0x80, // ## ### # 0x60, 0x07, 0x00, 0x80, // ## ### # 0x40, 0x0F, 0x01, 0x80, // # #### ## 0xC0, 0x7E, 0x01, 0x80, // ## ###### ## 0x80, 0xF8, 0x01, 0x00, // # ##### # 0x83, 0xC0, 0x03, 0x00, // # #### ## 0x80, 0x00, 0x06, 0x00, // # ## 0x80, 0x00, 0x0C, 0x00, // # ## 0xC0, 0x00, 0x18, 0x00, // ## ## 0x60, 0x00, 0x70, 0x00, // ## ### 0x78, 0x01, 0xC0, 0x00, // #### ### 0x1F, 0xFF, 0x00, 0x00, // ############# 0x01, 0xF8, 0x00, 0x00, // ###### }; const unsigned char PROGMEM oks [] = // width 38px height 7 { 0x08, 0x20, 0x00, 0x87, 0x12, // # # # ### # # 0x14, 0x50, 0x01, 0x88, 0x94, // # # # # ## # # # # 0x00, 0x00, 0x23, 0x08, 0x98, // # ## # # ## 0xC1, 0x06, 0x36, 0x08, 0x94, // ## # ## ## ## # # # # 0x20, 0x08, 0x1C, 0x07, 0x12, // # # ### ### # # 0xC5, 0x46, 0x18, 0x00, 0x00, // ## # # # ## ## 0x02, 0x80, 0x00, 0x00, 0x00, // # # }; const unsigned char PROGMEM wasser [] = // width 30px height 37 { 0x00, 0xFF, 0xC0, 0x00, // ########## 0x00, 0xFF, 0xC0, 0x00, // ########## 0x00, 0xDE, 0xC0, 0x00, // ## #### ## 0x00, 0x0C, 0x00, 0x00, // ## 0x00, 0x0C, 0x00, 0x00, // ## 0x00, 0x7F, 0x80, 0x00, // ######## 0x3F, 0xFF, 0xFC, 0x00, // #################### 0x50, 0xFF, 0xC7, 0x00, // # # ########## ### 0x88, 0x3F, 0x01, 0x80, // # # ###### ## 0x88, 0x00, 0x00, 0xC0, // # # ## 0x88, 0x00, 0x00, 0x60, // # # ## 0x50, 0x00, 0x00, 0x30, // # # ## 0x3F, 0xFF, 0xE0, 0x10, // ################# # 0x00, 0x00, 0x30, 0x18, // ## ## 0x00, 0x00, 0x18, 0x08, // ## # 0x08, 0x9C, 0x0C, 0x08, // # # ### ## # 0x0C, 0xA2, 0x0C, 0x08, // ## # # # ## # 0x0A, 0xA2, 0x06, 0x08, // # # # # # ## # 0x09, 0xA2, 0x06, 0x08, // # ## # # ## # 0x08, 0x9C, 0x02, 0x08, // # # ### # # 0x00, 0x00, 0x02, 0x08, // # # 0x00, 0x40, 0x02, 0xE8, // # # ### # 0x00, 0xA0, 0x03, 0x18, // # # ## ## 0x00, 0x20, 0x01, 0xF0, // # ##### 0x00, 0x40, 0x00, 0x00, // # 0x44, 0xEF, 0x80, 0x40, // # # ### ##### # 0x66, 0x08, 0xC0, 0x60, // ## ## # ## ## 0x66, 0x08, 0xC0, 0x60, // ## ## # ## ## 0x66, 0x08, 0xC0, 0xF0, // ## ## # ## #### 0x7E, 0x08, 0xC3, 0xF0, // ###### # ## ###### 0x7E, 0x08, 0xC7, 0xF8, // ###### # ## ######## 0x66, 0x08, 0xC7, 0xFC, // ## ## # ## ######### 0x66, 0x08, 0xC7, 0xFC, // ## ## # ## ######### 0x66, 0x0F, 0xC7, 0xFC, // ## ## ###### ######### 0x22, 0x07, 0xC3, 0xF8, // # # ##### ####### 0x00, 0x00, 0x01, 0xF8, // ###### 0x00, 0x00, 0x00, 0x70, // ### }; const unsigned char PROGMEM wasser2 [] = // width 27px height 37 { 0x01, 0xFF, 0x80, 0x00, // ########## 0x01, 0xFF, 0x80, 0x00, // ########## 0x01, 0xBD, 0x80, 0x00, // ## #### ## 0x00, 0x18, 0x00, 0x00, // ## 0x00, 0x18, 0x00, 0x00, // ## 0x00, 0xFF, 0x00, 0x00, // ######## 0x3F, 0xFF, 0xE0, 0x00, // ################# 0x51, 0xFF, 0xB8, 0x00, // # # ########## ### 0x88, 0x7E, 0x0C, 0x00, // # # ###### ## 0x88, 0x00, 0x06, 0x00, // # # ## 0x88, 0x00, 0x03, 0x00, // # # ## 0x50, 0x00, 0x01, 0x80, // # # ## 0x3F, 0xFF, 0x00, 0x80, // ############## # 0x00, 0x01, 0x80, 0xC0, // ## ## 0x00, 0x00, 0xC0, 0x40, // ## # 0x00, 0x80, 0x60, 0x40, // # ## # 0x01, 0x40, 0x60, 0x40, // # # ## # 0x00, 0x40, 0x30, 0x40, // # ## # 0x00, 0x80, 0x30, 0x40, // # ## # 0x89, 0xDF, 0x10, 0x40, // # # ### ##### # # 0xCC, 0x11, 0x90, 0x40, // ## ## # ## # # 0xCC, 0x11, 0x97, 0x40, // ## ## # ## # ### # 0xCC, 0x11, 0x98, 0xC0, // ## ## # ## ## ## 0xFC, 0x11, 0x8F, 0x80, // ###### # ## ##### 0xFC, 0x11, 0x80, 0x00, // ###### # ## 0xCC, 0x11, 0x82, 0x00, // ## ## # ## # 0xCC, 0x11, 0x83, 0x00, // ## ## # ## ## 0xCC, 0x1F, 0x83, 0x00, // ## ## ###### ## 0x44, 0x0F, 0x87, 0x80, // # # ##### #### 0x00, 0x00, 0x1F, 0x80, // ###### 0x00, 0x00, 0x3F, 0xC0, // ######## 0x00, 0x00, 0x3F, 0xE0, // ######### 0x00, 0x00, 0x3F, 0xE0, // ######### 0x00, 0x00, 0x3F, 0xE0, // ######### 0x00, 0x00, 0x1F, 0xC0, // ####### 0x00, 0x00, 0x0F, 0xC0, // ###### 0x00, 0x00, 0x03, 0x80, // ### }; const unsigned char PROGMEM termo [] = // width 29px height 63 { 0x00, 0x0F, 0x80, 0x00, // ##### 0x00, 0x1F, 0xC4, 0x00, // ####### # 0x00, 0x38, 0xEA, 0x00, // ### ### # # 0x00, 0x30, 0x64, 0xF0, // ## ## # #### 0xFC, 0x30, 0x61, 0x98, // ###### ## ## ## ## 0xF0, 0x30, 0x63, 0x08, // #### ## ## ## # 0x00, 0x30, 0x62, 0x00, // ## ## # 0x00, 0x30, 0x62, 0x00, // ## ## # 0x00, 0x30, 0x62, 0x00, // ## ## # 0x00, 0x30, 0x63, 0x08, // ## ## ## # 0x00, 0x30, 0x61, 0x98, // ## ## ## ## 0x00, 0x30, 0x60, 0xF0, // ## ## #### 0xFC, 0x30, 0x60, 0x00, // ###### ## ## 0xF0, 0x30, 0x60, 0x00, // #### ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0xFC, 0x30, 0x60, 0x00, // ###### ## ## 0xF0, 0x30, 0x60, 0x00, // #### ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0xFC, 0x30, 0x60, 0x00, // ###### ## ## 0xF0, 0x30, 0x60, 0x00, // #### ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0xFC, 0x30, 0x60, 0x00, // ###### ## ## 0xF0, 0x30, 0x60, 0x00, // #### ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0xFC, 0x30, 0x60, 0x00, // ###### ## ## 0xF0, 0x30, 0x60, 0x00, // #### ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x30, 0x60, 0x00, // ## ## 0x00, 0x70, 0x70, 0x00, // ### ### 0x00, 0xF0, 0x78, 0x00, // #### #### 0x01, 0xF0, 0x7C, 0x00, // ##### ##### 0x01, 0xF0, 0x7C, 0x00, // ##### ##### 0x03, 0xF0, 0x7E, 0x00, // ###### ###### 0x03, 0xF0, 0x7E, 0x00, // ###### ###### 0x03, 0xF0, 0x7E, 0x00, // ###### ###### 0x03, 0xF0, 0x7E, 0x00, // ###### ###### 0x03, 0xF0, 0x7E, 0x00, // ###### ###### 0x01, 0xF0, 0x7C, 0x00, // ##### ##### 0x01, 0xF0, 0x7C, 0x00, // ##### ##### 0x00, 0xF8, 0xF8, 0x00, // ##### ##### 0x00, 0x7F, 0xF0, 0x00, // ########### 0x00, 0x1F, 0xC0, 0x00, // ####### }; const unsigned char PROGMEM cat [] = // width 66px height 46 { 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, // ## 0x00, 0x00, 0x0F, 0x0E, 0x18, 0x60, 0x00, 0x00, 0x00, // #### ### ## ## 0x00, 0x00, 0x04, 0x94, 0xF9, 0xE0, 0x00, 0x00, 0x00, // # # # # ##### #### 0x00, 0x00, 0x02, 0x67, 0xB7, 0x40, 0x00, 0x00, 0x00, // # ## #### ## ### # 0x00, 0x3F, 0xFC, 0x22, 0x26, 0x40, 0x00, 0x00, 0x00, // ############ # # # ## # 0x01, 0xE0, 0x04, 0x62, 0x2C, 0x60, 0x00, 0x00, 0x00, // #### # ## # # ## ## 0x07, 0x00, 0x00, 0x02, 0x38, 0x3F, 0xF8, 0x00, 0x00, // ### # ### ########### 0x3C, 0x00, 0x00, 0x02, 0x10, 0x00, 0x0F, 0x80, 0x00, // #### # # ##### 0x60, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, // ## ##### #### 0xDF, 0xE0, 0x7F, 0xE0, 0x01, 0xFE, 0x00, 0x1C, 0x00, // ## ######## ########## ######## ### 0xF0, 0x30, 0xFF, 0xF0, 0x07, 0xFF, 0x00, 0x07, 0x00, // #### ## ############ ########### ### 0x80, 0x18, 0xFF, 0xF0, 0x0F, 0xFF, 0x00, 0x01, 0x80, // # ## ############ ############ ## 0xC0, 0x31, 0xFF, 0xF8, 0x1F, 0xFF, 0x83, 0xFC, 0xC0, // ## ## ############## ############## ######## ## 0x41, 0x19, 0xFF, 0xF8, 0x1F, 0xFF, 0x82, 0x07, 0xC0, // # # ## ############## ############## # ##### 0x61, 0xF1, 0xFF, 0xF8, 0x1F, 0xFF, 0xCE, 0x00, 0x40, // ## ##### ############## ############### ### # 0x20, 0x81, 0xFF, 0xFC, 0x1F, 0xFF, 0xC7, 0xC0, 0x40, // # # ############### ############### ##### # 0x30, 0x71, 0xFF, 0xFC, 0x3F, 0xFF, 0xC0, 0x40, 0xC0, // ## ### ############### ################ # ## 0x10, 0x39, 0x3F, 0xE4, 0x3F, 0xFF, 0xC1, 0x80, 0x80, // # ### # ######### # ################ ## # 0x18, 0x41, 0x00, 0x04, 0x3F, 0xFE, 0x66, 0x00, 0x80, // ## # # # ############# ## ## # 0x0E, 0x01, 0xFF, 0xE4, 0x3F, 0xF0, 0x23, 0x01, 0x80, // ### ############ # ########## # ## ## 0x03, 0x01, 0xC0, 0x3C, 0x20, 0x00, 0x20, 0x03, 0x00, // ## ### #### # # ## 0x01, 0x81, 0x00, 0x08, 0x3F, 0x00, 0x20, 0x02, 0x00, // ## # # ###### # # 0x00, 0x80, 0x00, 0x00, 0x31, 0xFE, 0x60, 0x06, 0x00, // # ## ######## ## ## 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0xC0, 0x0C, 0x00, // ## #### ## 0x00, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0xC0, 0x18, 0x00, // ### ####### ## ## 0x00, 0x1C, 0x38, 0x11, 0xE7, 0xF0, 0x00, 0x30, 0x00, // ### ### # #### ####### ## 0x00, 0x04, 0x60, 0xF1, 0xC3, 0x9C, 0x00, 0x60, 0x00, // # ## #### ### ### ### ## 0x00, 0x0C, 0xC1, 0x80, 0x80, 0xC6, 0x40, 0xC0, 0x00, // ## ## ## # ## ## # ## 0x00, 0x10, 0x83, 0x00, 0x00, 0x60, 0x67, 0x80, 0x00, // # # ## ## ## #### 0x00, 0xE0, 0x06, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, // ### ## #### 0x01, 0x80, 0x04, 0x00, 0x80, 0x80, 0x30, 0x00, 0x00, // ## # # # ## 0x00, 0xFF, 0x80, 0x20, 0x81, 0xF0, 0x0E, 0x00, 0x00, // ######### # # ##### ### 0x00, 0x18, 0x60, 0x11, 0xC6, 0x18, 0x03, 0xC0, 0x00, // ## ## # ### ## ## #### 0x00, 0x60, 0x00, 0x1F, 0x7C, 0x0C, 0x3C, 0x60, 0x00, // ## ##### ##### ## #### ## 0x00, 0x7F, 0x80, 0x14, 0x28, 0x04, 0x07, 0xC0, 0x00, // ######## # # # # # ##### 0x00, 0x43, 0xF0, 0x18, 0x1E, 0x34, 0x01, 0x00, 0x00, // # ###### ## #### ## # # 0x00, 0x02, 0x1C, 0x00, 0x02, 0x1C, 0x3D, 0x00, 0x00, // # ### # ### #### # 0x00, 0x06, 0x00, 0x00, 0x03, 0x10, 0x67, 0x80, 0x00, // ## ## # ## #### 0x00, 0x01, 0xC0, 0x00, 0x01, 0xB0, 0x34, 0x00, 0x00, // ### ## ## ## # 0x00, 0x00, 0x78, 0x00, 0x00, 0xE7, 0xF8, 0x00, 0x00, // #### ### ######## 0x00, 0x00, 0x0E, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, // ### ### 0x00, 0x00, 0x03, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ## # 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // # # 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00, 0x00, // ## ## 0x00, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, // # # 0x00, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, // # # }; long tim = millis(); int temp1=2000; int temp2=2000; int heizstufe =0; int blinking=0; int brighty=0; int zeit1 =0; int zeit2=0; int zeit3=0; void setup(){ pinMode(heiza, OUTPUT); pinMode(heizb, OUTPUT); pinMode(pump, OUTPUT); pinMode(vdampf, OUTPUT); pinMode(vcafe, OUTPUT); pinMode(mahl, OUTPUT); pinMode(aufzugan, OUTPUT); pinMode(aufzugreverse, OUTPUT); pinMode(wasserda, INPUT); pinMode(aufzugunten, INPUT); pinMode(aufzugoben, INPUT); pinMode(aufzugmitte, INPUT); pinMode(schubladeda, INPUT); pinMode(tlinks, INPUT); pinMode(tmitte, INPUT); pinMode(trechts, INPUT); pinMode(factory, INPUT); // digitalWrite(heiza, LOW); digitalWrite(heizb, LOW); digitalWrite(pump, LOW); digitalWrite(vdampf, LOW); digitalWrite(vcafe, LOW); digitalWrite(mahl, LOW); digitalWrite(heiza, HIGH); digitalWrite(heizb, HIGH); digitalWrite(pump, HIGH); digitalWrite(vdampf, HIGH); digitalWrite(vcafe, HIGH); digitalWrite(mahl, HIGH); delay(40); digitalWrite(aufzugan,HIGH); delay(50); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64) display.clearDisplay(); display.setTextColor(WHITE); display.setTextSize(1); display.setCursor(0,0); display.print("Coffe-O-mat V1.0"); display.setCursor(0,9); display.print(" by marderchen"); display.drawBitmap(62, 18,cat,66, 46, WHITE); display.display(); delay(650); FastLED.addLeds(leds, screeny).setCorrection( TypicalLEDStrip ); FastLED.setBrightness( BRIGHTNESS ); currentPalette = RainbowColors_p; currentBlending = BLEND; } int ausputz[9] ={0,0,0,0,0,0,0,0,0}; int welch=0; int stepi =0; int wastun=0; int tempsol = 3930; int pumpesol =600; int mahlsol=130; boolean manuali =true; boolean loslos =false; boolean pumpecount=false; boolean mahlcount =false; void loop(){ display.fillRect(0,0,128,64,BLACK); if (digitalRead(factory) ==HIGH) {pixels(); bedien(); inputzi();} if (digitalRead(factory) ==LOW) {bedien2(); artz(); regenbogen();} elevating(); readmessi(); heizen(); motorpower(); schalten(); zeitreise(); display.display(); } int onpress[8]; void bedien2(void) { zeit1++; if (zeit1 >=1) { if (digitalRead(tlinks) == HIGH && onpress[0] ==0) { onpress[0] =1; mahlsol-=20; if (mahlsol<10) {mahlsol=140;}} if (onpress[0] == 1) { onpress[1]++; } if (onpress[1] >= 10) { onpress[1] =0; onpress[0]=0;} if (digitalRead(tmitte) == HIGH && onpress[2] ==0) { onpress[2] =1; ausputz[6]=1; loslos=true;} if (onpress[2] == 1) { onpress[3]++;} if (onpress[3] >= 10) { onpress[3] =0; onpress[2]=0; } if (digitalRead(trechts) == HIGH && onpress[4] ==0) { onpress[4] =1; pumpesol+=100; if (pumpesol >900) {pumpesol=200;} } if (onpress[4] == 1) { onpress[5]++;} if (onpress[5] >= 13) { onpress[5] =0; onpress[4]=0;ausputz[3]=0; } zeit1=0;} } void bedien(void) { zeit1++; if (zeit1 >=1) { if (digitalRead(tlinks) == HIGH && onpress[0] ==0) { onpress[0] =1; welch++;} //minisound if (onpress[0] == 1) { onpress[1]++;} if (onpress[1] >= 10) { onpress[1] =0; onpress[0]=0;} if (digitalRead(tmitte) == HIGH && onpress[2] ==0) { onpress[2] =1; } if (onpress[2] == 1) { onpress[3]++;} if (onpress[3] >= 10) { onpress[3] =0; onpress[2]=0; } if (digitalRead(trechts) == HIGH && onpress[4] ==0) { onpress[4] =1; stepi++; heizstufe=0;} if (onpress[4] == 1) { onpress[5]++;} if (onpress[5] >= 13) { onpress[5] =0; onpress[4]=0;ausputz[3]=0; } zeit1=0;} if(welch >8) {welch=0;} if(stepi >=2) {stepi=0; ausputz[0]=0;} for( int i = 0; i < 8; i++) { if (welch ==i && digitalRead(tmitte) == HIGH ) {ausputz[i]=1;} if (welch ==i && digitalRead(tmitte) == LOW ) {ausputz[i]=0;} } } int tasseani,tasseanib,tasseanib2; int mahlinv,mahlpos; int heizinv,heizc; int tass; int16_t beans[7][4]; int donec2=60; int donec; int wasserc; int ledding=0; void artz(void) { if (wastun ==0 && mahlcount ==false && donec2 >=50 && digitalRead(tmitte) == HIGH) { display.drawRect(10,10,108,48,WHITE); display.drawBitmap(50, 29,oks,38, 7, WHITE);} if (wastun ==0 && mahlcount ==false && donec2 >=50 && digitalRead(tmitte) == LOW) { //default ledding=0; display.setTextColor(WHITE); display.setTextSize(1); display.setCursor(2,2); //display.print("menge:"); display.setTextSize(3); display.setCursor(2,5); display.print((mahlsol/20)); display.print("X"); display.drawRect(0,34-(4-tasseanib/3),38,33-(4-tasseanib/1.5),WHITE); display.drawBitmap(7, 39-(4-tasseanib/1.5),bohne,25, 19, WHITE); //tasse display.drawBitmap(45, 27-tasseanib,tasse,42, 35, WHITE); tasseani++; if (tasseani ==2) {display.drawBitmap(41, 7-tasseanib/1.5,dampf1,33, 21, WHITE); if (tasseanib2 ==1) {tasseanib--;}} if (tasseani ==4) {display.drawBitmap(40, 6-tasseanib/1.2,dampf2,35, 20, WHITE); } if (tasseani ==6) {display.drawBitmap(39, 6-tasseanib/1.4,dampf3,40, 17, WHITE); } if (tasseani ==8) {display.drawBitmap(38, 7-tasseanib/1.5,dampf4,42, 18, WHITE); tasseani=0; if (tasseanib2 ==0) {tasseanib++;}} if (tasseanib >4) {tasseanib2=1;} if (tasseanib ==0) {tasseanib2=0;} //wasser display.setTextSize(1); display.setCursor(93,3); display.print("Water"); display.setCursor(93,12); display.print(pumpesol/10); display.print("sec"); display.drawBitmap(94, 27-(4-tasseanib/1.1),wasser2,27, 37, WHITE); } if (mahlcount ==true) { //mahlen mahlinv++; ledding=1; if (mahlinv ==1) { display.setTextColor(WHITE); display.setTextSize(3); display.setCursor(10,1); display.print("MAHLEN"); display.fillRect(0,42,128-((mahlsol - zeit3)/(mahlsol/128)),2,WHITE); } if (mahlinv >=2){ display.fillRect(0,0,128,23,WHITE); display.setTextColor(BLACK); display.setTextSize(3); display.setCursor(10,1); display.print("MAHLEN"); display.fillRect(0,42,128-((mahlsol - zeit3)/(mahlsol/128)),2,BLACK); mahlinv=0; } display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(28,24); if (((mahlsol-zeit3)/10) <=9) {display.print(" ");} display.print((mahlsol-zeit3)/10); display.print(" sec."); mahlpos++; if (mahlpos >32) {mahlpos=0;} for( int ib = mahlpos; ib < 172; ib+=32) { display.drawBitmap(ib-32,44,bohne,25, 19, WHITE); } } if (wastun >1 && wastun <4) { ledding=2; display.setTextColor(WHITE); display.setTextSize(2); display.setCursor(0,50-(wastun*10)); display.print("fahre hoch"); } if (wastun ==4 && ausputz[2] == 0) { //hezien ledding=3; heizinv++; if (heizinv >=2) {heizinv=0;} for( int ic = 0; ic < 10; ic+=4) { if (heizinv==0) { display.drawCircle(48,37,3+ic, WHITE);display.drawCircle(48,37,4+ic, WHITE);} if (heizinv==1) { display.drawCircle(48,37,5+ic, WHITE);display.drawCircle(48,37,6+ic, WHITE);} } heizc++; if (heizc > 30) {heizc=0;} for( int ic2 = heizc; ic2 < 80; ic2+=6) { if ((12+ic2-25)>16) { display.drawCircle(48,37,12+(ic2)-25, WHITE);} } display.fillRect(95,0,32,64,BLACK); display.drawBitmap(97, 0,termo,29, 63, WHITE); display.fillRect(0,0,97,9,BLACK); display.setTextColor(WHITE); display.setTextSize(1); display.setCursor(0,0); display.print("HEATING "); if(((temp1-1950)/10) <= 999) { display.print(" ");} if(((temp1-1950)/10) <= 99) { display.print(" ");} if(((temp1-1950)/10) <= 9) { display.print(" ");} display.print(((temp1-1950)/15)); if ((heizc%2) ==0) {display.fillRect(109,61-((temp1-2200)/40),5,((temp1-2200)/40),WHITE);} } if (wastun ==4 && ausputz[2] == 1) { //pumpen nach heizen ledding=4; display.setTextColor(WHITE); display.setTextSize(1); display.setCursor(5,20); display.print("PESS "); display.setTextSize(3); display.setCursor(0,34); if ((pumpesol-zeit2)/10 <=9) {display.print("0");} display.print((pumpesol-zeit2)/10); display.drawBitmap(45, 27-((tass%6)/3),tasse,42, 35, WHITE); tass++; if (tass==2) {display.drawBitmap(43, 12,ex1,35, 17, WHITE); } if (tass==4) {display.drawBitmap(43, 12,ex2,35, 17, WHITE); } if (tass==6) {display.drawBitmap(33, 5,ex3,56, 25, WHITE); } if (tass==8) {display.drawBitmap(33, 5,ex4,56, 25, WHITE); tass=0; } if (beans[0][0] ==0) {for( int bb =0; bb < 6; bb++) { beans[bb][0]= random(80,114); beans[bb][1]=random(0,20); beans[bb][2]=random(1,5); }} for( int bb2 =0; bb2 < 5; bb2++) { beans[bb2][1]+=beans[bb2][2]+random(0,2); if (beans[bb2][1] >100) {beans[bb2][1]=random(0,20);beans[bb2][0]= random(80,114);beans[bb2][2]=random(1,4);} display.drawBitmap(beans[bb2][0], beans[bb2][1]-49,bohne,25, 19, WHITE); }donec2=0; } if (wastun >=5 && donec2 <50) { //fertig donec++; ledding=6; if (donec ==2){ display.setTextColor(WHITE); display.setTextSize(2); display.setCursor(5,2); display.print("DONE!"); } if (donec ==4) {display.fillRect(3,0,60,18,WHITE);} if (donec ==6){ display.fillRect(3,0,60,18,WHITE); display.setTextColor(BLACK); display.setTextSize(2); display.setCursor(5,2); display.print("DONE!"); } if (donec ==8){donec=0;donec2++;} display.drawBitmap(40, 19-(donec/4),cat,66, 46, WHITE); } if (wastun ==7) { } if (wastun ==8) { } if (wastun ==9) { } if (digitalRead(wasserda) == LOW){ wasserc++; display.fillRect(0,0,128,64,BLACK); if (wasserc ==2) {display.fillRect(0,0,128,64,BLACK); display.drawBitmap(0, 0,wasser,30, 37, WHITE); } if (wasserc ==4) {display.fillRect(0,0,128,64,WHITE); display.drawBitmap(0, 0,wasser,30, 37, BLACK); wasserc=0; } } } int colcol,colstept,brightm,brightf; void regenbogen(void) { colcol+=4; if (colcol >255) {colcol=0;} colstept=colcol; for( int ws =0; ws < 7; ws++) { if (digitalRead(wasserda) == HIGH){ colstept+=30; if (ws <(ledding+1)) {leds[ws]= ColorFromPalette( currentPalette,colstept, 255-(brightf/3), currentBlending);} if (ws == (ledding+1)) {leds[ws]= ColorFromPalette( currentPalette,ws*3, brightf, currentBlending);} if (ws > (ledding+1)) {leds[ws] = CRGB::Black;} } else {leds[ws]= ColorFromPalette( currentPalette,255, brightf, currentBlending);} if (ledding==6) {leds[8]= ColorFromPalette( currentPalette,125, brightf, currentBlending); leds[9]= ColorFromPalette( currentPalette,125, brightf, currentBlending);} else {leds[8]= ColorFromPalette( currentPalette,colcol, brightf, currentBlending); leds[9]= ColorFromPalette( currentPalette,colcol, brightf, currentBlending);} if (brightm ==0) {brightf++;} if (brightf >= 255){brightm=1;} if (brightm==1) {brightf--;} if (brightf <1) {brightm=0;} } FastLED.show(); FastLED.delay(1000 / 2000);} int blinks=0; void pixels(void) { display.fillRect(0,0,128,64,BLACK); display.drawLine(0,9,128,9,WHITE); display.setTextColor(WHITE); display.setTextSize(1); display.setCursor(18,1); display.print("MEOW =^.^= Info"); display.setCursor(0,9); display.print("temp1: "); if(temp1 <= 999) { display.print(" ");} if(temp1 <= 99) { display.print(" ");} if(temp1 <= 9) { display.print(" ");} display.print(temp1); display.setCursor(0,18); display.print("temp2: "); if(temp2 <= 999) { display.print(" ");} if(temp2 <= 99) { display.print(" ");} if(temp2 <= 9) { display.print(" ");} display.print(temp2); display.setCursor(0,27); display.print("heiza: "); display.print(ausputz[0]); display.setCursor(0,36); display.print("heizb: "); display.print(ausputz[1]); display.setCursor(0,45); display.print("pumpe: "); display.print(ausputz[2]); display.setCursor(0,54); display.print("vdampf "); display.print(ausputz[3]); display.setCursor(67,9); display.print("vcafee "); display.print(ausputz[4]); display.setCursor(67,18); display.print("mahlen "); display.print(ausputz[5]); display.setCursor(67,27); display.print("GOGOGO "); display.print(ausputz[6]); display.setCursor(67,36); display.print("manual "); display.print(ausputz[7]); display.setCursor(67,45); display.print("updown "); display.print(ausputz[8]); display.drawLine(65,10,65,60,WHITE); for( int i = 27; i < 108; i+=9) { if (((welch*9)+27) ==i && i< 55){display.fillRect(56,i,4,8,WHITE);} if (((welch*9)+27) ==i && i> 55){display.fillRect(120,i-55,4,8,WHITE);} } display.setCursor(67,54); display.print(wastun); display.print(" "); display.print(zeit2); display.print(" "); display.print(zeit3); if (stepi ==1 && blinks ==0) {display.fillRect(52,28,3,6,WHITE); blinks++;} else { display.drawRect(51,27,4,8,WHITE); blinks=0;} display.drawLine(0,63,(temp1-3000)/10,64,WHITE); } void inputzi(void) { for( int i = 0; i < 8; i++) { leds[i] = CRGB::Black; } blinking +=10; if (blinking >255) {blinking =0;} brighty =255-blinking; if (digitalRead(wasserda) == HIGH){leds[0]= ColorFromPalette( currentPalette,blinking, brighty, currentBlending); } if (digitalRead(aufzugoben) == HIGH){leds[1]= ColorFromPalette( currentPalette,blinking, brighty, currentBlending);} if (digitalRead(aufzugunten) == HIGH){leds[2]= ColorFromPalette( currentPalette,blinking, brighty, currentBlending);} if (digitalRead(schubladeda) == HIGH){leds[3]= ColorFromPalette( currentPalette,blinking, brighty, currentBlending);} if (digitalRead(tlinks) == HIGH){leds[4]= ColorFromPalette( currentPalette,blinking, brighty, currentBlending);} if (digitalRead(tmitte) == HIGH){leds[5]= ColorFromPalette( currentPalette,blinking, brighty, currentBlending);} if (digitalRead(trechts) == HIGH){leds[6]= ColorFromPalette( currentPalette,blinking, brighty, currentBlending);} if (digitalRead(aufzugmitte) == LOW){leds[7]= ColorFromPalette( currentPalette,blinking, brighty, currentBlending);} leds[8]= ColorFromPalette( currentPalette,255-blinking, brighty, currentBlending); leds[9]= ColorFromPalette( currentPalette,255-blinking, brighty, currentBlending); FastLED.show(); FastLED.delay(1000 / 2000); } /* void regenbogen(void){ color2+=3; color =color2; for( int i = 8; i > 0; i--) { color+=10; leds[i] = ColorFromPalette( currentPalette,255-color, brighty, currentBlending); leds[16-i] = ColorFromPalette( currentPalette,255-color, brighty, currentBlending); } FastLED.show(); FastLED.delay(1000 / 2000); } */ void readmessi(void){ if (temp1 < analogRead(tempa)) {temp1+=4;} if (temp1 > analogRead(tempa)) {temp1-=3;} if (temp2 < analogRead(tempb)) {temp2+=6;} if (temp2 > analogRead(tempb)) {temp2-=5;} } int zeitzi =0; int zeitzim =0; int nochmerk =0; int nochmerkb =0; void schalten(void) { if(ausputz[0] == 1) {digitalWrite(heiza,LOW);} if(ausputz[0] == 0) {digitalWrite(heiza,HIGH);} if(ausputz[1] == 1) {digitalWrite(heizb,LOW);} if(ausputz[1] == 0) {digitalWrite(heizb,HIGH);} if(ausputz[2] == 1 && (digitalRead(wasserda) == HIGH)) {digitalWrite(pump,LOW);} if (digitalRead(wasserda) == LOW){ausputz[2] = 0;} if(ausputz[2] == 0) {digitalWrite(pump,HIGH);} if(ausputz[3] == 1) {digitalWrite(vdampf,LOW);} if(ausputz[3] == 0) {digitalWrite(vdampf,HIGH);} if(ausputz[4] == 1) {digitalWrite(vcafe,LOW);} if(ausputz[4] == 0) {digitalWrite(vcafe,HIGH);} if(ausputz[5] == 1) {digitalWrite(mahl,LOW);ausputz[8]=1;} if(ausputz[5] == 0) {digitalWrite(mahl,HIGH);} if(ausputz[6] == 1) {}//loslos if(ausputz[6] == 0 ) {} if (digitalRead(aufzugoben) == LOW){ausputz[8]=0;} if (digitalRead(aufzugunten) == HIGH){ausputz[8]=1;} if (digitalRead(aufzugoben) == LOW || digitalRead(aufzugunten) == HIGH){nochmerk=1;} /* if (nochmerk==1) {nochmerkb++;} if (nochmerkb==1){zeitzi=2;} if (nochmerkb==2){} */ } void motorpower(void) { if (zeitzim==1 && zeitzi < 11) {zeitzi++;} if (zeitzi ==3) {digitalWrite(aufzugan,HIGH);} if (zeitzi ==6) { if(ausputz[8] == 1) {digitalWrite(aufzugreverse,LOW);} if(ausputz[8] == 0) {digitalWrite(aufzugreverse,HIGH);} } if (zeitzi ==9) { digitalWrite(aufzugan,LOW); } if (zeitzi==10) {zeitzim=0; } } void zeitreise(void){ while ((millis()- tim) >= 100) { if (pumpecount ==true) { zeit2++; } if (mahlcount ==true) {zeit3++;} tim = millis(); } } void heizen(void) { if (stepi ==1) { if (temp1 < 3750) {ausputz[0]=1;} if (temp1 > 3790 && heizstufe ==0) {ausputz[0]=0; heizstufe++;} if (temp1 > 3850 && temp1 < 3900 && heizstufe ==1) {ausputz[0]=1;} if (temp1 > tempsol && heizstufe ==1) {ausputz[0]=0;} } else {ausputz[0]=0; heizstufe=0;}} int cachss=0; int cachsss=0; int cachsi=0; int cachnochnen=0; int pumplag; void elevating(void){ if (loslos == true && digitalRead(aufzugmitte) ==LOW && wastun ==0) { ausputz[5] =1; mahlcount =true; zeitzi=0;} if (zeit3 > mahlsol && wastun ==0) {ausputz[5] =0; mahlcount =false; wastun =1;zeit3=0;} if (wastun ==1) { ausputz[8]=1; zeitzim=1; wastun=2;} if (wastun ==2) { wastun=3; cachsi=0;} if (digitalRead(aufzugoben) == LOW &&wastun==3) {digitalWrite(aufzugan,HIGH); zeitzi=0; zeit2=0; stepi=1; wastun=4;loslos=false;} if (wastun == 4 && heizstufe == 1 && temp1 <3850) {cachsi++;} if (cachsi >400 && temp1 <3850) {ausputz[0]=1;} if (cachsi >450 && temp1 <3850) {cachsi=0;} if (temp1 > 3870 && wastun==4) {ausputz[2] = 1; pumpecount=true; pumplag=0;} if (temp1 < 3870 && wastun==4) {pumplag++;} if (wastun==4 && pumplag >30) {ausputz[2] = 0;} if (zeit2 > pumpesol && wastun==4) { ausputz[2]=0; zeitzi=0; wastun=5; pumpecount =false;} if (wastun ==5) {cachss++;} if (cachss > 150 && wastun ==5) {stepi=0; cachss =0; ausputz[8]=0; zeitzim=1; wastun=6;} if (digitalRead(aufzugunten) ==HIGH && wastun==6) {digitalWrite(aufzugan,HIGH); zeit2=0; ausputz[8]=1; wastun=7;} if (wastun ==7) {cachsss++;digitalWrite(aufzugan,HIGH); } if (cachsss ==20) {zeitzi=0;} if (cachsss >50) { wastun=8; cachsss=0;} if (wastun ==8) {zeitzim=1; wastun=9;loslos=false;} if (digitalRead(aufzugmitte) ==LOW && wastun==9) { wastun=10;} if (wastun ==10) { cachnochnen++; digitalWrite(aufzugan,HIGH); } if (cachnochnen >30) {loslos=false; wastun =0; cachnochnen=0;} // if (loslos ==false) {digitalWrite(aufzugan,HIGH); } if (loslos ==false && ausputz[7]==0 && wastun ==0) {zeitzi=0; digitalWrite(aufzugan,HIGH);} if (loslos ==false && ausputz[7]==1 && wastun ==0) {zeitzim=1;} //get in position by poweron /* if (wastun==0 && digitalRead(aufzugunten) ==HIGH) { wastun=5;} if (wastun==0 && digitalRead(aufzugoben) == LOW ) { wastun=2;} */ } //Coffee - O - Mat current fine running programm by marderchen //MEOW! its free use it or parts if there is somethink usefull for you //code by marderchen =^.^=