#include "Eeprom24Cxx.h"
// #include <SoftwareSerial.h>
unsigned int ppm;
int diachi = 0;
int cnt = 0;
void setup(){
Serial.begin(9600);
}
void loop(){
ppm = random(0, 2000);
AVR_EEPROM.write_2_byte(diachi, ppm);
Serial.print("Gia tri ppm ");
Serial.print(cnt);
Serial.print(": ");
Serial.println(AVR_EEPROM.read_2_byte(diachi));
diachi = diachi + 4;
cnt++;
if(cnt > 5){
diachi = 0;
cnt = 0;
for(int i = 0; i < 100; i++)
AVR_EEPROM.write_2_byte(i, 0);
}
delay(1000);
}