Leong Kum Loong (NYP) / tone_h

Dependents:   Tone_Example

tone.h

Committer:
reesey
Date:
2017-11-20
Revision:
3:9ddabd24f48c
Parent:
1:3b00679c208a

File content as of revision 3:9ddabd24f48c:

/*
    tone.h
    Written by Leong Kum Loong.
    20 Nov 2017, REV. 2
    
    All routines and functions in this library are written by me solely with the purpose
    of implementing an identical "tone" library that was introduced by Arduino IDE.
    
    Example reference from Github
    ===============================
    The mario_example routine "notes" are reference to the work of Gregory Kielian.
    The starwars_example routine "notes" are reference to the work of nicksort.
*/

#ifndef tone_h
#define tone_h
#include "mbed.h"

void tone(int frequency, int duration_ms=0);    //Sound tone at specific frequency of 50% duty cycle and duration(optional).

void noTone();  //Turn off tone.

void mario_example();  

void starwars_example();

#endif