BIG BUTTON DIY build - Verified???

Has anybody here built this DIY strip board project successfully? I like the simple concept of the project… however, I have tried twice now ( on 2 separate builds) to get my project working with no luck… performance is erratic and random at best. I’m using the most recent A3 Mod code on the NANO however I tweaked the wiring for a different layout of the buttons and LEDs - thats maybe my problem.

Before I go troubleshooting - Can someone verify a successful working build and let me know any troubleshooting tips - I would much appreciate it.

I have built four LMNC Safety Valves and they work fantastic and over 80 DIY modules - this one stumps me - its so simple though.

Cheers, Rexxxx

1 Like

I’ve built a couple. They seem to work perfectly for me other than one thing. The channel switch does nothing for me in both builds…instead, the shift knob changes channels. I’ve seen quite a few others that have built this with no problem. If someone could tell me what’s up with that, I’d be quite grateful.

1 Like

Got my popcorn out, watching this thread. Has anyone built the wav trigger for this? If so please share info/links.

Have you checked that the potentiometers are connected to the right pins? (channel to A0, step length to A1, shift to A2)

The code is a bit chaotic :sunglasses: and I haven’t traced all paths, but I noticed that the channel selection is read from two different ports: setup() which is run once, to set everything up, has

StepLength = analogRead(1);
CHANNELSELECT= analogRead(2);

but loop() has

KnobVal = analogRead(2);
CHANNELSELECT= analogRead(0);
StepLength = analogRead(1);

which matches the layout. If you’re 100% sure that you’re using the right pins, you could try changing the CHANNELSELECT read in setup() to use port 0 and see if that changes anything.

2 Likes

I was planning on building this sometime soon. Me n my mates are planning to jam together and another sequencer would be useful. I’ll see if I run into this issue as well. I keep forgetting to buy the rotary switch, but I might just say screw it and use a different I put method.

Which Arduino are you using?

I’ve successfully built the Big Button and everything works. I love it and it’s awesome.
Make sure you add the suggested CGS25 trigger circuit to your build. Check and recheck your wiring.

2 Likes

OK… this was my original post - so here’s an update:

I posted this as well on Muffwiggler and got fg to reply with an alternate circuit version and code:

http://pjmnc.free.fr/archives/bb.zip

So I stripped another board to the new circuit and its works really fine. In this process I noticed my original pots were dead… so I guess that was my mistake on the LMNC version.

Regardless - I can say that fg’s circuit and code can work for you if your having trouble with LMNC circuit. Both are fussy builds.

Cheers, Rexxxxx.

1 Like

Trying to build this out but I’m having trouble with the code. Both with Sam’s original and Rexxxxx’s.

Getting an error “cannot convert ‘boo’ to ‘PinStatus’ for argument ‘2’ to 'void digitalWrite(pin_size_t, PinStatus”

    digitalWrite(OUT1,Sequence       [1+BankArrayShift1][BankPush1 + NewKnobValue1] || (Fill1));
digitalWrite(OUT2,Sequence       [2+BankArrayShift2][BankPush2 + NewKnobValue2] || (Fill2));
digitalWrite(OUT3,Sequence       [3+BankArrayShift3][BankPush3 + NewKnobValue3] || (Fill3));
digitalWrite(OUT4,Sequence       [7+BankArrayShift4][BankPush4 + NewKnobValue4] || (Fill4));
digitalWrite(OUT5,Sequence       [8+BankArrayShift5][BankPush5 + NewKnobValue5] || (Fill5));
digitalWrite(OUT6,Sequence       [9+BankArrayShift6][BankPush6 + NewKnobValue6] || (Fill6));

It’s happening in there ^

Anybody else dealing with this?

Is that the literal error message? There’s no “boo” anywhere in the code at lookmumnocomputer.com/big-button (except for the boo in “facebook” that is) and I just grabbed the source off that page and pasted it into create.arduino.cc/editor, and it compiles just fine there.

Are you sure you haven’t accidentally added or removed something higher up in the file? (near what was originally line 150, perhaps?)

EDIT: Seems it depends on the core – compile for “Ardino Nano” in the cloud IDE and it works as is, compile for “Arduino Nano Every” and it breaks. More below.

Sorry, I meant ‘bool’

I ended up on a guess removing the OR FILL#s || (FILL1) and it’s loading up fine, but I’m guessing I lose the fill functionality this way.

I double-checked with a fresh download of the code and this is the verbose output:

