Name: Switch Control Alarm
Description: Use K1 switch to control the alarm, program control P1.0 output two different frequency sounds, simulate very realistic alarm effect
*/
#include
#define uchar unsigned char
#define uint unsigned int
Sbit SPK=P1^0;
Sbit K1=P1^7;
// sound function
Void Alarm(uchar t)
{
Uchar i,j;
For(i=0;i<200;i++)
{
SPK=~SPK;
For(j=0;j } Void main() { SPK=0; While(1) { If(K1==1) { Alarm(90); Alarm(120); } } }
• High PRO MAX body, 304 Stainless steel + PETG mouthpiece.
Maskking High Pro,Maskking E-Cigarette,Maskking High Pro Vape
Nanning Goodman Technology Co.,Ltd , https://www.goodmentech.com