We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm working on a project that is quite simple, but very confusing for a beginner like myself...
In summary, this is the goal: - I push a button (BTN01) on Arduino, my computer plays Sound01A - I flick a swicth (BTN02) on Arduino, it plays Sound02A or Sound02B (depending on it's state) - There will be many, many buttons...
I have a few questions:
1) Is the best method of wiring each button (with two pins) GND and corresponding Digital Input Pin? Do I need a pullup resistor? (I'm testing on Uno but finalising on Mega) ** 2)** Should use "serial.print" or "serial write" in the Arduino code?
3) How should I best label each button state in Arduino that is sent via serial? I was thinking 01a, 01b, 02a, 02b, etc (number is the button/pin, letter is the state eg pushed or not)
4) Should I use some kind of array to m ake the code easier to create and work with? Or should I just have lots of separate if statements (one for each button)?
5) What would be the recommended/ simplest method of receiving the serial inputs in processing?