Package me.autobot.code.examples
Class ServoBot
java.lang.Object
me.autobot.lib.robot.Robot
me.autobot.code.examples.ServoBot
- All Implemented Interfaces:
Logger
A bot used to test the Servo class!
-
Constructor Summary
ConstructorsConstructorDescriptionServoBot()
Creates a new SimRobot Not necessary needed, but it's here for the sake of completeness. -
Method Summary
Methods inherited from class me.autobot.lib.robot.Robot
clock, createTelemetryTopics, disableRobot, getDevices, getIdentification, getInstance, getLoopTime, getMotors, getRobotClasses, getRobots, getSensors, getTimeElapsed, pauseRobot, publishStatus, registerAllDevices, removeAllInactiveTelemetryClients, resumeRobot, setLoopTime, setPaused, start, start, startRobot, startSimulation, stop, stopLoop, subscribeToStatus, subscribeToTelemetry, switchDevicesToSimulation
-
Constructor Details
-
ServoBot
public ServoBot()Creates a new SimRobot Not necessary needed, but it's here for the sake of completeness.
-
-
Method Details
-
setup
protected void setup()Creates a new servo at address 0x12, then lets the i2c device know that the servo we're looking for is the one attached to the gpio pin 8. -
loop
protected void loop()Every 100ms, set the speed of the servo to sin(t).
-