Skip to content

blins/c24LC16B

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

this is library for 24LC16B chip for arduino

Sample sketch:

#include <Wire.h>
#include <c24LC16B.h>


c24LC16B memory = c24LC16B();

void setup()
{
  Serial.begin(9600);
  Serial.println("start");
  
  char data[] = "abrakadabra with code for arduino";
  memory.write(0, (byte *)data, sizeof(data));
}

void loop(){
   int addr=0; //first address
   byte b = memory.read_byte(addr); // access the first address from the memory

   while ((b != 0) && (addr < 100)) 
   {
     Serial.print(addr);
     Serial.print(" ");
     Serial.print((char)b); //print content to serial port
     Serial.print(" ");
     Serial.println(b, HEX); //print content to serial port
     addr++; //increase address
     b = memory.read_byte(addr); //access an address from the memory
   }
   //Serial.println(" ");
   delay(12000);

}

About

arduino library for 24LC16B EEPROM memory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published