Documentation ¶
Index ¶
- Constants
- type GrovePI
- func (g *GrovePI) Close() error
- func (g *GrovePI) GetValue(pin string) (int, error)
- func (g *GrovePI) Map(virtual string, physical int)
- func (g *GrovePI) Open() (gpiodriver.Conn, error)
- func (g *GrovePI) SetDirection(pin string, dir gpiodriver.Direction) error
- func (g *GrovePI) SetValue(pin string, v int) error
- func (g *GrovePI) Value(pin string) (int, error)
Constants ¶
View Source
const ( A0 = "A0" A1 = "A1" A2 = "A2" D2 = "D2" D3 = "D3" D4 = "D4" D5 = "D5" D6 = "D6" D7 = "D7" D8 = "D8" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrovePI ¶
func (*GrovePI) Map ¶
Map should map a virtual GPIO pin number to a physical pin number. This is also useful to configure driver implementations for boards with different GPIO pin layouts. E.g. GPIO 25 pin on a Raspberry Pi, can be represented by a different physical pin out on a different board.
func (*GrovePI) SetDirection ¶
func (g *GrovePI) SetDirection(pin string, dir gpiodriver.Direction) error
SetDirection sets the direction of the pin.
Click to show internal directories.
Click to hide internal directories.