Documentation ¶
Overview ¶
Package arduino implements the arduino board and some peripherals.
Index ¶
Constants ¶
View Source
const SetPowerZeroThreshold = .0001
SetPowerZeroThreshold represents a power below which value attempting to run the motor simply stops it.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Analogs []board.AnalogConfig `json:"analogs,omitempty"` SerialPath string `json:"serial_path"` Attributes config.AttributeMap `json:"attributes,omitempty"` }
A Config describes the configuration of a board and all of its connected parts.
type Encoder ¶
type Encoder struct {
A, B string
generic.Unimplemented
// contains filtered or unexported fields
}
Encoder keeps track of an arduino motor position.
func NewEncoder ¶
func NewEncoder(ctx context.Context, deps registry.Dependencies, config config.Component, logger golog.Logger) (*Encoder, error)
NewEncoder creates a new incremental Encoder.
type EncoderConfig ¶
type EncoderConfig struct { Pins EncoderPins `json:"pins"` BoardName string `json:"board"` MotorName string `json:"motor_name"` }
EncoderConfig describes the config of an arduino Encoder.
type EncoderPins ¶
EncoderPins defines the format the pin config should be in for Encoder.
Click to show internal directories.
Click to hide internal directories.