Hi!
I'm new to Arduino and trying to figure out how I can do the following:
I would like to count how many times I use coffee machine during a month and display these numbers on a display.
Would really appreciate if someone could help me.
Hi!
I'm new to Arduino and trying to figure out how I can do the following:
I would like to count how many times I use coffee machine during a month and display these numbers on a display.
Would really appreciate if someone could help me.
Is it about how many times you power it on?
If you can power on a Arduino at the same time as the machine it's easy. So easy you can also just use a mechanical counter but okay.
If you use a simple I2C 12x2 LCD the code will be something like
#include <EEPROM.h>
#include "Wire.h"
#include "LiquidCrystal.h"
LiquidCrystal lcd(0);
void setup(){
unsigned long counter = 0;
//clean arduino, set EEPROM up
if(EEPROM.read(0)){
EEPROM.write(0, 0); //clear first address to tell it it's set up.
}
else{
EEPROM.get(1, counter); //Load counter value from EEPROM
}
counter++; //Count up 1
EEPROM.put(1, counter); //Save the new value
lcd.begin(16, 2);
lcd.print("Start up number: ");
lcd.print(counter);
}
void loop(){
}
Put it on a weigh scale.
Look for abrupt changes in weight associated with filling and emptying.