INFO: Dieses Forum nutzt Cookies...
Cookies sind für den Betrieb des Forums unverzichtbar. Mit der Nutzung des Forums erklärst Du dich damit einverstanden, dass wir Cookies verwenden.

Es wird in jedem Fall ein Cookie gesetzt um diesen Hinweis nicht mehr zu erhalten. Desweiteren setzen wir Google Adsense und Google Analytics ein.

Antwort schreiben 
 
Themabewertung:
  • 2 Bewertungen - 2.5 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Daten in EEPROM speichern und auslesen
21.03.2013, 15:22
Beitrag #1
Daten in EEPROM speichern und auslesen
Hallo , lese über den Serialport Daten zum Arduino und möchte diese in EEPROM speichern und über eine GUI auslesen.

Problem ist , wenn ich über die GUI eine z.b 1 oder irgendetwas anderes sende, und lese über die GUI das aus was in dem EEPROM steht, bekomme ich nur eine 0 aus.

Sitze da stunden lang und komme einfach nicht weiter.
HIer mein code:
Code:
/*Code zum Empfangen und Senden von Daten über Serialport (GUI<-> Arduino) */

//Globale Variablen
/*----------Varaiblen fürs Senden---------------------------------------*/
//int ist_senden= 1; //Falls Arduino an GUI sendet
const int ledPin1= 22;  //Mit Digital PIN 22 verbundene Led  (senden)-(rote led)
/*----------------------------------------------------------------------*/

/*----------Variablen fürs Empfangen------------------------------------*/
const int ledPin2= 23; //MIt Digital PIN 23 verbundene Led (empfangen)-(gelbe led)
//int ist_receive=2; //Falls Arduino von GUI empfangen soll

#include <EEPROM.h>

int chr;
int addr=0; //inizialadresse EEPROM -> 4kbyte -> 4096byte , also von 0-4093

/*----------------------------------------------------------------------*/
/*-----------Auswahlvariable für Swtich-Case----------------------------*/
int inByte=0; //Variable wo das Empfangene abgespeichert wird(als Byte)
/*----------------------------------------------------------------------*/

/*----------- Hier beginnt das Programm---------------------------------*/



void setup()
{
  Serial.begin(9600); //Serialport öffnen mit baudrate 9600
  pinMode(ledPin1, OUTPUT); //ledPin1(senden LED), wird als Output gesetzt
  pinMode(ledPin2, OUTPUT); //ledPin2 (empf. LED), wird als Output gesetzt
  
}


void loop()
{
  if (Serial.available() > 0) //Prüfen , ob mindestens ein Zeichen im Port vorhanden ist (Hier prüfe ich , ob senden oder EMpfangen)
  {
    inByte = Serial.read(); //lese zeichen au und speichere in chr vom typ char
    
  
  switch (inByte){

    /*Senden der Daten von Arduino zur GUI*/    
    case 1:
    
              blink_send();
              /*Serial.write("Hallo, ich bin dein Arduino");
              Serial.write(13); //Carriage return, damit man in GUI untereinander eingetragen hat(Formatierung)
              delay(1500); //warte 1,5sek
              blink_send();
              Serial.write("Ich habe vor genau 1,5 sek hallo gesagt.");
              Serial.write(13);
              delay(1000); //warte 1 sek
              blink_send();
              Serial.write("Jetzt geht es von vorne los....");
              Serial.write(13);
              //delay(10); */
              
              chr= EEPROM.read(addr);
              
              
              
              
              Serial.print(chr);
              Serial.write(13);
              
              
              
              /*addr= addr+1;
              
              if (addr=4096)
                addr=0;
                
                delay(100);
                */
  
                
            
                
            
              
              break; //beende case 1
    
    /* Von GUI empfangen*/          
    case 2:
              if (Serial.available() > 0)
              {
                chr=Serial.read();
                EEPROM.write(0,chr);
              
                
              }
                blink_receive();
              
               break;
              
    
    
     //falls keine 1 oder 2
    
    /*default:
    
            if (Serial.available() > 0) //Prüfen , ob mindestens ein Zeichen im Port vorhanden ist (Hier prüfe ich , ob senden oder EMpfangen)
            {
    
              chr = Serial.read(); //lese zeichen au und speichere in chr vom typ char
              wahl = int(chr); //Umwandeln in lesbares
            }
            
            
           } */
          
}
}
}


/*---------------------funktion für das Blinken beim senden an GUI----------------------*/
/*---------------------Blink funktion 0,5sek an und 0,5sek aus--------------------------*/

