-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
65 lines (47 loc) · 925 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* Deaf_glove.c
*
* Created: 3/5/2024 8:37:37 PM
* Author : mosta
*/
#define F_CPU 16000000
#include <util/delay.h>
#include <stdio.h>
#include <string.h>
#include <avr/io.h>
#include "STBD_TYPES.h"
#include "TWI_Interface.h"
#include "EEPROM_interface.h"
#include "LCD_Interface.h"
#include "ADC_Interface.h"
#include "Deaf_interface.h"
int main(void)
{
ADC_voidInit();
LCD_voidInit();
EEPROM_voidInit();
LCD_gotoxy(2,0);
_delay_ms(2);
LCD_voidSendString("Deaf");
_delay_ms(2);
LCD_gotoxy(3,1);
_delay_ms(2);
LCD_voidSendString("Project.AMIT");
_delay_ms(1000);
EEPROM_InsertData ();
u16 ADC_Value=0;
u16 ADC_Value1=1;
u16 x=0;
while (1)
{
ADC_Value=ADC_CollectValue(&x);
if (ADC_Value!=ADC_Value1)
{
LCD_voidSendCommand(Clear_Display);
_delay_ms(2);
LCD_voidSendCommand(Return_Home);
searchandprint(ADC_Value);
}
ADC_Value1=ADC_Value;
}
}