Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

pajama

Member Since 08 Apr 2015
Offline Last Active Apr 20 2015 12:54 AM
-----

Topics I've Started

Netduino + 2 I2C with VNCL4000 Proximity Sensor

14 April 2015 - 12:18 AM

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!


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.