/home/builder/opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware /home/builder/opt/arduino-builder/hardware -hardware /home/builder/.arduino15/packages -tools /home/builder/opt/arduino-builder/tools -tools /home/builder/.arduino15/packages -built-in-libraries /home/builder/opt/libraries/latest -logger humantags -fqbn arduino:megaavr:nona4809:mode=on -build-cache /tmp -build-path /tmp/516373399/build -verbose -prefs runtime.tools.esptool.path=/home/builder/.arduino15/packages/esp8266/tools/esptool/2.5.0-3-20ed2b9 -prefs runtime.tools.mkspiffs.path=/home/builder/.arduino15/packages/esp8266/tools/mkspiffs/2.5.0-3-20ed2b9 -prefs runtime.tools.xtensa-lx106-elf-gcc.path=/home/builder/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9 -prefs runtime.tools.bossac.path=/home/builder/.arduino15/packages/industruino/tools/bossac/1.7.0-industruino -prefs runtime.tools.nrf5x-cl-tools.path=/home/builder/.arduino15/packages/arduino/tools/nrf5x-cl-tools/9.3.1 -prefs runtime.tools.CMSIS-Atmel.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0 -prefs runtime.tools.avrdude.path=/home/builder/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs runtime.tools.arduinoOTA.path=/home/builder/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs runtime.tools.linuxuploader.path=/home/builder/.arduino15/packages/arduino/tools/linuxuploader/1.5.1 -prefs runtime.tools.openocd.path=/home/builder/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino9 -prefs runtime.tools.arduino101load.path=/home/builder/.arduino15/packages/Intel/tools/arduino101load/2.0.1 -prefs runtime.tools.flashpack.path=/home/builder/.arduino15/packages/Intel/tools/flashpack/2.0.0 -prefs runtime.tools.avr-gcc.path=/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs runtime.tools.CMSIS.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs runtime.tools.arm-none-eabi-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs runtime.tools.dfu-util.path=/home/builder/.arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -prefs runtime.tools.i586-poky-linux-uclibc.path=/home/builder/.arduino15/packages/Intel/tools/i586-poky-linux-uclibc/1.6.2+1.0 -prefs runtime.tools.sketchUploader.path=/home/builder/.arduino15/packages/Intel/tools/sketchUploader/1.6.2+1.0 -prefs runtime.tools.arc-elf32.path=/home/builder/.arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -prefs runtime.tools.core2-32-poky-linux.path=/home/builder/.arduino15/packages/Intel/tools/core2-32-poky-linux/1.6.2+1.0 -prefs runtime.tools.arm-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-linux-gcc/4.9.3 -prefs runtime.tools.x86-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/x86-linux-gcc/7.2.0 -libraries /tmp/516373399/custom -libraries /tmp/516373399/pinned /tmp/516373399/BIG_BUTTON_MOD_LED_PIN_A3(1)

Compiling sketch…

/tmp/516373399/BIG_BUTTON_MOD_LED_PIN_A3(1)/BIG_BUTTON_MOD_LED_PIN_A3(1).ino: In function ‘void loop()’:

/tmp/516373399/BIG_BUTTON_MOD_LED_PIN_A3(1)/BIG_BUTTON_MOD_LED_PIN_A3(1).ino:270:95: error: cannot convert ‘bool’ to ‘PinStatus’ for argument ‘2’ to ‘void digitalWrite(pin_size_t, PinStatus)’

digitalWrite(OUT1,Sequence [1+BankArrayShift1][BankPush1 + NewKnobValue1] || (Fill1));

^

/tmp/516373399/BIG_BUTTON_MOD_LED_PIN_A3(1)/BIG_BUTTON_MOD_LED_PIN_A3(1).ino:271:95: error: cannot convert ‘bool’ to ‘PinStatus’ for argument ‘2’ to ‘void digitalWrite(pin_size_t, PinStatus)’

digitalWrite(OUT2,Sequence [2+BankArrayShift2][BankPush2 + NewKnobValue2] || (Fill2));

^

/tmp/516373399/BIG_BUTTON_MOD_LED_PIN_A3(1)/BIG_BUTTON_MOD_LED_PIN_A3(1).ino:272:95: error: cannot convert ‘bool’ to ‘PinStatus’ for argument ‘2’ to ‘void digitalWrite(pin_size_t, PinStatus)’

digitalWrite(OUT3,Sequence [3+BankArrayShift3][BankPush3 + NewKnobValue3] || (Fill3));

^

/tmp/516373399/BIG_BUTTON_MOD_LED_PIN_A3(1)/BIG_BUTTON_MOD_LED_PIN_A3(1).ino:273:95: error: cannot convert ‘bool’ to ‘PinStatus’ for argument ‘2’ to ‘void digitalWrite(pin_size_t, PinStatus)’

