I'm a complete beginner in Arduino, so this question may be easy to answer.
I have this setup, with 3 buttons, which all have different tasks to activate a lamp.
For this I used one of the many tutorials online where each button is inserted into the breadboard and then connected to a resistor, to 5V and to a certain Pin. Now I wanted to have better looking buttons and not those small ones, so I now I have prewired buttons, which I can then attach to my wooden structure. But now I have the problem, that I dont know how to wire them, as there I one cable less, as well as no resistor.
How did you wire the 3 cables of your original buttons ?
You don't need an external pullup or pulldown resistor if that is what you mean because you can use INPUT_PULLUP in pinMode() to activate the built in pullup resistors in the Arduino chip
It sounds like the buttons that you had were wired with pull down resistors. The better way to wire button switches is to wire the switches to ground and enable the internal pullups with pinMode(pin, INPUT_PULLUP); The input will read high when the button is not pressed and low when the button is pressed so make appropriate changes to your code.
If this does not answer your question, post a schematic of the project with the 3 wire switches, the code and photos of the switches that you need to replace.
I've copied this from one of my other replies:
I have designed user interfaces (UI's) on office equipment and vehicles (Volvo S40).
A technique I used to maintain long switch life (18 years was the requirement IIRC) was to pass ~100mA thorugh the switch contacts to 'wet' them. I did this my having a series resistor ~47R in the switch path and a small capacitor 100nF, an a relative high value pullup (I ca't recall the value probably somewhere around 10k to 47k.
The higher value resistor charges the cap to the micro supply of 5V. Pressing the switch allowed 5v/47R = ~100mA, to pass for a short while. Holding the switch closed only took <1mA. This current is large compared with any anticipated switch leakage.
This was the practice considered standard to ensure long life at very low cost and usable for a large number of assemblies ~1/2 million.
Assume S1 & S3 are one foot away from the Arduino input pins they are attached.
With S1, 5v current goes from the 5v pin, out to the switch one foot away.
When the switch is closed, the 5v current returns one foot back to pin 10.
Anywhere along the wiring there is a possibility of the 5 volts touching/shorting/damaging something.
With S3, 5v current goes through an internal 20-50k pull-up resistor, out to the switch one foot away. The current returns to GND. Any 5v current short to other parts of the circuit is limited by the internal 20-50k pull-up resistor.