Documentation ¶
Index ¶
- func ConnectToServer(host string) (net.Conn, error)
- func SendServoPWM(conn net.Conn, pin string, dc uint32) error
- func SendServoPacket(conn net.Conn, p ServoPacket) error
- func SendServoPosition(conn net.Conn, pin string, pos float64) error
- func UpdatePWM(rpi *raspi.Adaptor, p ServoPacket) error
- type ServoPacket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToServer ¶
ConnectToServer is a helper function to connect to server
func SendServoPWM ¶
SendServoPWM sends servo position as PWM duty cycle (microseconds)
func SendServoPacket ¶
func SendServoPacket(conn net.Conn, p ServoPacket) error
SendServoPacket sends a ServoPacket
func SendServoPosition ¶
SendServoPosition sends servo position (0~100%) with presumed endpoint (1.0ms ~ 2.0ms)
Types ¶
type ServoPacket ¶
ServoPacket is a structure used to transfer pin and PWM duty cycle across network
func CreateServoPacket ¶
func CreateServoPacket(pin string, pos float64) (*ServoPacket, error)
CreateServoPacket create a ServoPacket based on pin and position (0~100)
Click to show internal directories.
Click to hide internal directories.