Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature currently requires accessing the site using the built-in Safari browser.
void main ()
{
set_tris_a (0b00011111);
set_tris_b (0b11111111);
set_tris_c (0b00000000);
set_tris_d (0b00000000);
Port_b_pullups (true);
lcd_init ();
kbd_init ();
CHAR k;
INT8 con, x, uni, dec;
lcd_gotoxy (3, 1) ;
printf (lcd_putc, "\nBienvenidos"); Delay_ms (1500);
lcd_gotoxy (1, 1) ;
printf (lcd_putc, "Seleccione\n") ;
printf (lcd_putc, "1 2 3 4 5 6 7\r");
WHILE (TRUE)
{
k = kbd_getc ();
x = k - 48;
IF (k != 0)
{
IF (k == ' * ')
lcd_putc ("\fpresiono") ;
ELSE
printf (lcd_putc, "\fpresiono: = % u", x);
}
SWITCH (x)
{
CASE 1:
WHILE (true)
{
lcd_gotoxy (1, 2) ;
printf (lcd_putc, "\r F (X) = 3X ^ 2 + 2Y\r");
}
CASE 2:
WHILE (true)
{
lcd_gotoxy (1, 2) ;
printf (lcd_putc, "\r F (X) = X^8 + 2\r");
}
CASE 3:
WHILE (true)
{
lcd_gotoxy (1, 2) ;
printf (lcd_putc, "\r F (X) = 3X ^ 2 + 2Y\r");
}
}
}
}
switch (x)
case 1:
case 2:
default:
(codigo a ejecutar en caso de ser opcion 1, 2 o ninguna)
case 3:
........
switch (x)
case 1:
.....
case 2:
.....
........
default:
(codigo a ejecutar si no hubo alguna de las opciones anteriores
while (1) {
if (boton_presionado) {
switch (x) {
case 1:
(acciones de display para caso 1)
break;
case 2:
(acciones de display para caso 1)
break;
case 3:
(acciones de display para caso 3)
break;
default:
(acciones de display para caso otro)
break;
}
} else {
(mas acciones si no se ha presionado boton)
}
}