Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Interfacing / Re: RS232 Serial Tilt Sensor on: January 19, 2010, 08:43:00 pm
Hey, sorry about the missing stuff from before.

My sketch is just the sample for the Serial.read()
http://arduino.cc/en/Serial/Read

The sensor I am using is this:
http://www.spectronsensors.com/datasheets/SDS-102-2104.pdf

 Forget what I said earlier about the string of zeros. It was a string of 1s, and it was because I was trying to read the Rx pin as digitalRead(0). I don't think that string of 1s actually means anything because I got the same thing if the sensor wasn't hooked up at all.


Grumpy_Mike, I think I get what you are saying, that the board cannot take in some serial data if I am trying to view the serial monitor at the same time, is that correct?

The goal of all this is for the board to turn 2 servos to compensate for the tilt of the sensor, but before I hooked up the servos I wanted a way to see if the data was actually being received correctly by the board. I have the RS232 sensor connected to the TTL converter, connected to the Tx/Rx pins on the Arduino board. Does the software serial define 2 new pins for serial communications? Effectively giving me 2 Rx and 2 Tx pins?
2  Forum 2005-2010 (read only) / Interfacing / RS232 Serial Tilt Sensor on: January 19, 2010, 09:40:53 am
I'm new to using Arduino, and I've been trying to hook up a tilt sensor that communicates in RS232. I know the Arduino Duemilanove board uses TTL, not RS232, but I have a converter.

The problem is I can't seem to actually get the data from the sensor. The sensor I'm working should return 2 sets of data as it rotates around the x and y axis. I've other sensors on the board (potentiometer, etc) for practice and have gotten them to work. However when using this tilt sensor, I get just end up with a string of zero's. Now and then, when I move the sensor quickly, i''l get a -1.  :-/

My guess is that Arduino is trying to read both sets of data as a single one? I'm guessing there should be a way to tell the board to seperate them, but I haven't been able to find anything. Has anyone ever run into this kind of problem before?
Pages: [1]