Expander syntax

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

Expander syntax

Post by Alwaysnew » Sat Oct 19, 2013 11:49 pm

When targetting the expander outs, is it the same syntax as when you target A0 and A1 on the ardcore?

i.e. for outputting a trigger on A0 I would write:

digState[0] = HIGH;
digitalWrite(digPin[0], HIGH);

so if I want to do the same for, say the top output (number 0 on the expander), would I then write:

digState[2] = HIGH;
digitalWrite(digPin[3], HIGH);

...since [0] and [1] are already taken by A0 and A1?

if not, how do I target them to fire a trigger?
Or a gate?

Thanks!

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

Post by scottwilson » Tue Oct 22, 2013 12:53 pm

Best info I've found is the original 20 Objects tech doc. It tells you the specific pins.

The expander pins are the same 8 pins that are used for the DAC connection, so you can't use the two at the same time.

http://20objects.com/downloads/ardcore- ... formation/

I've never used the array notation before. I use the typical arduino API of digitalWrite() - and don't forget to set the pinMode() to output.

(edit: nevermind, I see you are just using the array to keep state of whether the pin is high or low.)


-s
Last edited by scottwilson on Tue Oct 22, 2013 1:04 pm, edited 1 time in total.

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

Post by scottwilson » Tue Oct 22, 2013 1:03 pm

Also, don't forget that for it to be a trigger, you've got to turn it on _and_ off...

I've been working on a framework that should make doing simple modular synth tasks with the Ardcore or any other microcontoller-based system a little bit easier. It's not quite ready for prime time yet, but I should have a critical mass of functionality soon.

Documentation on the pre-alpha code is here https://github.com/nw2s/b/wiki/01-Overview if you're interested in reading a little and seeing some sample sketches.

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

Post by Alwaysnew » Wed Oct 23, 2013 1:58 pm

Thanks!

Just got my expander in the mail today. Very exciting!

I see there's this bigger circuit board connector in the box. Is that something I need in any way?

I'm on a eurorack, I have the old purple version of the Ardcore.

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

Post by scottwilson » Wed Oct 23, 2013 7:41 pm

Are you referring to the DIP adapter? I have the newer silver, and I didn't need it... there was a header for the expander ribbon cable on the main circuit board.

It came with an extra DIP adapter that looks like you'd use it in case your ardcore doesn't have an expander pin header already?

Post Reply

Return to “SNAZZY FX”