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);
}
}
}
1500 Puffs LED Light Waterproof Disposable Vape E Cigarette
• High PRO MAX body, 304 Stainless steel + PETG mouthpiece.
• Big vapor and good taste. Easy to carry on.
• AAA 850mAh battery, 1500+ puffs with laboratory test.
• 13 flavors for 13 colors, more colors and flavors are available.
Maskking High Pro,Maskking E-Cigarette,Maskking High Pro Vape
Nanning Goodman Technology Co.,Ltd , https://www.goodmentech.com