This is our code:
But were not quite sure exactly how it works since I'm understanding how the charges in the pixels are transferred??
#include<Wire.h>
#define cmosaddress 0xBB
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600); // start serial for output
}
void getcmosdata(byte *a, byte *b){
Wire.beginTransmission(cmosaddress);
Wire.write(0);
Wire.endTransmission();
Wire.requestFrom(cmosaddress, 2);
*a = Wire.read();
*b = Wire.read();
}
void showcmosdata(){
byte aa,bb;
float light = aa;
float light2 = bb;
Serial.print("Voltage=");
Serial.print(light,1);
Serial.print(light2,1);
delay(1000);
}
void loop(){
showcmosdata();
}