I'd suggest searching through the forums, most of the programming stuff from 2005-2008 (emphasis on 2007-2008) will be relevant. Everything you mention has been extensively covered.
To get you started, here's a couple of threads on reading from a potentiometer:
thread 1
thread 2
--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor