Beispiel #1
0
void showStatus(uint8_t verdieping, uint16_t hoogte, uint8_t motor)
{
    //            "rechtsom     aan", "Hoogte: 100     "
    showScreenLCD("                ", "H:          V:  ");

    setCursorPosLCD(0, 13);
    writeStringLCD_P("aan");

    // motor status
    switch (motor) {
        case MOTOR_IDLE:
            setCursorPosLCD(0, 13);
            writeStringLCD_P("uit");
            break;
        case MOTOR_LEFT:
            setCursorPosLCD(0, 0);
            writeStringLCD_P("Linksom");
            break;
        case MOTOR_RIGHT:
            setCursorPosLCD(0, 0);
            writeStringLCD_P("Rechtsom");
            break;
    }

    setCursorPosLCD(1, 3);
    writeIntegerLCD(hoogte, DEC);

    setCursorPosLCD(1, 15);
    writeIntegerLCD(verdieping, DEC);

    setLEDs(1 << verdieping);
}
Beispiel #2
0
/**
 * Timed Watchdog display only - the other heartbeat function
 * does not work in this example as we use blocked moving functions here.
 */
void watchDogRequest(void)
{
	static uint8_t heartbeat2 = false;
	if(heartbeat2)
	{
		clearPosLCD(0, 14, 1);
		heartbeat2 = false;
	}
	else
	{
		setCursorPosLCD(0, 14);
		writeStringLCD_P("#"); 
		heartbeat2 = true;
	}
}