GrovePi Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create a GrovePi class
public class GrovePi : IDisposable
type GrovePi = class
interface IDisposable
Public Class GrovePi
Implements IDisposable
- Inheritance
-
GrovePi
- Implements
Constructors
GrovePi(I2cDevice, Boolean) |
GrovePi constructor |
Fields
DefaultI2cAddress |
The default GrovePi I2C address is 0x04 Other addresses can be use, see GrovePi documentation |
Properties
GrovePiInfo |
Contains the GrovePi key information |
MaxAdc |
The maximum ADC, 10 bit so 1023 on GrovePi |
Methods
AnalogRead(GrovePort) |
Read an analog value on a pin, equivalent of analogRead on Arduino |
AnalogWrite(GrovePort, Byte) |
Write an analog pin (PWM pin), equivalent of analogWrite on Arduino |
DigitalRead(GrovePort) |
Read a digital pin, equivalent of digitalRead on Arduino |
DigitalWrite(GrovePort, PinValue) |
Write a digital pin, equivalent of digitalWrite on Arduino |
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
GetFirmwareVerion() |
Get the firmware version |
GetFirmwareVersion() |
Get the firmware version |
PinMode(GrovePort, PinMode) |
Setup the pin mode, equivalent of pinMod on Arduino |
ReadCommand(GrovePiCommand, GrovePort) |
Read data from GrovePi |
WriteCommand(GrovePiCommand, GrovePort, Byte, Byte) |
Write a GrovePi command |