Newbie Questions - Sensors and Motion

Greetings…

Just got my Rover in and starting to play around a little bit. A couple of questions about the Sensors first. In reading A0 (labeled light sensor on jumper), I’m getting an inverse proportion to light level (darker goes higher). Is this normal? Also, what is the scale and conversion for the temperature sensor, I’m reading around 55 from A1 and it is around 75 in the room I’m in?

With regards to motion, I’ve been trying a variety of methods to try to simultaneously start/stop motors. I’ve found commands to directly manipulate I/O as registers, but it seems that setting PWM with an analogWrite is the only way to control the motors. Sequential analogWrites will start one motor then the next, causing a slight turn before forward motion.

Thanks for the help…

Here’s how to read the temp sensor:
robotshop.com/forum/showthread.php?1522-Solved-LM35-Temperature-sensor

Analog write is how my rover gets PWM signals, but it seems to be able to start/stop without turning… (at least so far).

Hi Cool,

Welcome to the RobotShop Forum. The value for the light sensor will increase as the light intensity decreases (about 650 to 850 analog value). The conversion factor for the temperature sensor is not straightforward and most people use it simply to see a temperature change. You are free to read through the LM35 datasheet and calibrate the sensor accordingly. A value of around 55 corresponds to about 22C.

The L298 motor driver is directly connected to the digital PWM pins, so perhaps we do not understand how you are using hte analog pins to control the motors. There is sample code in the DFRobotShop Rover user guide.

Hope this helps,

Understood. We will be releasing encoders for the DFRobotShop Rover within the coming weeks which should help with this.

Sincerely,