// memoria de movimentos 2.c - Criado pelo studio UNO 2.3
// 9 November 2022 9:13:35 am
#include <uno.h>
// Prototipos
void qwertyi(void);
void qwerty(void);
//Funcoes do Usuario
void qwertyi(void)
{
while(TRUE) {
if (__UP_KEY) {
eeprom_write(0, 0);
}
if (__BOTTOM_KEY) {
eeprom_write(0, 1);
}
if (__LEFT_KEY) {
eeprom_write(0, 2);
}
if (__RIGHT_KEY) {
eeprom_write(0, 0);
}
}
}
void qwerty(void)
{
if ((eeprom_read(0) == 0)) {
__motor_curso(__FORWARD);
}
__delay(1000);
__motor_curso(__STOP);
if ((eeprom_read(0) == 0)) {
__motor_curso(__LEFT_TURN);
}
__delay(1000);
__motor_curso(__STOP);
if ((eeprom_read(0) == 0)) {
__motor_curso(__RIGHT_TURN);
}
__delay(1000);
__motor_curso(__STOP);
if ((eeprom_read(0) == 0)) {
__motor_curso(__BACKWARD);
}
}
//Funcao Principal
void main(void)
{
__inicializa;
qwerty();
qwertyi();
while(TRUE) { }
}