Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <EEPROM.h>
- //unsigned int E;
- //unsigned int Q;
- byte adress = 0;
- float E = 0.00f; ; //Variable float to store in EEPROM.
- float Q = 0.00f; ; //Variable float
- //-----------------------
- void setup()
- {
- EEPROM.get(adress, E);
- // E = EEPROM.read(adress); // Le a EEPROM
- }
- //-----------------------
- void loop()
- {
- Q = E + 0.01; // ????
- Serial.println(Q,3);
- Serial.println(" ");
- Serial.println(E,3);
- delay(1000);
- E = analogRead(A0);
- if (t.min == 60)
- {
- EEPROM.put(adress, E);
- //EEPROM.write(adress, E); // a cada 1h
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement