# README
GPIO
This package provides drivers for General Purpose Input/Output (GPIO) devices. It is normally used by connecting an adaptor such as firmata that supports the needed interfaces for GPIO devices.
Getting Started
Installing
go get -d -u github.com/rich1111/gobot/...
Hardware Support
Gobot has a extensible system for connecting to hardware devices. The following GPIO devices are currently supported: - Button - Buzzer - Direct Pin - Grove Button - Grove Buzzer - Grove LED - Grove Magnetic Switch - Grove Relay - Grove Touch Sensor - LED - Makey Button - Motor - Proximity Infra Red (PIR) Motion Sensor - Relay - RGB LED - Servo - Stepper Motor - TM1638 LED Controller
More drivers are coming soon...
# Functions
NewAIP1640Driver return a new AIP1640Driver given a gobot.Connection and the clock, data and strobe pins.
NewButtonDriver returns a new ButtonDriver with a polling interval of 10 Milliseconds given a DigitalReader and pin.
NewBuzzerDriver return a new BuzzerDriver given a DigitalWriter and pin.
NewDirectPinDriver return a new DirectPinDriver given a Connection and pin.
NewEasyDriver returns a new EasyDriver from SparkFun (https://www.sparkfun.com/products/12779) TODO: Support selecting phase input instead of hard-wiring MS1 and MS2 to board truth table This should also work for the BigEasyDriver (untested) A - DigitalWriter stepPin - Pin corresponding to step input on EasyDriver dirPin - Pin corresponding to dir input on EasyDriver.
NewGroveButtonDriver returns a new GroveButtonDriver with a polling interval of 10 Milliseconds given a DigitalReader and pin.
NewGroveBuzzerDriver return a new GroveBuzzerDriver given a DigitalWriter and pin.
NewGroveLedDriver return a new GroveLedDriver given a DigitalWriter and pin.
NewGroveMagneticSwitchDriver returns a new GroveMagneticSwitchDriver with a polling interval of 10 Milliseconds given a DigitalReader, name and pin.
NewGroveRelayDriver return a new GroveRelayDriver given a DigitalWriter and pin.
NewGroveTouchDriver returns a new GroveTouchDriver with a polling interval of 10 Milliseconds given a DigitalReader and pin.
NewHD44780Driver return a new HD44780Driver a: gobot.Conenction cols: lcd columns rows: lcd rows busMode: 4Bit or 8Bit pinRS: register select pin pinEN: clock enable pin pinDataBits: databit pins.
NewLedDriver return a new LedDriver given a DigitalWriter and pin.
NewMakeyButtonDriver returns a new MakeyButtonDriver with a polling interval of 10 Milliseconds given a DigitalReader and pin.
NewMAX7219Driver return a new MAX7219Driver given a gobot.Connection, pins and how many chips are chained.
NewMotorDriver return a new MotorDriver given a DigitalWriter and pin.
NewPIRMotionDriver returns a new PIRMotionDriver with a polling interval of 10 Milliseconds given a DigitalReader and pin.
NewRelayDriver return a new RelayDriver given a DigitalWriter and pin.
NewRgbLedDriver return a new RgbLedDriver given a DigitalWriter and 3 pins: redPin, greenPin, and bluePin
Adds the following API Commands: "SetRGB" - See RgbLedDriver.SetRGB "Toggle" - See RgbLedDriver.Toggle "On" - See RgbLedDriver.On "Off" - See RgbLedDriver.Off.
NewServoDriver returns a new ServoDriver given a ServoWriter and pin.
NewStepperDriver returns a new StepperDriver given a DigitalWriter Pins - To which the stepper is connected Phase - Defined by StepperModes {SinglePhaseStepping, DualPhaseStepping, HalfStepping} Steps - No of steps per revolution of Stepper motor.
NewTM1638Driver return a new TM1638Driver given a gobot.Connection and the clock, data and strobe pins.
NewTM1638Fonts returns a map with fonts and their corresponding byte for proper representation on the 7-segment LCD.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ButtonPush event.
ButtonRelease event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Data event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Error event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MotionDetected event.
MotionStopped event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Vibration event.
No description provided by the author
# Variables
ErrAnalogReadUnsupported is error resulting when a driver attempts to use hardware capabilities which a connection does not support.
ErrDigitalReadUnsupported is the error resulting when a driver attempts to use hardware capabilities which a connection does not support.
ErrDigitalWriteUnsupported is the error resulting when a driver attempts to use hardware capabilities which a connection does not support.
ErrPwmWriteUnsupported is the error resulting when a driver attempts to use hardware capabilities which a connection does not support.
ErrServoOutOfRange is the error resulting when a driver attempts to use hardware capabilities which a connection does not support.
ErrServoWriteUnsupported is the error resulting when a driver attempts to use hardware capabilities which a connection does not support.
StepperModes to decide on Phase and Stepping.
# Structs
AIP1640Driver is the gobot driver for the AIP1640 LED driver used in the WEMOS D1 mini Matrix LED Shield.
ButtonDriver Represents a digital Button.
BuzzerDriver represents a digital buzzer.
DirectPinDriver represents a GPIO pin.
EasyDriver object.
GroveButtonDriver represents a button sensor with a Grove connector.
GroveBuzzerDriver represents a buzzer with a Grove connector.
GroveLedDriver represents an LED with a Grove connector.
GroveMagneticSwitchDriver represent a magnetic switch sensor with a Grove connector.
GroveRelayDriver represents a Relay with a Grove connector.
GroveTouchDriver represents a touch button sensor with a Grove connector.
databit pins.
HD44780Driver is the gobot driver for the HD44780 LCD controller Datasheet: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf.
LedDriver represents a digital Led.
MakeyButtonDriver Represents a Makey Button.
MAX7219Driver is the gobot driver for the MAX7219 LED driver
Datasheet: https://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf.
MotorDriver Represents a Motor.
PIRMotionDriver represents a digital Proximity Infra Red (PIR) motion detecter.
RelayDriver represents a digital relay.
RgbLedDriver represents a digital RGB Led.
ServoDriver Represents a Servo.
StepperDriver object.
No description provided by the author
# Interfaces
DigitalReader interface represents an Adaptor which has DigitalRead capabilities.
DigitalWriter interface represents an Adaptor which has DigitalWrite capabilities.
PwmWriter interface represents an Adaptor which has Pwm capabilities.
ServoWriter interface represents an Adaptor which has Servo capabilities.
# Type aliases
data bus mode.