Read ADL_IO_Q24CLASSIC_GPIO_0


#1

Good Day,

I subscribe to GPIO_0 using the following code

   adl_io_handle = adl_ioSubscribe ( ADL_IO_Q24CLASSIC_GPIO_0, 1, 1, 0, NULL); //always return the value 5

adl_io_handle always return the value 5 and i assume ioSubscribe is successfull.

I use the following code to read the current state of the input. I call this from a Timer Handler every 1 second.

   io_value=adl_ioRead(adl_io_handle);

I tap pin #47 (GPIO_0) of the module to ground from time to time but it always return -5. It seems no state change happens. Im expecting io_value to change. What could be the problem?

Thank you…


#2

What does the datasheet say about the open-circuit state of this GPIO…?


#3

The datasheet did not say anything about its open circuit state but that pin can also be used as CTS pin for UART2. Im new in open AT i just want to read state of a particular GPIO and count the number of times the input i subscribe changes state (from 1 to 0 or and vise versa). May i request a simple working code for this? Thank you very much for the help.


#4

So why do you assume that touching it to ground must cause a state change?

In the absence of of any information to the contrary, there must be a 50% probability that its default state will be ground, mustn’t there?

So, have you tried taking it high instead?

Are you sure that it’s not in that mode, then?

So try another one where there’s no doubt that it might be being used by some alternate function…

Have you looked at the examples included in the SDK?


#5

The Telemetry example included in sdk confuses me. It’s very complicated for me as a starte in OPEN AT.I juse need a very simple example.Thank you.