You are correct about the 5 to 3 sensor change... I realized that when refactoring the code that using 3 sensors was really sufficient to make LInus work, and tested the new code by only reading the 3 center sensors.
Using the 2 outside sensors is likely why your Linus is not staying on the line very well... try changing the left and right sensors to use the left-center and right-center sensors (2 and 4) and it should work just fine.
I have planned on testing the outer sensors (1 and 5) to allow it to go faster and provide better correction, but for now I wanted to keep the code as simple as possible during refactoring. I will keep you posted if I come up with any new code for using all 5 sensors.
For what its worth, I didn't realize that 3 would work as well as 5 until after the book was published, so I apologize for the extra work in soldering the 2 extra sensors.
I have noticed that the Arduino has trouble running on voltages below 5v, so 4.5 (3 AAA or AA) does not generally work and sometimes the 4.8v produced by 4 rechargeable AA or AAA batteries is not sufficient. So if I use rechargeables, I generally go for at least 5 and if using regular alkaline I go for at least 4... but that seems to work ok for me. I don't usually need 8 (which would produce 12v alkaline or 9.6v rechargeable), but it certainly doesn't hurt and will give you higher speed on your line-bot.
Depending on your motors, you might be running a bit fast at 12v and if so you might have to lower the speed of the motors in the code - right now the speed is set to 255, so you can go 128 for half-speed or whatever you find that works.
Once you get it working and are happy with it, It would be awesome if you wanted to add your Linus project to my website.. if you are interested and have a few minutes, just go here:
and you can add a description and a picture. If you have multiple pictures, feel free to add as many as you want.
Here's my Linus bot. Very fun introduction to robotics, thank you. Looking forward to making something else.