/*Rote LED*/

void blink_send()
{
  
  digitalWrite(ledPin1, HIGH); //leuchtet
  delay(500); //leuchtet 0,5 sek
  digitalWrite(ledPin1, LOW); //aus
  delay(500);
  
}
/*-------------------------------------------------------------------------------------*/


/*----------Funktion die in Case 2 aufegrufen wird, damit LED blinkt-------------------*/

/*gelbe LED*/

void blink_receive()
{
  digitalWrite(ledPin2, HIGH); //leuchtet
  delay(500); // 0,5sek an
  digitalWrite(ledPin2,LOW); //aus
  delay(500); //0,5sek aus
  
}  

/*-------------------------------------------------------------------------------------*/

Bitte um Hilfe . ich möchte gerne Strings einlesen und diese im EEPROM speichern und wieder auslesen.
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren
25.03.2013, 12:42
Beitrag #2
RE: Daten in EEPROM speichern und auslesen
Hi,

ggf. hilft dir das hier weiter ? Smile

https://github.com/quarterturn/serialMultiMessages


Code:
//
// EEPROM utility functions with usage example
//
// This example defines some utility functions
// to write byte arrays, integers and strings
// to eeprom and read them back.
//
// Some usage examples are provided.


#include <EEPROM.h>


//
// Absolute min and max eeprom addresses.
// Actual values are hardware-dependent.
//
// These values can be changed e.g. to protect
// eeprom cells outside this range.
//
const int EEPROM_MIN_ADDR = 0;
const int EEPROM_MAX_ADDR = 511;


//
// Initialize eeprom memory with
// the specified byte.
// Default value is 0xFF.
//
void eeprom_erase_all(byte b = 0xFF) {
  int i;

  for (i = EEPROM_MIN_ADDR; i <= EEPROM_MAX_ADDR; i++) {
    EEPROM.write(i, b);
  }
}


//
// Dump eeprom memory contents over serial port.
// For each byte, address and value are written.
//
void eeprom_serial_dump_column() {
  // counter
  int i;

  // byte read from eeprom
  byte b;

  // buffer used by sprintf
  char buf[10];

  for (i = EEPROM_MIN_ADDR; i <= EEPROM_MAX_ADDR; i++) {
    b = EEPROM.read(i);
    sprintf(buf, "%03X: %02X", i, b);
    Serial.println(buf);
  }
}


//
// Dump eeprom memory contents over serial port in tabular form.
// Each printed row shows the value of bytesPerRow bytes
// (by default 16).
//
void eeprom_serial_dump_table(int bytesPerRow = 16) {
  // address counter
  int i;

  // row bytes counter
  int j;

  // byte read from eeprom
  byte b;

  // temporary buffer for sprintf
  char buf[10];


  // initialize row counter
  j = 0;

  // go from first to last eeprom address
  for (i = EEPROM_MIN_ADDR; i <= EEPROM_MAX_ADDR; i++) {

    // if this is the first byte of the row,
    // start row by printing the byte address
    if (j == 0) {
      sprintf(buf, "%03X: ", i);
      Serial.print(buf);
    }

    // read current byte from eeprom
    b = EEPROM.read(i);

    // write byte in hex form
    sprintf(buf, "%02X ", b);

    // increment row counter
    j++;

    // if this is the last byte of the row,
    // reset row counter and use println()
    // to start a new line
    if (j == bytesPerRow) {
      j = 0;
      Serial.println(buf);
    }
    // else just print the hex value with print()
    else {
      Serial.print(buf);
    }
  }
}


//
// Returns true if the address is between the
// minimum and maximum allowed values,
// false otherwise.
//
// This function is used by the other, higher-level functions
// to prevent bugs and runtime errors due to invalid addresses.
//
boolean eeprom_is_addr_ok(int addr) {
  return ((addr >= EEPROM_MIN_ADDR) && (addr <= EEPROM_MAX_ADDR));
}


//
// Writes a sequence of bytes to eeprom starting at the specified address.
// Returns true if the whole array is successfully written.
// Returns false if the start or end addresses aren't between
// the minimum and maximum allowed values.
// When returning false, nothing gets written to eeprom.
//
boolean eeprom_write_bytes(int startAddr, const byte* array, int numBytes) {
  // counter
  int i;

  // both first byte and last byte addresses must fall within
  // the allowed range  
  if (!eeprom_is_addr_ok(startAddr) || !eeprom_is_addr_ok(startAddr + numBytes)) {
    return false;
  }

  for (i = 0; i < numBytes; i++) {
    EEPROM.write(startAddr + i, array[i]);
  }

  return true;
}


