func (m *Motion) Equal(r *gobot.Robot) {

	m.arduino = r.Connection("arduino").(*firmata.FirmataAdaptor)
	m.servoY = r.Device("servoY").(*gpio.ServoDriver)
	m.servoX = r.Device("servoX").(*gpio.ServoDriver)
	m.motorL = r.Device("motorL").(*gpio.ServoDriver)
	m.motorR = r.Device("motorR").(*gpio.ServoDriver)
	m.Robot.Robot = r
}
Example #2
0
func resetLeds(robot *gobot.Robot) {
	robot.Device("red").Driver.(*gpio.LedDriver).Off()
	robot.Device("green").Driver.(*gpio.LedDriver).Off()
	robot.Device("blue").Driver.(*gpio.LedDriver).Off()
}
Example #3
0
func turnOn(robot *gobot.Robot, device string) {
	robot.Device(device).Driver.(*gpio.LedDriver).On()
}