Created
February 11, 2018 18:02
-
-
Save HectorTorres/82f735cec5515a66be67583715148c12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
EEPROM PUT | |
Escribe bytes en EEPROM tomando en cuenta la variable en la que se van a guardar estos bytes | |
*/ | |
#include <EEPROM.h> | |
void setup() | |
{ | |
Serial.begin(9600); | |
while (!Serial) | |
{ | |
; // Espera a que el puerto serial se conecte (Sólo es necesario si se usa un puerto de USB local) | |
} | |
float p = 665.566f; // Variable a guardar en EEPROM | |
int direccion = 0; | |
EEPROM.put(direccion, p); // Se agrega a EEPROM con la dirección primero y el objeto después | |
Serial.println("Dato guardado."); // Esto lo muestra en la ventana serial del software de Arduino una vez terminado el proceso | |
} | |
void loop() | |
{ | |
// Void loop vacío | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment