Hi..!!
I am sending data(CSP header) as 0x50,0x46,0x00,0x00 to Gomspace Camera Nanocam C1 U(I2C address is 0x06) and I am expecting 50 bytes of data, but I am getting 0xFFFFFFFF. Is it happening due to frequency synchronization or any other hardware problem.
#include <Wire.h>
void setup()
{Wire.begin();
Serial.begin(9600);
}
void loop()
{int rtrn;
int outgoingByte[] = {0x50};
int outgoingByte1[] = {0x46};
int outgoingByte2[] = {0x00};
int outgoingByte3[] = {0x00};
//For payload camera
Wire.beginTransmission(0X06);
{Wire.write(outgoingByte[0]);
Wire.write(outgoingByte1[0]);
Wire.write(outgoingByte2[0]);
Wire.write(outgoingByte3[0]);
rtrn = Wire.endTransmission();}
delay(1);
Wire.requestFrom(0X06, 50);
while(!Wire.available());
{char c = Wire.read();
Serial.println(" Returning Success on Writing to the Payload::");
Serial.println(rtrn,DEC);
Serial.println("Data read from Gomspace Camera:");
Serial.println(c,HEX);
Serial.println(c,BIN);}
delay(1);
Serial.println(' ');
Serial.println(' '); }
hgh.bmp (2.99 MB)