#Mute button integration
42 messages · Page 1 of 1 (latest)
This is a momentary push button, right? Non-latching
If it is, I asked gemini to help explain this clearly in an isolated (non-deej) example: https://g.co/gemini/share/18b5f9c1d51d
You would need to adapt this to deej, where you'd also want to override the analog value read for the corresponding pot whenever the mute state of a button is set
So this also involves sketch changes naturally. But this should be relatively simple. You just need enough pins: 1 analog and 2 digital per set of slider/button/LED
is something like that possible if you dont have any experiance in arduino code?
Well, nowadays one cool thing you can do with AI is ask it to smush two sketches together if you can explain to it clearly enough in words what you want to achieve, like I did in this example
But realistically you'll just be able to ask for help doing it on here, once you have built the hardware. I would suggest, though, that if you're a beginner you stick to a simple build without any extra features
You can always make a second one if you really like how it works
what is with a toggle button, could it be easier to do?
A toggle switch, or a "latching" on/off button, could make this simpler. Because you care wire it to the LED and the slider at once to make it control both. But I'm not 100% sure how this circuit would look and don't want to mislead you
(and I think it would have to come with the LED fading from 0 to 100 and not necessarily the behavior you want, which is just to reflect the state of the switch)
I have a latching with 6 pins i think two "Chanel" and one default on and the other default off
Can you take a pic of it? might help others with more electronics know-how who could try and help you here
OK cool - let's wait and see if someone can help you figure this out
Because again, electronics isn't my strong suit and my recommendation to any beginner is keep it simple
idk about that button but I have created a 4 push-button setup, to access the media controls
like button 1 does : mute/unmute
2 : pause/play
3: next
4: previous
but yeah I havent add the led
i think that shouldnt be a problem. you can add an if-else statement for button 0 ?
This would be a working version of the mute button.
so if you do this, when it's mute the led is on and if not, it's off? seems like an interesting setup, I might try it too
yes thats true the Led is onif its muted and of if its not.
if I understand this correctly, you are cutting the power to pots when you switch that button on?
Yes, and the serial monitor then goes to zero and the lamp is turning on.
oh and there is a separate mute button for each pot
pretty nice circuit
thanks
Just jumping on this thread for some clarification - I'd also like to add buttons to mute/unmute which is then indicated by an LED. Additionally, I'd like to add buttons for play/pause and back/skip track. I understand the above wiring diagram for muting and LEDs, but could use guidance on how to wire the media control buttons. Also, how do I go about changing the sketch/assigning buttons? Based on what I've read so far, I would need to upload Miodec's fork, and then edit the sketch in someway to assign both mute and media controls, but this is where I get lost. In Miodec's fork, they reference another repo called 'keybd_event' but I'm not sure how to integrate that with Miodec's fork/deej.
Simply put:
- How/where do I wire in the media control buttons on my board?
- How do I map the mute buttons and media control buttons via Miodec/deej, and do I use 'keybd_event' or not?
For reference, I am using an Arduino Nano. Thanks very much in advance, super excited about this project!
With the Miodec fork you just look at the keybd github and use the value for what key you want in the config.yaml
Okay so, my media controls on my keyboard are assigned to F5 (back) F6 (play/pause) and F7 (skip). According to keybd those are 63, 64, and 65... Miodec says 'convert to hex to int', which gives me 99, 100, and 101 respectively. How am I doing so far?
Okay, I've got those added into the config file, and added 3 additional buttons for media controls
Miodec says to 'change pin definitions' when uploading the code to the board, what does that mean/what do I need to change in the sketch before uploading?
Got it, those are related to the pins on my board.
Alright, I think this gives me some direction to work with. I'll play around with connecting buttons, LEDs, and knobs and report back
Thank you!
