/Designs/duckweed_collector/SW/RF02/RF02.pde
33,7 → 33,7
Serial.println("init" );
rf02_prepAll434();
rf02_prepAll();
Serial.println("done" );
pinMode(4, OUTPUT); //testing leds
48,21 → 48,30
digitalWrite(num, LOW);
delay(100);
}
 
unsigned int ble='a';
 
void loop()
{
// ledBlink(4);
delay(10);
delay(1000);
 
// unsigned char buf[] = { "01234567890123456789012345678901\n" }; // Motor, Rudder
unsigned char buf[] = { "012345678901234567890123456789012345678901234567890123456789" };
unsigned char buf[] = { "0123456789012345678$0123456789" };
 
buf[30]=0;
buf[31]=0xAA;
rf02_changeText( buf, 32);
unsigned char sum=0;
//buf[19]=ble;
for(unsigned int a=0;a<20;a++)
{
sum+=buf[a];
};
if(ble>'z') {ble='a';} else {ble++;}
buf[20]=sum;
buf[21]=0xAA;
buf[22]=0xAA;
rf02_changeText( buf, 23);
 
// rf02_changeText( buf, sizeof buf);
// Serial.println("M0R0\n");