Ich habe jetzt auch ein Programm zur Tasterauswertung geschrieben:
Hier sind meine Ergebnisse:
K1: 32
K2: 16
K3: mal 7, mal 8
K4: 4
K5: 2
K6:1
Kann es sein, dass die Werte verkehrt herum sind???
Code:
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* any later version. *
***************************************************************************/
#include "asuro.h"
#include "stdlib.h"
int main(void)
{
Init();
unsigned int sw;
SerPrint("Meine Tasterwerte:\n\r");
while (1) {
sw=PollSwitch();
SerPrint(" ");
SerPrint("\r");
PrintInt(sw);
SerPrint("\r");
Msleep(100);
}
return 0;
}
Lesezeichen