I have an Uno R3 and an old Yamaha audio receiver. The receiver has an AC outlet on the back that powers up when you turn on the receiver (i.e., a "switched" outlet).
I want to plug a 5v "wall wart" into the switched outlet and pin that in directly to the Uno. The positive lead from the wall wart would go to pin 8 on the Uno and the negative to GND on the Uno.
Of course I would specify "pinmode(OnOffState,INPUT);"
My question is: Are any resistors necessary for this arrangement? Is there an easier way?