Documentation ¶
Index ¶
- Constants
- type LSM6DS3
- func (lsm6ds3 *LSM6DS3) Init(i2c *i2c.I2C, options *LSM6DS3Options) (*LSM6DS3, error)
- func (lsm6ds3 *LSM6DS3) Name() string
- func (lsm6ds3 *LSM6DS3) ReadAccelerationData() (LSM6DS3Data, error)
- func (lsm6ds3 *LSM6DS3) ReadData() (LSM6DS3Data, LSM6DS3Data, float32, error)
- func (lsm6ds3 *LSM6DS3) ReadGyroData() (LSM6DS3Data, error)
- func (lsm6ds3 *LSM6DS3) ReadTemperatureData() (float32, error)
- type LSM6DS3Data
- type LSM6DS3Options
- type PCA9685
- func (pca9685 *PCA9685) GetFreq() float32
- func (pca9685 *PCA9685) GetOptions() *PCA9685Options
- func (pca9685 *PCA9685) Init(i2c *i2c.I2C, options *PCA9685Options) (*PCA9685, error)
- func (pca9685 *PCA9685) Name() string
- func (pca9685 *PCA9685) Reset() error
- func (pca9685 *PCA9685) SetChannel(chn, on, off int) error
- func (pca9685 *PCA9685) SetFreq(freq float32) error
- type PCA9685Options
- type SSD1306
- func (ssd1306 *SSD1306) BufferSize() int
- func (ssd1306 *SSD1306) Clear()
- func (ssd1306 *SSD1306) Display() error
- func (ssd1306 *SSD1306) GetOptions() *SSD1306Options
- func (ssd1306 *SSD1306) Init(i2c *i2c.I2C, options *SSD1306Options) (*SSD1306, error)
- func (ssd1306 *SSD1306) Off() error
- func (ssd1306 *SSD1306) On() error
- func (ssd1306 *SSD1306) Reset() error
- func (ssd1306 *SSD1306) SetBDisplayBuffer(buf []byte)
- func (ssd1306 *SSD1306) SetContrast(contrast byte) error
- func (ssd1306 *SSD1306) SetPixel(x, y, c int)
- func (ssd1306 *SSD1306) ShowImage(img image.Image) (err error)
- type SSD1306Init
- type SSD1306Options
Constants ¶
View Source
const DefaultLSM6DS3Address = 0x6b
View Source
const DefaultPCA9685Address = 0x40
View Source
const DefaultSSD1306Address = 0x3c
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LSM6DS3 ¶
type LSM6DS3 struct {
// contains filtered or unexported fields
}
LSM6DS3 is a Driver for the LSM6DS3 6-axis Accelerometer Gyroscope Sensor
func (*LSM6DS3) ReadAccelerationData ¶
func (lsm6ds3 *LSM6DS3) ReadAccelerationData() (LSM6DS3Data, error)
func (*LSM6DS3) ReadData ¶
func (lsm6ds3 *LSM6DS3) ReadData() (LSM6DS3Data, LSM6DS3Data, float32, error)
func (*LSM6DS3) ReadGyroData ¶
func (lsm6ds3 *LSM6DS3) ReadGyroData() (LSM6DS3Data, error)
func (*LSM6DS3) ReadTemperatureData ¶
type LSM6DS3Data ¶
type LSM6DS3Options ¶
LSM6DS3Options for controller
type PCA9685 ¶
type PCA9685 struct {
// contains filtered or unexported fields
}
PCA9685 is a Driver for the PCA9685 16-channel 12-bit PWM/Servo controller
func (*PCA9685) GetOptions ¶
func (pca9685 *PCA9685) GetOptions() *PCA9685Options
func (*PCA9685) SetChannel ¶
SetChannel sets a single PWM channel
type PCA9685Options ¶
type PCA9685Options struct { Name string StepCount float32 Frequency float32 ClockSpeed float32 Mode1 byte PreScale byte Led0On byte }
PCA9685Options for controller
type SSD1306 ¶
type SSD1306 struct {
// contains filtered or unexported fields
}
SSD1306 is a Driver for the PCA9685 16-channel 12-bit PWM/Servo controller
func (*SSD1306) BufferSize ¶
BufferSize returns the memory size of the display buffer.
func (*SSD1306) GetOptions ¶
func (ssd1306 *SSD1306) GetOptions() *SSD1306Options
func (*SSD1306) SetBDisplayBuffer ¶
SetBDisplayBuffer the display buffer to a byte array
func (*SSD1306) SetContrast ¶
type SSD1306Init ¶
type SSD1306Init struct {
// contains filtered or unexported fields
}
func (*SSD1306Init) GetSequence ¶
func (ssd1306Init *SSD1306Init) GetSequence(screenFlipped bool) []byte
func (*SSD1306Init) Init128X32 ¶
func (ssd1306Init *SSD1306Init) Init128X32() *SSD1306Init
func (*SSD1306Init) Init128X64 ¶
func (ssd1306Init *SSD1306Init) Init128X64() *SSD1306Init
func (*SSD1306Init) Init96X16 ¶
func (ssd1306Init *SSD1306Init) Init96X16() *SSD1306Init
Click to show internal directories.
Click to hide internal directories.