TinyCircuits Forum
General Category => General Discussion => Topic started by: jgavlik on October 28, 2020, 02:57:40 PM
-
I have a Wireling Adapter TinyShield ASD2022 (only one) connected to a TinyZero Processor Board ASM2021-R-A
I am trying to access either A1, A2 or A3....A0 is used for the 0.42 OLED that seems to work fine.
Here's part of my code....
Defining the pin
const int apb = A1; //use A1 as the altitude push button (apb)on the Wireling
Trying to access the analog value
Wireling.selectPort(apb); //Select Wireling port
apb_value = analogRead(apb); //get the value of the analog port
When opening or closing a push button on this port, I get the same analog value (15 out of 1023)
What do I need to do differently?
Thanks,
John
-
Please ignore the preceding question about the Wireling ....I found the answer to my coding questions in the Large Button section https://tinycircuits.com/collections/wireling-input-output/products/large-button-wireling under Software.
It works!
Sorry for the intrusion,
John