Class ServoBot

java.lang.Object
me.autobot.lib.robot.Robot
me.autobot.code.examples.ServoBot
All Implemented Interfaces:
Logger

public class ServoBot extends Robot
A bot used to test the Servo class!
  • 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.
      Overrides:
      setup in class Robot
    • loop

      protected void loop()
      Every 100ms, set the speed of the servo to sin(t).
      Overrides:
      loop in class Robot