Skip to content

An Arduino library for the VCNL4040, a simple IR presence and ambient light sensor, excellent for detecting if something has appeared within 20cm in front of the sensor.

License

Notifications You must be signed in to change notification settings

sparkfun/SparkFun_VCNL4040_Arduino_Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SparkFun VCNL4040 Proximity Sensor Library

SparkFun Proximity Sensor (Qwiic) - VCNL4040

SparkFun Proximity Sensor Breakout - 20cm, VCNL4040 (Qwiic) (SEN-15177)

The VCNL4040 is a simple IR presence and ambient light sensor. This sensor is excellent for detecting if something has appeared in front of the sensor. We often see this type of sensor on automatic towel dispensers, automatic faucets, etc. You can detect objects qualitatively up to 20cm away. This means you can detect if something is there, and if it is closer or further away since the last reading, but it's difficult to say it is 7.2cm away. If you need quantitative distance readings (for example sensing that an object is 177mm away) check out the SparkFun Time of Flight (ToF) sensors with mm accuracy.

Repository Contents

  • /examples - Example sketches for the library (.ino). Run these from the Arduino IDE.
  • /src - Source files for the library (.cpp, .h).
  • keywords.txt - Keywords from this library that will be highlighted in the Arduino IDE.
  • library.properties - General library properties for the Arduino package manager.

Documentation

License Information

This product is open source!

Please use, reuse, and modify these files as you see fit. Please maintain attribution to SparkFun Electronics and release anything derivative under the same license.

Distributed as-is; no warranty is given.

  • Your friends at SparkFun.

About

An Arduino library for the VCNL4040, a simple IR presence and ambient light sensor, excellent for detecting if something has appeared within 20cm in front of the sensor.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages