Package ollie contains the Gobot driver for the Sphero Ollie.
For more information refer to the Ollie README: https://github.com/hybridgroup/gobot/blob/master/platforms/sphero/ollie/README.md
const ( // SensorData event SensorData = "sensordata" // Collision event Collision = "collision" // Error event Error = "error" // Packet header size PacketHeaderSize = 5 // Response packet max size ResponsePacketMaxSize = 20 // Collision Packet data size: The number of bytes following the DLEN field through the end of the packet CollisionDataSize = 17 // Full size of the collision response CollisionResponseSize = PacketHeaderSize + CollisionDataSize )
DefaultCollisionConfig returns a CollisionConfig with sensible collision defaults
Driver is the Gobot driver for the Sphero Ollie robot
NewDriver creates a Driver for a Sphero Ollie
AntiDOSOff turns off Anti-DOS code so we can control Ollie
Boost executes the boost macro from within the SSB which takes a 1 byte parameter which is either 01h to begin boosting or 00h to stop.
ConfigureCollisionDetection configures the sensitivity of the detection.
Connection returns the connection to this Ollie
EnableStopOnDisconnect auto-sends a Stop command after losing the connection
Halt stops Ollie driver (void)
HandleResponses handles responses returned from Ollie
Init is used to initialize the Ollie
Name returns the name for the Driver
Roll tells the Ollie to roll
SetBackLEDOutput allows you to control the brightness of the back(tail) LED.
SetName sets the Name for the Driver
SetRGB sets the Ollie to the given r, g, and b values
SetRawMotorValues allows you to take over one or both of the motor output values, instead of having the stabilization system control them. Each motor (left and right) requires a mode and a power value from 0-255
SetRotationRate allows you to control the rotation rate that Sphero will use to meet new heading commands. A value of 255 jumps to the maximum (currently 400 degrees/sec). A value of zero doesn't make much sense so it's interpreted as 1, the minimum.
SetStabilization enables or disables the built-in auto stabilizing features of the Ollie
SetTXPower sets transmit level
Sleep says Go to sleep
Start tells driver to get ready to do work
Stop tells the Ollie to stop
Wake wakes Ollie up so we can play
MotorModes required for SetRawMotorValues command