The code you linked is for EasyC. The spike is just a normal PWM output, the important thing to note is the wiring:
Code:
,--W \
| R | digital output 1
| B /
/ W----'
to Spike | R----.
\ B--. '--W \
| R | digital output 2
'----B /
W,R,B = White, Red, Black
From there, all you need to do is make two robotc digital outputs (in the robot setup wizard) and assign them the correct values for forward, stop, and reverse
Forward: 1, 0
Reverse: 0, 1
Stop: 0, 0
Where 1, 0 means to set the first digital output to 1 and the second to 0.
WPILib also includes a kOn enumerated type, for 1, 1, but I'm not sure where it would be used.