Task 51:
#include
int a = 0;
int value;
void setup()
{
Serial.begin(9600);
}
void loop()
{
value = EEPROM.read(a);
Serial.print(a);
Serial.print("\t");
Serial.print(value);
Serial.println();
a = a + 1;
if (a == 1023)
a = 0;
delay(500);
}
Task 52:
#include
int a = 0;
int value;
void setup()
{
Serial.begin(9600);
EEPROM.write(01, 35);
EEPROM.write(02, 42);
for (int i = 0; i <= 20; i++)
{
value = EEPROM.read(i);
Serial.print(i);
Serial.print("\t");
Serial.print(value);
Serial.println();
}
}
void loop()
{
}
Task 53:
#include
int a = 0;
int value;
void setup()
{
Serial.begin(9600);
for (int i = 1; i <= 1023; i++)
{
EEPROM.write(i, 171);
}
for (int i = 0; i <= 1023; i++)
{
value = EEPROM.read(i);
Serial.print(i);
Serial.print("\t");
Serial.print(value);
Serial.println();
delay(100);
}
}
void loop()
{
}
Monday, June 14, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment