SegaController is an open-source Arduino library to enable your Arduino sketches to read Atari 2600 controllers.

It supports the classic joystick, and includes example sketches for testing via the serial connection and converting the button presses into Keyboard key presses.

You can download the source and follow its development at AtariController on GitHub.

And if you’re interested, I’ve also documented How To Read Atari Controllers.