digitalWrite(OUT4,Sequence [7+BankArrayShift4][BankPush4 + NewKnobValue4] || (Fill4));

^

/tmp/516373399/BIG_BUTTON_MOD_LED_PIN_A3(1)/BIG_BUTTON_MOD_LED_PIN_A3(1).ino:274:95: error: cannot convert ‘bool’ to ‘PinStatus’ for argument ‘2’ to ‘void digitalWrite(pin_size_t, PinStatus)’

digitalWrite(OUT5,Sequence [8+BankArrayShift5][BankPush5 + NewKnobValue5] || (Fill5));

^

/tmp/516373399/BIG_BUTTON_MOD_LED_PIN_A3(1)/BIG_BUTTON_MOD_LED_PIN_A3(1).ino:275:95: error: cannot convert ‘bool’ to ‘PinStatus’ for argument ‘2’ to ‘void digitalWrite(pin_size_t, PinStatus)’

digitalWrite(OUT6,Sequence [9+BankArrayShift6][BankPush6 + NewKnobValue6] || (Fill6));

^

exit status 1

A variable miscast that should be boolean? Or my own repeated error a variable with a spa e in its name (usually from when I paste it)
Lastly check pin definitions.
Odd this. Keep going though. It’ll be something daft I’m sure.

Before watching LMNC’s video I had never heard of an Arduino, I’m in so far over my head haha. Years of JavaScript have not prepared me to debug this foreign programming language.

2 Likes

Some Arduino version mismatch? (I’d expect create.arduino.cc/editor to have the latest, but maybe that’s not the case. I guess you could always use that one to compile the program, though :slight_smile:)

EDIT: Seems it depends on the core – compile for “Ardino Nano” in the cloud IDE and it works as is, compile for “Arduino Nano Every” and it breaks. More below.

Ok, seems some Arduino clown decided to change a widely used API because why not, and broke a gazillion things: https://github.com/arduino/ArduinoCore-API/issues/25

Cannot tell from that thread if they changed it back or added some compatibility overrides, or why it works on the online version.

(guess updating your Arduino environment would answer that, otherwise a mechanical fix is to change any instance of digitalWrite(port, value); to digitalWrite(port, (value) ? HIGH : LOW);, alternatively adding a digitalWriteBool helper that does that mapping.)

2 Likes

Which circuit did you build? Sam’s or fb’s (Muffwiggler)? You can’t interchange the code, due to the different circuit/schematic design.

BTW - that’s not my code- fg coded it. I build it from his design/project file

Rexxxxx

1 Like

Luckily I decided to get the code onto the nano before building the circuit, so I’m good to use either circuit - if I can get the code to work.

Feel free to tell me to bugger off for being too needy, but because I’m not at all familiar with C++, could you give me an example of how that re-write would look with this line of code?

digitalWrite(OUT1,Sequence       [1+BankArrayShift1][BankPush1 + NewKnobValue1] || (Fill1));

That seems to be the culprit (there are issues with 6 lines that write to outs 1-6) and it uploads fine if I just remove the “|| (FILL1)” portion of the code.

1 Like

(discourse has opinions: "You’ve replied 3 times to @dirty_g in this particular topic! A great discussion involves many voices and perspectives. Can you get anybody else involved? " :upside_down_face: )

So ignoring them :smiley: , if you rewrite

digitalWrite(OUT1,Sequence [1+BankArrayShift1][BankPush1 + NewKnobValue1] || (Fill1));

as

digitalWrite(OUT1, (Sequence[1+BankArrayShift1][BankPush1 + NewKnobValue1] || (Fill1)) ? HIGH : LOW);

it should compile just fine.

(this is valid JavaScript syntax too, btw)

EDIT: A couple more alternatives, casting the bool to an int which still works (0=LOW, 1=HIGH). Should generate the same code as the more verbose variant above:

digitalWrite(OUT1, (int) (Sequence[1+BankArrayShift1][BankPush1 + NewKnobValue1] || (Fill1)));
digitalWrite(OUT1, static_cast<int>(Sequence[1+BankArrayShift1][BankPush1 + NewKnobValue1] || (Fill1)));
4 Likes

All loaded up on the Nano now. Looks like there’s cause for a Big Button v1.3 to be loaded up onto the LMNC site.

Big thanks for being super responsive @fredrik -> nothing would suck more right now then endless hours debugging this when I just want to inhale a bunch of solder while on pandemic lockdown!

https://create.arduino.cc/editor/emrysgraefe/fd2631b7-2a5c-4ec9-bbd5-74149993e627/preview

2 Likes