set_drive(block_value)
Description
Sets how fast the wheels of a Drive Cubelet move. The higher the value, the faster the Cubelet will move.
Parameters
block_value The value to set the drive motor to. A number 0-255.
Compatibility
Drive Blocks
Example
void setup()
{
}
void loop()
{
think();
act();
}
void think()
{
block_value = weighted_average(neighbor_data);
}
void act()
{
set_drive(block_value);
}