Sharp analog distance sensor and SSC-32U

Dear Support

When I purchased the LynxMotion AL5D arm last year I also purchased the Lynxmotion Wrist Rotate Upgrade (Heavy Duty) RB-Lyn-272 and the Lynxmotion Little Grip + Sharp Upgrade Kit LGSA-KT RB-Lyn-862 kit. Both these items I did not build into the base arm until I learned how to program it. Now that is complete amongst other things, I am looking to add the rotating wrist and distance sensor.

Would you happen to have any sample VB.Net code for reading analog or digital sensors attached to the SSC-32U controller board?

Thanks
Doug

Hi Doug,

You can certainly have a look at the code for the BotBoarduino (on the Lynxmotion GitHub) to read analog input from the SSC-32U. The README for that code also mentions the SSC-32U manual for more details on the commands used. You can check page 34 of the SSC-32U manual for details on the analog read commands. It should not be too hard to add this to your existing VB.NEt code base that you already have. Please note that you may want to send and read the result of the Vx command more than once and check the result before using it directly, as it may be wrong the first time around (initialization / charging of the ADC pin / etc.)

For the IR sensor, check the product page for the datasheet (page 5) under Useful Links. This will show you the curve for the voltage value / distance measurement. Please note that if your distance is below the minimum distance (must be calibrated for each sensor, varies a bit by a few centimeters), you will get a lower voltage, as if the measured distance was further way! Be careful, this has lead many beginning roboticist to have robots approach a wall, slow down and then suddenly accelerate into it, thinking the obstacle was suddenly very far away! :stuck_out_tongue:

Good luck!

Sincerely,

Thanks Sebastien

I will dig into it.

For a bit of fun, some time ago I have built a little rig with a Lego Mindstorm EV3 and controlled it through Wi-FI, a VB.Net program and joystick and I had a friend playing with it. When she ran it towards a wall the rig stopped stopped automatically and the computer yelled out " I am stopping A…hole, before you crash me". she was shocked and I burst out laughing as I had put the code in to use the Lego distance sensors front and back to take emergency action if required. The look on my friends face was priceless.

You have to have a little fun.

Take care, thanks for the advice and keep having fun.

Doug