1234567891011121314151617181920212223242526 |
- void initSoundPin()
- {
- pinMode(SOUND_PIN, OUTPUT);
- }
- void basePowerOnBeep()
- {
- for (int i = 200; i <= 600; i++)
- {
- tone(SOUND_PIN, i);
- delay(3);
- }
- noTone(SOUND_PIN);
- }
- void basePowerOffBeep()
- {
- for (int i = 600; i >= 200; i--)
- {
- tone(SOUND_PIN, i);
- delay(3);
- }
- noTone(SOUND_PIN);
- }
|