This project shows how to create the DTMF dialer using the CleO primitives and touch subsystem.
This project uses the following component(s) -
•56mm, 80hm 0.5W(RMS) / 1W(Peak) Internal CleO speaker
The Setup() routine initializes CleO and sets the background gradient using the SetBackgroundGradient() command.
Inside the loop routine(), it draws all the button between CleO.Start() and CleO.Show() calls, to construct a frame to be drawn on the screen.
The (x,y) coordinates are controlled by the for loop() and the color of the button (circle) is controlled by the touch (based on tag value).
In the above sample code snippet, each button (Circle) is assigned with a tag using tones character string which holds the value of "123456789*0#".
Initially the loop() routine checks whether the screen is touched and if so, it plays the sound using the tag value. It also keeps track of the previous touch by storing the dur value in prevdur.