Reading A4 and A5 on the Expander

Discussion and Support for our Atmospheric Modification Devices.

Moderators: Kent, infradead, loss1234

Post Reply
User avatar
Alwaysnew
Wiggling with Experience
Posts: 361
Joined: Thu Feb 23, 2012 8:55 am
Location: Stockholm

Reading A4 and A5 on the Expander

Post by Alwaysnew » Thu Oct 24, 2013 11:13 pm

I feel like I'm asking a lot of questions here, but...

How do I read the value from A4 and A5 on the expander?

I guess I was expecting "analogRead(4)" to work?

Thanks

User avatar
scottwilson
Wiggling with Experience
Posts: 432
Joined: Mon Sep 16, 2013 12:54 pm

Post by scottwilson » Fri Oct 25, 2013 7:22 am

try

analogRead(A4)

when you write the integer '4', you're reading pin 4, which may or may not coincide with the pin named "A4"

Arduino.h has constants for all of the pin names that points to the actual pin numbers.

s

User avatar
Alwaysnew
Wiggling with Experience
Posts: 361
Joined: Thu Feb 23, 2012 8:55 am
Location: Stockholm

Post by Alwaysnew » Sat Oct 26, 2013 12:38 am

seems like analogRead(4) was right after all but the knobs on the expander don't change the value. Seems like they are attenuators, no? The value could therefore be changed with input on the A4 input.

User avatar
scottwilson
Wiggling with Experience
Posts: 432
Joined: Mon Sep 16, 2013 12:54 pm

Post by scottwilson » Sat Oct 26, 2013 7:40 am

If there's no input on the A4 jack, then the pot should just change the values. You can run the AC01_Template program to see the values of each of the 4 inputs displayed.

I'm not sure what the behaviro is supposed to be with an input plugged in... it's either only the input _or_ it's the input value plus the jack value.

s

Post Reply

Return to “SNAZZY FX”