i was wondering if i can build up a little circuit for reading data from switches, potentiometers and piezo (and ive included leds that i want to control via pwm) like this (i uploaded a bad sketch i just did, i hope you can see what i mean, its a bit chaotic...):http://i54.tinypic.com/ogbc6v.jpg
im really a beginner... some main questions are:
- can i use the 5v-output-pin for all of the components and, at the same time, use the digital pins for 5v output, like you see in the picture?
- did i choose the right resistor values?
- can i use the same ground pin for all of the GNDs in the picture?
- why do i have to put a resistor between the switch and the arduino ground? the digital pins do have a built-in resistor, don't they?
in case you can't recognize everything: i give 5v from arduino to 5 potentiometers, 5 switches (4 footswitches and a "handswitch") and the piezo. i read the data from the potentiometers into analog inputs A0-A4, from the piezo into analog A5, from the switches into digital pins 7, 8, 12 and 13, and i connected 4 LEDs to the digital pins (using those as an output) 5~, 6~, 9~ and 10~, also for pwm.
the resistors are 25k for the potis, 1M for the piezo, 1K for the LEDs and the switches
i use the arduino uno.
thanks a lot - also for tolerating my beginnerness