GroveBaseHat class

Constructors

GroveBaseHat([int i2cBus = 1])

Properties

hashCode int
The hash code for this object.
no setterinherited
i2c I2C
final
i2cBus int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

changeI2Caddress(int newI2Caddress) → void
Changes the I2C address of the hat. NOT TESTED!
getFirmware() int
Returns the firmware version.
getGrovePowerSupplyVoltage() int
Returns the supply voltage.
getId() int
Returns the internal hardware id of the hat. RPI_HAT_PID (0x4) for a 'Grove Base Hat RPi', and RPI_ZERO_HAT_PID (0x05) for a 'Grove Base Hat RPi Zero'.
getName() String
Returns the name of the hat model.
isHatRPiZero() bool
Returns true for the Pi Zero model, false for the Pi model.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readADCraw(int channel) int
Reads the raw data of ADC unit, with 12 bits resolution from the channel 0 - 7 and returns a ADC result in the range 0 - 4095.
readInputVoltage(int channel) int
Reads the voltage data of ADC unit from the channel 0 - 7 and returns the voltage in mV.
readRatio(int channel) int
Reads the ratio between channel input voltage and power voltage (most time it's 3.3V). channel 0 - 7, specify the channel to read, returns the ration in 0.1%.
resetHat() → void
Resets the hat. NOT TESTED!
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited