Dear Netduino Community,
I'm having a hard time writing this I2C driver. I've looked through a number of tutorials/examples, but everything I try always throws a System.ArgumentException, without much information.
I'm trying to get this little proximity/ambient light sensor up and running with a Netduino Plus 2:
http://www.adafruit....ts/vcnl4000.pdf
The important bit in that data sheet is probably the example application:
Addressing:command: 26h, 85h (VCNL4000_I2C_Bus_Write_Adr., Ambient Light Result Register #5 [85]) Read register #5:command: 27h, data (VCNL4000_I2C_Bus_Read_Adr., {High Byte Data of Ambient Light Result Register #5 [85])} Read register #6:command: 27h, data (VCNL4000_I2C_Bus_Read_Adr., {Low Byte Data of Ambient Light Result Register #6 [86])}
I can't find any other netduino I2C examples that are remotely similar. I would really appreciate any advice! Maybe if someone can help me figure out the most basic example of reading command register #1 (product ID), that would give me a huge step in the right direction.
I've attached a VS project if anyone cares to check it out.
Thank you for your time!