Hey Folks,
Does anybody have any info regarding their experience trying to get the ar1000 working with arduino’s wire library? I’ve been trying to deconstruct the avr example code as I also try to make sense of the datasheet (has anyone seen the register map?). I can post code if anyone wants to take a look. Wondering also if anyone has experience with receiver modules by other manufacturers. Any and all info would be helpful.
Best,
~GM~
Here’s a snippet of code attempting to initialize the receiver. This is the first time I’ve used the wire library, so please let me know if you see glaring errors.
#include <Wire.h>
byte lbyte=0;
byte hbyte=0;
void setup(){
delay(3000);
int regval[18]={0xFFFF,0x5b15,0xf4b9,0x8012,0x0400,0x28aa,0x4400,0x1ee7,0x7141,0x007d,0x82ce,0x4f55,0x970c,0xb845,0xfc2d,0x8097,0x04a1,0xdf6a};
Serial.begin(9600);
Wire.begin();
Wire.beginTransmission(0x10);
for(int i=1; i<18; i++){
hbyte=regval[i]>>8;
lbyte=regval[i]&0x00ff;
Wire.send(byte(i));
Wire.send(hbyte);
Wire.send(lbyte);
}
Wire.send(byte(0));
hbyte=regval[0]>>8;
lbyte=regval[0]&0x00ff;
Wire.send(hbyte);
Wire.send(lbyte);
Wire.endTransmission();
}
void loop(){
digitalWrite(13,HIGH);
delay(100);
digitalWrite(13,LOW);
delay(100);
}