import "gobot.io/x/gobot/platforms/raspi"
Package raspi contains the Gobot adaptor for the Raspberry Pi.
For further information refer to raspi README: https://github.com/hybridgroup/gobot/blob/master/platforms/raspi/README.md
doc.go pwm_pin.go raspi_adaptor.go raspi_pin_map.go
Adaptor is the Gobot Adaptor for the Raspberry Pi
NewAdaptor creates a Raspi Adaptor
Connect starts connection with board and creates digitalPins and pwmPins adaptor maps
DigitalPin returns matched digitalPin for specified values
DigitalRead reads digital value from pin
DigitalWrite writes digital value to specified pin
Finalize closes connection to board and pins
GetConnection returns an i2c connection to a device on a specified bus. Valid bus number is [0..1] which corresponds to /dev/i2c-0 through /dev/i2c-1.
GetDefaultBus returns the default i2c bus for this platform
func (r *Adaptor) GetSpiConnection(busNum, chipNum, mode, bits int, maxSpeed int64) (connection spi.Connection, err error)
GetSpiConnection returns an spi connection to a device on a specified bus. Valid bus number is [0..1] which corresponds to /dev/spidev0.0 through /dev/spidev0.1.
GetSpiDefaultBits returns the default spi number of bits for this platform.
GetSpiDefaultBus returns the default spi bus for this platform.
GetSpiDefaultChip returns the default spi chip for this platform.
GetSpiDefaultMaxSpeed returns the default spi bus for this platform.
GetSpiDefaultMode returns the default spi mode for this platform.
Name returns the Adaptor's name
PWMPin returns a raspi.PWMPin which provides the sysfs.PWMPinner interface
PwmWrite writes a PWM signal to the specified pin
ServoWrite writes a servo signal to the specified pin
SetName sets the Adaptor's name
type PWMPin struct {
// contains filtered or unexported fields
}
PWMPin is the Raspberry Pi implementation of the PWMPinner interface. It uses Pi Blaster.
NewPwmPin returns a new PWMPin
DutyCycle returns the duty cycle for the pin
Enable enables/disables the PWM pin
Export exports the pin for use by the Raspberry Pi
InvertPolarity does not do anything when using PiBlaster
Period returns the current PWM period for pin
Polarity returns the polarity either normal or inverted
SetDutyCycle writes the duty cycle to the pin
SetPeriod uses PiBlaster setting and cannot be changed once set
Unexport unexports the pin and releases the pin from the operating system
Package raspi imports 12 packages (graph) and is imported by 18 packages. Updated 2020-12-02. Refresh now. Tools for package owners.