Controlling Scenes with Button and Arduino
  • ahuffman24
    junior Member
    Posts: 3
    Joined: Thu Nov 25, 2021 3:36 am

    Controlling Scenes with Button and Arduino

    by ahuffman24 » Tue Nov 30, 2021 7:47 am

    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
  • timbrass
    activ8 member
    Posts: 57
    Joined: Mon Mar 01, 2021 9:01 pm
    Contact:

    Re: Controlling Scenes with Button and Arduino

    by timbrass » Sat Jan 22, 2022 1:20 am

    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?
  • mad-matt
    garageCube team
    Posts: 1475
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: Controlling Scenes with Button and Arduino

    by mad-matt » Mon Jan 31, 2022 11:37 am

    Have you read the documentation in menu Help / MadMapper User Guides / Arduino Firmata ?

Who is online

Users browsing this forum: No registered users and 13 guests