//
// Reads the specified number of bytes from the specified address into the provided buffer.
// Returns true if all the bytes are successfully read.
// Returns false if the star or end addresses aren't between
// the minimum and maximum allowed values.
// When returning false, the provided array is untouched.
//
// Note: the caller must ensure that array[] has enough space
// to store at most numBytes bytes.
//
boolean eeprom_read_bytes(int startAddr, byte array[], int numBytes) {
  int i;

  // both first byte and last byte addresses must fall within
  // the allowed range  
  if (!eeprom_is_addr_ok(startAddr) || !eeprom_is_addr_ok(startAddr + numBytes)) {
    return false;
  }

  for (i = 0; i < numBytes; i++) {
    array[i] = EEPROM.read(startAddr + i);
  }

  return true;
}


//
// Writes an int variable at the specified address.
// Returns true if the variable value is successfully written.
// Returns false if the specified address is outside the
// allowed range or too close to the maximum value
// to store all of the bytes (an int variable requires
// more than one byte).
//
boolean eeprom_write_int(int addr, int value) {
  byte *ptr;

  ptr = (byte*)&value;
  return eeprom_write_bytes(addr, ptr, sizeof(value));
}


//
// Reads an integer value at the specified address.
// Returns true if the variable is successfully read.
// Returns false if the specified address is outside the
// allowed range or too close to the maximum vlaue
// to hold all of the bytes (an int variable requires
// more than one byte).
//
boolean eeprom_read_int(int addr, int* value) {
  return eeprom_read_bytes(addr, (byte*)value, sizeof(int));
}


//
// Writes a string starting at the specified address.
// Returns true if the whole string is successfully written.
// Returns false if the address of one or more bytes
// fall outside the allowed range.
// If false is returned, nothing gets written to the eeprom.
//
boolean eeprom_write_string(int addr, const char* string) {
  // actual number of bytes to be written
  int numBytes;

  // we'll need to write the string contents
  // plus the string terminator byte (0x00)
  numBytes = strlen(string) + 1;

  return eeprom_write_bytes(addr, (const byte*)string, numBytes);
}


//
// Reads a string starting from the specified address.
// Returns true if at least one byte (even only the
// string terminator one) is read.
// Returns false if the start address falls outside
// or declare buffer size os zero.
// the allowed range.
// The reading might stop for several reasons:
// - no more space in the provided buffer
// - last eeprom address reached
// - string terminator byte (0x00) encountered.
// The last condition is what should normally occur.
//
boolean eeprom_read_string(int addr, char* buffer, int bufSize) {
  // byte read from eeprom
  byte ch;

  // number of bytes read so far
  int bytesRead;

  // check start address
  if (!eeprom_is_addr_ok(addr)) {
    return false;
  }

  // how can we store bytes in an empty buffer ?
  if (bufSize == 0) {
    return false;
  }

  // is there is room for the string terminator only,
  // no reason to go further
  if (bufSize == 1) {
    buffer[0] = 0;
    return true;
  }

  // initialize byte counter
  bytesRead = 0;

  // read next byte from eeprom
  ch = EEPROM.read(addr + bytesRead);

  // store it into the user buffer
  buffer[bytesRead] = ch;

  // increment byte counter
  bytesRead++;

  // stop conditions:
  // - the character just read is the string terminator one (0x00)
  // - we have filled the user buffer
  // - we have reached the last eeprom address
  while ( (ch != 0x00) && (bytesRead < bufSize) && ((addr + bytesRead) <= EEPROM_MAX_ADDR) ) {
    // if no stop condition is met, read the next byte from eeprom
    ch = EEPROM.read(addr + bytesRead);

    // store it into the user buffer
    buffer[bytesRead] = ch;

    // increment byte counter
    bytesRead++;
  }

  // make sure the user buffer has a string terminator
  // (0x00) as its last byte
  if ((ch != 0x00) && (bytesRead >= 1)) {
    buffer[bytesRead - 1] = 0;
  }

  return true;
}


//
// A pair of functions to show how long it takes to work with eeprom.
//
int start_time;
int stop_time;

void start_timing() {
  start_time = millis();
}

void print_elapsed() {
  stop_time = millis();
  Serial.print("Time elapsed (ms): ");
  Serial.println(stop_time - start_time);
}


//
// SETUP
//

const int BUFSIZE = 50;
char buf[BUFSIZE];

