Con la segunda placa de pruebas he realizado también diferentes prácticas muy sencillas.
Esta placa de expansión tiene dos leds (salidas 0 y 1) y dos entradas analógicas (el potenciómetro en la entrada 2 y la LDR en la entrada 4).
He realizado tres ejercicios prácticos:
- Dos luces intermitentes alternativas.
- Igual que el anterior pero el potenciómetro regula el tiempo.
- Igual que el anterior pero la LDR regula el tiempo.
LUCES INTERMITENTES ALTERNATIVAS:
symbol t=500
inicio:
high 0
pause t
low 0
high 1
pause t
low 1
goto inicio
LUCES INTERMITENTES ALTERNATIVAS CON TIEMPO REGULADOR POR POTENCIÓMETRO:
inicio:
readadc 4,b0 'potenciometro
high 0
pause b0
low 0
high 1
pause b0
low 1
goto inicio
LUCES INTERMITENTES ALTERNATIVAS CON TIEMPO REGULADOR POR LDR:
inicio:
readadc 2,b0 'LDR
high 0
pause b0
low 0
high 1
pause b0
low 1
goto inicio
No hay comentarios:
Publicar un comentario