/pxt-qwiicEnvironment

qwiic Environ combo package for makeCode

Primary LanguageC++MIT LicenseMIT

gator:environment Temperature, Pressure, Humidity, CO2 and TVOC Sensor

Community Discord

The gator:environment, capable of reading several qualities about the air can be purchased here. The gator:light, included on the gator:starter is an analog light sensor that can be alligator clipped to the micro:bit or gator:bit board.

SparkFun gator:light

~ hint

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

~

Basic usage

//Initializes our environmental sensor so we can get data from it.
gatorEnvironment.beginEnvironment()

Use ||Use Initialize gator:Environment sensors|| to initialize the sensors on the gator:Environment board.

//Use getMeasurement to grab data from any of the sensors channels.
gatorEnvironment.getMeasurement(measurementType.degreesC)

Use ||Get degreesC value|| to grab values from the board. Changing what value you want is as easy as selecting it from the drop down menu.

Example: Thermometer

//Read degrees celsius and write it to the micro:bit screen as a number
gatorEnvironment.beginEnvironment()
basic.forever(function () {
    serial.writeLine("" + gatorEnvironment.getMeasurement(measurementType.degreesC))
})

Supported targets

  • for PXT/microbit

License

MIT

gatorParticle=github:sparkfun/pxt-gator-particle