Page 1 of 1

Controlling Scenes with Button and Arduino

Posted: Tue Nov 30, 2021 7:47 am
by ahuffman24
Hi,

I would like to play a scene when a button is pressed. The button is connected to my arduino. I have two arduinos currently, the Nano BLE 33 and an Uno. The Uno is compatible with Firmata, however I can't figure out how to get MadMapper to recognize when the button is being pressed. The Nano is not compatible with Firmata, however I was able to write some code to get it to act as a keyboard and send ASCII codes to MadMapper to change scenes. This does change the scenes on a button press, but after 5-10 minutes, the buttons stop working (they are LED light-up buttons and will not even light up when pressed after some amount of time). This is probably an issue with delays in my code, but regardless, I am at a loss. Ideally, I'd like to somehow just make MadMapper recognize when a button is being pressed with the Nano without having to use the keyboard solution. I'm fairly new to MadMapper, so I feel like there's something I'm probably missing. Any help and/or guidance is greatly appreciated!

Thank you,

Alison Huffman

Re: Controlling Scenes with Button and Arduino

Posted: Sat Jan 22, 2022 1:20 am
by timbrass
I am trying to solve the same issue. I have an Uno and a 4x4 keypad matrix that uses 8 digital pins for input (4 rows and 4 columns) and then sets a variable to some defined character (and I can see that character in the Serial Monitor - A, B, C... P). The Keypad.h library takes the row/column combination and maps it to one of 16 characters, but I can't tell MM "If variable = A then do X". MM just looks to see whether a digital PIN is High or Low

The question is how to turn that into 16 different triggers that MM can act on?

Re: Controlling Scenes with Button and Arduino

Posted: Mon Jan 31, 2022 11:37 am
by mad-matt
Have you read the documentation in menu Help / MadMapper User Guides / Arduino Firmata ?