-
Notifications
You must be signed in to change notification settings - Fork 0
/
interfaz.c
81 lines (70 loc) · 2.36 KB
/
interfaz.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
/*** COMPONENTES INCLUIDOS ***/
#include "interfaz.h"
#include "input_capture.h"
#include "temperatura.h"
#include "calculos.h"
/*** VARIABLES ***/
/*** FUNCIONES ***/
void menu(uint8 indice){ // Rutinas de impresion en el LCD
switch(indice){
case 0:
LCD_ClearDisplay();
LCD_Position(0,0);
LCD_PrintString("Sistema de medicion");
LCD_Position(1,2);
LCD_PrintString("de distancia por");
LCD_Position(2,4);
LCD_PrintString("Ultrasonido");
break;
case 1:
LCD_ClearDisplay();
LCD_Position(0,0);
LCD_PrintString("T:");
LCD_PrintNumber(temperatura_ambiente/10);
LCD_PutChar('.');
LCD_PrintNumber(temperatura_ambiente%10);
LCD_Position(0,9);
LCD_PrintString("Vs:");
LCD_PrintNumber(velocidad_sonido/10);
LCD_PutChar('.');
LCD_PrintNumber(velocidad_sonido%10);
LCD_PrintString("m/s");
LCD_Position(1,0);
LCD_PrintString("C:");
LCD_PrintU32Number(conteos_entre_eventos);
LCD_Position(1,9);
LCD_PrintString("Ai:");
LCD_PrintNumber(altura_del_sensor/100);
LCD_PutChar('.');
LCD_PrintNumber(altura_del_sensor%100);
LCD_PrintString("cm");
LCD_Position(2,0);
LCD_PrintString("Eco: ");
LCD_PrintNumber(distancia/100);
LCD_PutChar('.');
LCD_PrintNumber(distancia%100);
LCD_PrintString(" cm");
if (altura_del_sensor_guardada){
LCD_Position(3,0);
LCD_PrintString("Altura: ");
LCD_PrintNumber(altura_de_la_persona/100);
LCD_PutChar('.');
LCD_PrintNumber(altura_de_la_persona%100);
LCD_PrintString(" cm");
}
break;
}
}
/*** INTERRUPCIONES ***/
/* [] END OF FILE */