I’m on to a new phase of my project, and unfortunately I am once again having strange issues. I am using a photoresistor to determine the color of painted balls, and the circuit works fine. When I test using LynxTerm, the values I get are perfect – I can easily tell which balls are black or white (as well as whether a ball is actually present). However, the values my BS2 is getting are very different from them and don’t seem to be accurate. Any advice? I’m testing the ball twice, once with a red LED on and once with it off. The values the stamp reports make white and black seem one and the same.
I know that both SERIN and SEROUT are the correct BAUD and pin because they work perfectly for movement and queries, but these values just don’t add up.
What version of the firmware are you running? I suspect it is version 1-03XE. If you upgrade to version 1-06XE it will fix the problem. It is the same as version 1.03XE with the following changes. Pulse Offset bug fixed. Added a 600uS transmit delay and a 70uS pacing for the query commands. This will allow communication with slower processors, such as the BS2. Sorry you had to struggle with it.
[edit] Added reply just as the one above was made. I cannot check it now, but I will try it out as soon as I get a chance when I get home. Thanks
As an example, here is the data that I’m receiving:
LynxTerm
No ball Black White
LED=Off 98 0 3
LED=On 165 150 223
Basic Stamp 2 reported values
No ball Black White
LED=Off 246 192 193
LED=On 245 254 255
As you can see, the first set of numbers would be absolutely perfect … if they worked