Try internal pull-up resistors instead of the external ones. #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The internal pull-up resistors are about 20-50 kOhms, seek for "I/O Pin Pull-up Resistor" on page 384 of the datasheet:
http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf
It's probably more than what was in the original circuit but it should work.
If it doesn't, you might have to change the value of CFG_SENSOR_THRESHOLD, those lines should help to understand how it's used:
https://github.com/honnet/punchcard_reader/blob/master/ReadSensors/ReadSensors.ino#L23
https://github.com/honnet/punchcard_reader/blob/master/ReadSensors/ReadSensors.ino#L281
The way to set the internal pull-up resistors can also be done differently, see the comment in the commit.
More about pullup resistors and analog pins in the "Pullup resistors" section:
https://www.arduino.cc/en/Reference/AnalogPins