Commit e9dd297a authored by João Lino's avatar João Lino

fixed bugs and set trigo as default profile

fixed bugs and set trigo as default profile
parent 2f48bc72
This diff is collapsed.
......@@ -23,10 +23,5 @@ void xPaintStatusTemplate(LiquidCrystal_I2C *lcd, boolean cooking);
boolean displayStatus(LiquidCrystal_I2C *lcd, boolean cooking, float cookTemperature, float baseTemperature, float upTemperature, float downTemperature, unsigned long clockCounter, boolean repaint);
boolean displayGenericMenu( LiquidCrystal_I2C *lcd, MenuData *data );
boolean displayMainMenu(LiquidCrystal_I2C *lcd, eMainMenuOptions position, boolean repaint);
boolean displayBeerProfileMenu(LiquidCrystal_I2C *lcd, eBeerProfileMenuOptions position, boolean repaint);
boolean displayStageMenu(LiquidCrystal_I2C *lcd, eStageMenuOptions position, boolean repaint);
boolean displayMaltMenu(LiquidCrystal_I2C *lcd, eMaltMenuOptions position, boolean repaint);
boolean displaySettingsMenu(LiquidCrystal_I2C *lcd, eSettingsMenuOptions position, boolean repaint);
#endif
......@@ -139,6 +139,14 @@ int buzz_1_tempo[] = {
12, 12, 12, 12,
};
int buzz_2_melody[] = {
NOTE_E7
};
//Mario main them tempo
int buzz_2_tempo[] = {
12
};
int song = 0;
void buzz(int targetPin, long frequency, long length) {
......@@ -271,6 +279,28 @@ void sing(int s, int pin) {
}
break;
}
case BUZZ_2: {
int size = sizeof(buzz_2_melody) / sizeof(int);
for (int thisNote = 0; thisNote < size; thisNote++) {
// to calculate the note duration, take one second
// divided by the note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int noteDuration = 1000 / buzz_2_tempo[thisNote];
buzz(pin, buzz_2_melody[thisNote], noteDuration);
// to distinguish the notes, set a minimum time between them.
// the note's duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
// stop the tone playing:
buzz(pin, 0, noteDuration);
}
break;
}
}
}
\ No newline at end of file
}
......@@ -108,6 +108,7 @@
#define MELODY_SUPER_MARIO_START 3
#define MELODY_UNDERWORLD_SHORT 4
#define BUZZ_1 5
#define BUZZ_2 6
// melody[] is an array of notes, accompanied by beats[],
......@@ -117,4 +118,4 @@
void buzz(int targetPin, long frequency, long length);
void sing(int s, int pin);
#endif
\ No newline at end of file
#endif
This diff is collapsed.
......@@ -113,4 +113,8 @@ unsigned long getInactivityTime();
void xWaitForAction(String title, String message);
void printBeerProfile( void );
void printTime( unsigned long timeToPrint );
void printTemperature( int temparatureToPrint );
#endif //__BREW
This diff is collapsed.
......@@ -12,8 +12,9 @@
#define SETTING_CLEANING_TEMPERATURE 45 //45
#define SETTING_MACHINE_YIELD_CAPACITY_MIN 0
#define SETTING_MACHINE_YIELD_CAPACITY_MAX 50
#define SETTING_MACHINE_YIELD_DEFAULT 25
#define SETTING_MACHINE_YIELD_DEFAULT 40
#define SETTING_MACHINE_LOGGING_INTERVAL 1000
#define SETTING_WARNING_BEEP_INTERVAL 5000
// ++++++++++++++++++++++++ Heating Element Relay ++++++++++++++++++++++++
#define HEATING_ELEMENT_DEFAULT_WINDOW_SIZE 1000
......@@ -66,7 +67,7 @@
// ++++++++++++++++++++++++ State Machine ++++++++++++++++++++++++
#define SETTING_WELCOME_TIMEOUT 100
#define SETTING_MAX_INACTIVITY_TIME 3000
#define SETTING_CANCEL_TIMER 2000
#define SETTING_CANCEL_TIMER 1000
#define MENU_INIT eMenuType_Main
#define MENU_SIZE_MAIN_MENU 13
#define MENU_SIZE_PROFILES_MENU 9
......@@ -74,7 +75,7 @@
#define MENU_SIZE_MALT_MENU 4
#define MENU_SIZE_SETTINGS_MENU 6
#define SETTING_COOKING_STAGE_INIT eCookingStage_Startpoint
#define SETTING_BEER_PROFILE_INIT eBeerProfile_Basic
#define SETTING_BEER_PROFILE_INIT eBeerProfile_Trigo
// ++++++++++++++++++++++++ Menus ++++++++++++++++++++++++
#define MENU_MAIN_TITLE "Brewery Menu"
......@@ -123,7 +124,8 @@
#define MENU_START_FUNCTION &runStartFromStageSelection
// ++++++++++++++++++++++++ Serial Monotor ++++++++++++++++++++++++
#define SETTING_SERIAL_MONITOR_BAUD_RATE 9600
#define SETTING_SERIAL_MONITOR_BAUD_RATE 115200
//#define SETTING_SERIAL_MONITOR_BAUD_RATE 9600
#define SETTING_SERIAL_MONITOR_WELCOME_MESSAGE "Let's start Brewing!"
// ######################### LIBRARIES #########################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment