I am getting closer to making it work, but there must be something I am missing. Going back over what I have done briefly…(1) assembled the DFRobotshop Rover 2 basic kit…(2) downloaded the Arduino software and connected the rover with USB…(3) have been able to program the rover to go forwards at full speed by uploading the “motor” sketch and use w/a/s/d on my keyboard with USB attached (I don’t have wireless components yet)…(4) connected the Sharp IR sensor as shown in the previous post…(5) copy/pasted the code from the link that was provided from the previous post…(6) uploaded that code.
At this point I remove the USB cord and turn on the rover and nothing happens. I was expecting it to move forwards until it got close to an object and then stop and turn another direction. I am pretty sure I have the IR sensor connected the right way because when I open the serial monitor (while USB attached) I see numbers scrolling down and the numbers change if I move my hand in front of the sensor. I am thinking that I am supposed to somehow combine the “motor” sketch with the IR sensor code/sketch?