void setup() {
  int i;

  Serial.begin(115200);

  Serial.println("Erasing eeprom...");
  start_timing();
  eeprom_erase_all();
  print_elapsed(),

  delay(1000);

  Serial.println("Dumping eeprom contents...");
  eeprom_serial_dump_table();

  delay(1000);

  strcpy(buf, "Arduino eeprom utility functions.");
  Serial.println("Saving string to eeprom...");
  start_timing();
  eeprom_write_string(100, buf);
  print_elapsed();

  delay(1000);

  Serial.println("Dumping eeprom contents...");
  eeprom_serial_dump_table();

  delay(1000);
  // erase buffer
  for (i = 0; i < BUFSIZE; i++) {
    buf[i] = 0;
  }

  Serial.println("Reading string from eeprom...");
  start_timing();
  eeprom_read_string(100, buf, BUFSIZE);
  print_elapsed();
  Serial.print("String read: '");
  Serial.print(buf);
  Serial.println("'");
}


//
// LOOP
//
void loop() {
}
http://playground.arduino.cc/Code/EepromUtil

Wissen ist das einzige Gut das sich vermehrt, wenn man es teilt...
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren
25.03.2013, 13:16 (Dieser Beitrag wurde zuletzt bearbeitet: 25.03.2013 13:21 von milito.)
Beitrag #3
RE: Daten in EEPROM speichern und auslesen
Hi danke dir, werde es ausprobieren.
Wenn ich soweit bin melde ich mich, wäre es ok?

(25.03.2013 12:42)derdemo schrieb:  Hi,

ggf. hilft dir das hier weiter ? Smile

https://github.com/quarterturn/serialMultiMessages


Code:
//
// EEPROM utility functions with usage example
//
// This example defines some utility functions
// to write byte arrays, integers and strings
// to eeprom and read them back.
//
// Some usage examples are provided.


#include <EEPROM.h>


//
// Absolute min and max eeprom addresses.
// Actual values are hardware-dependent.
//
// These values can be changed e.g. to protect
// eeprom cells outside this range.
//
const int EEPROM_MIN_ADDR = 0;
const int EEPROM_MAX_ADDR = 511;


//
// Initialize eeprom memory with
// the specified byte.
// Default value is 0xFF.
//
void eeprom_erase_all(byte b = 0xFF) {
  int i;

  for (i = EEPROM_MIN_ADDR; i <= EEPROM_MAX_ADDR; i++) {
    EEPROM.write(i, b);
  }
}


//
// Dump eeprom memory contents over serial port.
// For each byte, address and value are written.
//
void eeprom_serial_dump_column() {
  // counter
  int i;

  // byte read from eeprom
  byte b;

  // buffer used by sprintf
  char buf[10];

  for (i = EEPROM_MIN_ADDR; i <= EEPROM_MAX_ADDR; i++) {
    b = EEPROM.read(i);
    sprintf(buf, "%03X: %02X", i, b);
    Serial.println(buf);
  }
}


//
// Dump eeprom memory contents over serial port in tabular form.
// Each printed row shows the value of bytesPerRow bytes
// (by default 16).
//
void eeprom_serial_dump_table(int bytesPerRow = 16) {
  // address counter
  int i;

  // row bytes counter
  int j;

  // byte read from eeprom
  byte b;

  // temporary buffer for sprintf
  char buf[10];


  // initialize row counter
  j = 0;

  // go from first to last eeprom address
  for (i = EEPROM_MIN_ADDR; i <= EEPROM_MAX_ADDR; i++) {

    // if this is the first byte of the row,
    // start row by printing the byte address
    if (j == 0) {
      sprintf(buf, "%03X: ", i);
      Serial.print(buf);
    }

    // read current byte from eeprom
    b = EEPROM.read(i);

    // write byte in hex form
    sprintf(buf, "%02X ", b);

    // increment row counter
    j++;

    // if this is the last byte of the row,
    // reset row counter and use println()
    // to start a new line
    if (j == bytesPerRow) {
      j = 0;
      Serial.println(buf);
    }
    // else just print the hex value with print()
    else {
      Serial.print(buf);
    }
  }
}


//
// Returns true if the address is between the
// minimum and maximum allowed values,
// false otherwise.
//
// This function is used by the other, higher-level functions
// to prevent bugs and runtime errors due to invalid addresses.
//
boolean eeprom_is_addr_ok(int addr) {
  return ((addr >= EEPROM_MIN_ADDR) && (addr <= EEPROM_MAX_ADDR));
}


