Kód: Egész kijelölése
void setup()
{
Wire.begin();
}
byte x = 0;
void loop()
{
Wire.beginTransmission(78);
Wire.write(x);
Wire.endTransmission();
x++;
delay(500);
}Kód: Egész kijelölése
$regfile = "m328pdef.dat"
$crystal = 16000000
Config Sda = Portc.4
Config Scl = Portc.5
Config I2cdelay = 10
Dim Address As Byte
Dim Dats As Byte
Address = 78
X = 0
Do
I2cstart
I2cwbyte Address
I2cwbyte X
I2cstop
Incr X
Waitms 500
Loop
EndElőre is köszi!
