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 Encoder ¶ added in v0.0.7
type Encoder struct {
A, B string
generic.Unimplemented
// contains filtered or unexported fields
}
Encoder keeps track of an arduino motor position.
func NewEncoder ¶ added in v0.0.7
func NewEncoder(ctx context.Context, deps registry.Dependencies, config config.Component, logger golog.Logger) (*Encoder, error)
NewEncoder creates a new HallEncoder.
func (*Encoder) GetTicksCount ¶ added in v0.0.7
GetTicksCount returns number of ticks since last zeroing.
type EncoderConfig ¶ added in v0.0.7
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 ¶ added in v0.0.7
EncoderPins defines the format the pin config should be in for Encoder.
Click to show internal directories.
Click to hide internal directories.