Skip to content

The gator:environment is an I2C sensor capable of reading temperature, pressure, humidity, equivalent CO2, and total Volatile Organic Compounds.

License

Notifications You must be signed in to change notification settings

sparkfun/pxt-gator-environment

Repository files navigation

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 SparkFun gator:environment micro:bit Accessory Board utilizes the popular CCS811 and BME280 ICs to take care of all of your environmental readings of atmospheric quality. This sensor board can provide a variety of environmental data, including barometric pressure, humidity, temperature, equivalent TVOCs and equivalent CO2 (or eCO2) levels. The gator:environment connects to the SparkFun gator:bit via alligator-clip cables, allowing for easy access to the micro:bit's I2C pins. SparkFun gator:environment

~ hint

To use this package, go to https://makecode.microbit.org, click Add package and search for gator-environment. 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 measurement to grab data from any of the sensors channels.
gatorEnvironment.measurement(MeasurementType.degreesC)

Use ||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.measurement(MeasurementType.degreesC))
})

Supported targets

  • for PXT/microbit

License

MIT

gatorEnvironment=github:sparkfun/pxt-gator-environment

About

The gator:environment is an I2C sensor capable of reading temperature, pressure, humidity, equivalent CO2, and total Volatile Organic Compounds.

Resources

License

Stars

Watchers

Forks

Packages

No packages published