Introduction
After following the steps in our previous post
- Search for ClosedCube OPT3002, and install the ClosedCube OPT3002 library
- And a SCL clock wire, and and a SDA data wire.
- (Optional) Change the frequency the sensors are read and advertising data updated, in the code
// How often we read the sensors and update the advertings message
(in seconds)
#define READ_UPDATE_FREQUENCY 5
- Click the Upload button.
Scanning the results
To see the results you can use any BLE scanner app.
Here we use nRF Connect:
The data in the red box is our sensor values:
0x006203EB001700170041
When we parse the hex into decimal values we get:
Light: 0x0062 = 98 uW/cm2
Pressure: 0x03EB = 1003 hPa
Temperature: 0x0017 = 23 Celcius
Humidity: 0x0017 = 23 %Rh
Gas Resistance: 0x0041 = 65 KOhms

SOCIAL SHARE CARD GENERATOR