set_speaker(block_value)
Description
Sets the frequency and volume of the Speaker Cubelet's beeps.
Parameters
block_value The value to set the speaker to. A number 0-255.
Compatibility
Speaker Blocks
Example
void setup()
{
}
void loop()
{
think();
act();
}
void think()
{
block_value = weighted_average(neighbor_data);
}
void act()
{
set_speaker(block_value);
}