Logic 0 is ALDL 1. Oops.
This commit is contained in:
parent
4479ad454c
commit
3d07cdeb23
|
@ -42,7 +42,7 @@ static char *datalog_fname = "DATALOG.csv";
|
|||
|
||||
int readbit(void)
|
||||
{
|
||||
return digitalRead(ALDL_PIN_IN);
|
||||
return !digitalRead(ALDL_PIN_IN); /* Logic low is ALDL '1' */
|
||||
}
|
||||
void delayfn(int ms)
|
||||
{
|
||||
|
@ -54,9 +54,12 @@ int main (int argc, char **argv)
|
|||
{
|
||||
int run = 1;
|
||||
|
||||
/* Set up RPi GPIO */
|
||||
wiringPiSetup();
|
||||
|
||||
/* Set highest possible priority */
|
||||
piHiPri(99);
|
||||
|
||||
/* Set up RPi GPIO */
|
||||
pinMode(ALDL_PIN_IN, INPUT);
|
||||
pullUpDnControl(ALDL_PIN_IN, PUD_DOWN);
|
||||
|
||||
|
|
Loading…
Reference in a new issue