Skip to content

Commit 021f0fa

Browse files
committed
Initial commit
1 parent c36ca16 commit 021f0fa

File tree

4 files changed

+47
-22
lines changed

4 files changed

+47
-22
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
SparkFun MS5637 Barometric Pressure Library
1+
SparkFun VCNL4040 Proximity Sensor Library
22
===========================================================
33

4-
![SparkFun Pressure Sensor (Qwiic) - MS5637](https://cdn.sparkfun.com//assets/parts/1/2/8/9/3/14688-Pressure_Sensor__Qwiic__-_MS5637-01.jpg)
4+
![SparkFun Proximity Sensor (Qwiic) - VCNL4040](https://cdn.sparkfun.com//assets/parts/1/2/8/9/5/14690-Qwiic_Distance_20cm__Qwiic__-_VCNL4040-01.jpg)
55

6-
[*SparkX Pressure Sensor (Qwiic) - MS5637 (SPX-14688)*](https://www.sparkfun.com/products/14688)
7-
8-
MEMs based barometric pressure sensors are quite common these days. The Qwiic Pressure Sensor with the MS5637 shines by being the most sensitive barometric pressure sensor we have come across. It is capable of detecting the difference in 13cm of air! And the MS5637 is low cost and easy to use.
9-
10-
The Qwiic Pressure Sensor for the MS5637 is a very sensitive, fully calibrated, low power, easy to use barometric pressure sensor capable of detecting a change of as little as 13cm of air! The Qwiic Pressure Sensor is perfect for home weather stations, detecting changes in altitude, and pneumatic based switches or actuators.
11-
12-
The original manufacturer TE has written a great Arduino library for the device. We've added a heap of examples and new functions to make the sensor even easier to use. Search the Arduino Library manager for 'SparkFun MS5637' to get the latest library features.
6+
[*SparkX Proximity Sensor (Qwiic) - VCNL4040 (SPX-14690)*](https://www.sparkfun.com/products/14690)
137

8+
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.
9+
1410
Repository Contents
1511
-------------------
1612

library.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name=SparkFun MS5637 Barometric Pressure Library
1+
name=SparkFun VCNL4040 Proximity Sensor Library
22
version=1.0.0
3-
author=TE Connectivity and SparkFun Electronics
3+
author=SparkFun Electronics
44
maintainer=SparkFun Electronics
5-
sentence=Library for the SparkFun Qwiic Pressure Sensor - MS5637
6-
paragraph=The SparkFun breakout board for the MS5637 is a very sensitive, fully calibrated, low power, easy to use barometric pressure sensor capable of detecting a change of as little as 13cm of air! Great for weather sensing and local altimetry projects.
5+
sentence=Library for the SparkFun Qwiic Proximity Sensor 20cm - VCNL4040
6+
paragraph=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.
77
category=Sensors
8-
url=https://github.com/sparkfun/SparkFun_MS5637_Arduino_Library
8+
url=https://github.com/sparkfun/SparkFun_VCNL4040_Arduino_Library
99
architectures=*

src/SparkFun_VCNL4040_Arduino_Library.cpp

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
1+
/*
2+
This is a library written for the VCNL4040 distance sensor.
3+
By Nathan Seidle @ SparkFun Electronics, April 17th, 2018
4+
5+
The VCNL4040 is a simple IR presence and ambient light sensor. This
6+
sensor is excellent for detecting if something has appeared in front
7+
of the sensor. We often see this type of sensor on automatic towel
8+
dispensers, automatic faucets, etc. You can detect objects qualitatively
9+
up to 20cm away. This means you can detect if something is there,
10+
and if it is closer or further away since the last reading, but it's
11+
difficult to say it is 7.2cm away. If you need quantitative distance
12+
readings (for example sensing that an object is 177mm away) check out
13+
the SparkFun Time of Flight (ToF) sensors with mm accuracy.
14+
15+
This library offers the full range of settings for the VCNL4040. Checkout
16+
the various examples provided with the library but also please give the datasheet
17+
a read.
18+
19+
https://github.com/sparkfun/SparkFun_VCNL4040_Arduino_Library
20+
21+
Development environment specifics:
22+
Arduino IDE 1.8.5
23+
24+
SparkFun labored with love to create this code. Feel like supporting open
25+
source hardware? Buy a board from SparkFun!
26+
https://www.sparkfun.com/products/14690
27+
*/
28+
129
#include <Wire.h>
230

331
#include "SparkFun_VCNL4040_Arduino_Library.h"
432

5-
// Constants
6-
733
const uint8_t VCNL4040_ADDR = 0x60; //7-bit unshifted I2C address of VCNL4040
834

935
//Used to select between upper and lower byte of command register

src/SparkFun_VCNL4040_Arduino_Library.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
This is a library written for the VCNL4040 distance sensor.
33
By Nathan Seidle @ SparkFun Electronics, April 17th, 2018
44
5-
The VCNL4040 is a simple IR presence and and ambient light sensor.
6-
You can detect objects qualitatively up to 20cm away. This means you can
7-
detect if something is there, and if it is closer or further away since the
8-
last reading, but it's difficult to say it is 7.2cm away. If you need
9-
quantitative distance readings (for example sensing that an object is 177mm away)
10-
check out the SparkFun Time of Flight (ToF) sensors with mm accuracy.
5+
The VCNL4040 is a simple IR presence and ambient light sensor. This
6+
sensor is excellent for detecting if something has appeared in front
7+
of the sensor. We often see this type of sensor on automatic towel
8+
dispensers, automatic faucets, etc. You can detect objects qualitatively
9+
up to 20cm away. This means you can detect if something is there,
10+
and if it is closer or further away since the last reading, but it's
11+
difficult to say it is 7.2cm away. If you need quantitative distance
12+
readings (for example sensing that an object is 177mm away) check out
13+
the SparkFun Time of Flight (ToF) sensors with mm accuracy.
1114
1215
This library offers the full range of settings for the VCNL4040. Checkout
1316
the various examples provided with the library but also please give the datasheet

0 commit comments

Comments
 (0)