NCIR Unit
Support the following products:
Micropython Example:
import os, sys, io
import M5
from M5 import *
from hardware import *
from unit import *
i2c0 = None
ncir_0 = None
def setup():
global i2c0, ncir_0
i2c0 = I2C(0, scl=Pin(1), sda=Pin(2), freq=100000)
ncir_0 = NCIRUnit(i2c0)
M5.begin()
Widgets.fillScreen(0x222222)
print(ncir_0.get_ambient_temperature())
print(ncir_0.get_object_temperature())
UIFLOW2 Example:
class NCIRUnit
Constructors
- class NCIRUnit(i2c)
Create an NCIRUnit object.
- The parameters is:
i2c
Define the i2c pin.
UIFLOW2:
Methods
- ncir.get_ambient_temperature()
Obtain the ambient temperature.
UIFLOW2:
- ncir.get_object_temperature()
Get the temperature of the measured object.
UIFLOW2: