interfacing a wired rc car controller and two 24v dc mtors to an atmega8 arduino

well peter, i guess its limit switches for me. . . . . . if so, how do i write a program to read the status of the outputs of the 2 single axis joysticks? and mainly, once i have the outputs what are the inbuilt functions to read analog values and vary digital outputs in an arduino??