//
// Writes a sequence of bytes to eeprom starting at the specified address.
// Returns true if the whole array is successfully written.
// Returns false if the start or end addresses aren't between
// the minimum and maximum allowed values.
// When returning false, nothing gets written to eeprom.
//
boolean eeprom_write_bytes(int startAddr, const byte* array, int numBytes) {
  // counter
  int i;

  // both first byte and last byte addresses must fall within
  // the allowed range  
  if (!eeprom_is_addr_ok(startAddr) || !eeprom_is_addr_ok(startAddr + numBytes)) {
    return false;
  }

  for (i = 0; i < numBytes; i++) {
    EEPROM.write(startAddr + i, array[i]);
  }

  return true;
}


//
// Reads the specified number of bytes from the specified address into the provided buffer.
// Returns true if all the bytes are successfully read.
// Returns false if the star or end addresses aren't between
// the minimum and maximum allowed values.
// When returning false, the provided array is untouched.
//
// Note: the caller must ensure that array[] has enough space
// to store at most numBytes bytes.
//
boolean eeprom_read_bytes(int startAddr, byte array[], int numBytes) {
  int i;

  // both first byte and last byte addresses must fall within
  // the allowed range  
  if (!eeprom_is_addr_ok(startAddr) || !eeprom_is_addr_ok(startAddr + numBytes)) {
    return false;
  }

  for (i = 0; i < numBytes; i++) {
    array[i] = EEPROM.read(startAddr + i);
  }

  return true;
}


//
// Writes an int variable at the specified address.
// Returns true if the variable value is successfully written.
// Returns false if the specified address is outside the
// allowed range or too close to the maximum value
// to store all of the bytes (an int variable requires
// more than one byte).
//
boolean eeprom_write_int(int addr, int value) {
  byte *ptr;

  ptr = (byte*)&value;
  return eeprom_write_bytes(addr, ptr, sizeof(value));
}


//
// Reads an integer value at the specified address.
// Returns true if the variable is successfully read.
// Returns false if the specified address is outside the
// allowed range or too close to the maximum vlaue
// to hold all of the bytes (an int variable requires
// more than one byte).
//
boolean eeprom_read_int(int addr, int* value) {
  return eeprom_read_bytes(addr, (byte*)value, sizeof(int));
}


//
// Writes a string starting at the specified address.
// Returns true if the whole string is successfully written.
// Returns false if the address of one or more bytes
// fall outside the allowed range.
// If false is returned, nothing gets written to the eeprom.
//
boolean eeprom_write_string(int addr, const char* string) {
  // actual number of bytes to be written
  int numBytes;

  // we'll need to write the string contents
  // plus the string terminator byte (0x00)
  numBytes = strlen(string) + 1;

  return eeprom_write_bytes(addr, (const byte*)string, numBytes);
}


//
// Reads a string starting from the specified address.
// Returns true if at least one byte (even only the
// string terminator one) is read.
// Returns false if the start address falls outside
// or declare buffer size os zero.
// the allowed range.
// The reading might stop for several reasons:
// - no more space in the provided buffer
// - last eeprom address reached
// - string terminator byte (0x00) encountered.
// The last condition is what should normally occur.
//
boolean eeprom_read_string(int addr, char* buffer, int bufSize) {
  // byte read from eeprom
  byte ch;

  // number of bytes read so far
  int bytesRead;

  // check start address
  if (!eeprom_is_addr_ok(addr)) {
    return false;
  }

  // how can we store bytes in an empty buffer ?
  if (bufSize == 0) {
    return false;
  }

  // is there is room for the string terminator only,
  // no reason to go further
  if (bufSize == 1) {
    buffer[0] = 0;
    return true;
  }

  // initialize byte counter
  bytesRead = 0;

  // read next byte from eeprom
  ch = EEPROM.read(addr + bytesRead);

  // store it into the user buffer
  buffer[bytesRead] = ch;

  // increment byte counter
  bytesRead++;

  // stop conditions:
  // - the character just read is the string terminator one (0x00)
  // - we have filled the user buffer
  // - we have reached the last eeprom address
  while ( (ch != 0x00) && (bytesRead < bufSize) && ((addr + bytesRead) <= EEPROM_MAX_ADDR) ) {
    // if no stop condition is met, read the next byte from eeprom
    ch = EEPROM.read(addr + bytesRead);

    // store it into the user buffer
    buffer[bytesRead] = ch;

    // increment byte counter
    bytesRead++;
  }

  // make sure the user buffer has a string terminator
  // (0x00) as its last byte
  if ((ch != 0x00) && (bytesRead >= 1)) {
    buffer[bytesRead - 1] = 0;
  }

  return true;
}


//
// A pair of functions to show how long it takes to work with eeprom.
//
int start_time;
int stop_time;

void start_timing() {
  start_time = millis();
}

void print_elapsed() {
  stop_time = millis();
  Serial.print("Time elapsed (ms): ");
  Serial.println(stop_time - start_time);
}


//
// SETUP
//

const int BUFSIZE = 50;
char buf[BUFSIZE];

void setup() {
  int i;

  Serial.begin(115200);

  Serial.println("Erasing eeprom...");
  start_timing();
  eeprom_erase_all();
  print_elapsed(),

  delay(1000);

  Serial.println("Dumping eeprom contents...");
  eeprom_serial_dump_table();

  delay(1000);

  strcpy(buf, "Arduino eeprom utility functions.");
  Serial.println("Saving string to eeprom...");
  start_timing();
  eeprom_write_string(100, buf);
  print_elapsed();

  delay(1000);

  Serial.println("Dumping eeprom contents...");
  eeprom_serial_dump_table();

  delay(1000);
  // erase buffer
  for (i = 0; i < BUFSIZE; i++) {
    buf[i] = 0;
  }

  Serial.println("Reading string from eeprom...");
  start_timing();
  eeprom_read_string(100, buf, BUFSIZE);
  print_elapsed();
  Serial.print("String read: '");
  Serial.print(buf);
  Serial.println("'");
}


//
// LOOP
//
void loop() {
}
http://playground.arduino.cc/Code/EepromUtil

Danke für die 2 beispiele Big Grin.
Melde mich wenn ich fragen habe, wäre es ok für dich?
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren
08.04.2013, 12:01
Beitrag #4
RE: Daten in EEPROM speichern und auslesen
Hallo,

vielen Dank "derdemo" für diesen hilfreichen code. Ich suche schon so lang nach etwas vergleichbarem.
Ich bin Anfänger was c betrifft und mich würde interessieren wie ich ein Byte bei 0 im eeprom speichern kann um anschließend abzufragen ob der Wert an dieser Stelle z.B. 1 ist. Wenn diese 1 ist dann sollen meine Strings nicht gespeichert werden, ansonsten sollen diese im eeprom abgelegt werden.

Ich habe es mit den Funktionen eeprom_write_bytes und eeprom_read_bytes versucht nur komme ich irgendwie noch nicht ganz so klar mit der Struktur, bzw. den Zeigern.

Ich würde mich riesig freuen wenn einer einen Tipp diesbezüglich für mich hätte.

Vielen Dank.
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren
08.04.2013, 14:54
Beitrag #5
RE: Daten in EEPROM speichern und auslesen
Ok meine letzte Frage hat sich erledigt. Ich mache es jetzt einfach so.

Code:
int val = EEPROM.read(0);
if(val == 1)
{

}
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren
Antwort schreiben 


Möglicherweise verwandte Themen...
Thema: Verfasser Antworten: Ansichten: Letzter Beitrag
  Mit dem Arduino JSON Webseiten auslesen seb201 3 95 05.12.2016 22:25
Letzter Beitrag: Tommy56
  Daten Visualisieren MeisterQ 12 574 01.12.2016 19:36
Letzter Beitrag: MeisterQ
  Data Logger Daten auf SD Card schreiben Crichton 12 310 22.11.2016 18:32
Letzter Beitrag: Crichton
  Messchieber auslesen mit nem UNO roadcaptain 8 311 15.11.2016 14:30
Letzter Beitrag: Tommy56
  U-blox Neo 6M GPS auslesen Matthias_Arduino 15 876 09.11.2016 16:40
Letzter Beitrag: AvrRobot
  I2C Daten übertragen Gandalf 3 216 04.11.2016 13:20
Letzter Beitrag: hotsystems
  Daten über USB verarbeiten Felix91 10 326 12.10.2016 13:00
Letzter Beitrag: Tommy56
  Can-Bus Shield ok, aber keine Daten Clubsport 38 1.540 01.09.2016 14:17
Letzter Beitrag: Clubsport
  Fehler beim Speichern von Projekten Manni66 16 688 23.08.2016 10:05
Letzter Beitrag: hotsystems
  mit Attiny85 Feuchtigkeitssensor auslesen toto1975 17 578 19.08.2016 22:40
Letzter Beitrag: hotsystems

Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste