Hello,
Im interested t make alarm that would make sound and flash backlight when x-axis acceleration data change over specific value and that it last till i press backlight button. So far i have manage to make that alarm buzz, and to write ALARM is second line of display. but alarm is litle to sensitive.
I have wrote in main.c
// Global Variable section
u8 zvalue;
u8 thresh = 254;
I have put in main function this code:
if (sAccel.mode == ACCEL_MODE_ON)
{
zvalue=sAccel.xyz[2];
if (zvalue > thresh){
display_chars(LCD_SEG_L2_4_0, (u8 *)"ALARM", SEG_ON);
request.flag.buzzer = 1;
}
}
Any suggestion?