How To Access Wireling A0 - A3 Ports

jgavlik

  • Full Member
  • ***
    • Posts: 30
    • View Profile
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


jgavlik

  • Full Member
  • ***
    • Posts: 30
    • View Profile
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


 

SMF spam blocked by CleanTalk