2016-10-27 15:51:42 +02:00
|
|
|
#include "ksbit.h"
|
|
|
|
|
|
|
|
namespace music {
|
|
|
|
void playTone(int freqency, int ms) {
|
2016-10-27 17:44:38 +02:00
|
|
|
uBit.soundmotor.soundOn(freqency);
|
2016-10-27 15:51:42 +02:00
|
|
|
if(ms > 0) uBit.sleep(ms);
|
2016-10-27 17:44:38 +02:00
|
|
|
uBit.soundmotor.soundOff();
|
2016-10-27 15:51:42 +02:00
|
|
|
}
|
|
|
|
}
|