To use the frequency generation we fist must set the actuator to frequency generator node
(This is the default mode, if you haven't already changed the mode you can skip this step)
actuatorName.setActuatorMode(ARAM_TOGGLE_ACTUATOR_Frequency_Generator);
To make the actuator strike we use the strike command
actuatorName.vibrateAtFrequency(frequencyHz);
frequencyHz determines the note played, set it to different values to hear different notes
To make the actuator stop use
actuatorName.endMovement();
To use advanced features like frequency generation you must include an update function call in the loop
actuatorName.update();
Advanced features like frequency generation require calling the update function in the loop
This system works best when the loop function runs quickly, you should avoid using delay inside the loop.