Skip to content
No description, website, or topics provided.
TypeScript C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
.gitignore
LICENSE
Makefile
README.md
enums.d.ts
gatoruv.cpp
gatoruv.ts
icon.png
pxt.json
shims.d.ts
tsconfig.json

README.md

gator:light Light Sensor

Community Discord

The gator:UV is an ultraviolet light sensor that is gator-clippable to the gator:bit ecosystem

SparkFun gator:UV

~ hint

To use this package, go to https://makecode.microbit.org, click Add package and search for gator-UV. The package is located here

~

Basic usage

//Initializes the sensor to prepare it for readings.
gatorUV.begin()

Use ||initialize gator:UV sensor|| to prepare the gator:UV to take readings.

//Grabs a value from the sensor and writes it out over serial
serial.writeNumber(gatorUV.UV())

Use ||serial write number ||get UVA Reading|| || To grab a UVA reading from the sensor and write it out over serial.

//Changes the integration time for our sensor
gatorUV.setRefreshTime(gatorUVRefreshTime.one)

Use ||set refresh time on UV Sensor to **one**|| to change the time over which a reading is taken on the UV sensor

Example: Light Detector

//Read UV value and write it to the serial port
gatorUV.begin()
basic.forever(function () {
    serial.writeNumber(gatorUV.UV())
})

Supported targets

  • for PXT/microbit

License

MIT

gatorUV=github:sparkfun/pxt-gator-UV
You can’t perform that action at this time.