Equip your Genius
Welcome to the Parallax Discussion Forums, sign-up to participate.
Learn with BlocklyProp
Light ware Sf 30/c give us wrong value using serial communication
2016-08-25 - 02:37:35
edited 2016-08-25 - 02:38:45
my Light ware sf 30/c give right value using usb mode after trying serial communication its gives us worng value
2016-08-25 - 08:18:13
Hello and welcome to the forums Danian !
I think other forum members will need a bit more information to help you.
Could you tell us a bit more about your setup (maybe include a photo)?
Also, post some example output data from both usb and serial (maybe between 3 and 5 values from each). Something that demonstrates the problem you see.
2016-09-22 - 07:34:42
Byte_L is fine but Byte_H is start from 128. In SF30 manual show that Byte_H+Byte_L/256
1680 x 1050
2016-09-28 - 10:59:14
I'm not familiar with this product, but maybe some other forum friends will have some ideas.
In the meantime, have you verified your hardware connections, including pullup or pulldown resistors if required, and that you are using the correct serial baud and protocol (ie. your Arduino matches the type of serial the laser is using, if that's open, true, driven, etc.. Check the datasheet).
Also, is your code able to read the serial data fast enough, without dropping any bits. Check the serial output from the laser with an oscilloscope if you can, to make sure you see the data you are expecting, and then move step-by-step through your hardware and code to figure out where things are going wrong.
That's all I can suggest, but good luck with it. Let us know how it goes, and hopefully your solution will help others too.