garykac / amhs-robotics-4681

Repository for AMHS's FRC (FIRST Robotics Competition) team
3 stars 0 forks source link

Sensors for measuring LifterHight #27

Open cmarley3-14 opened 5 years ago

cmarley3-14 commented 5 years ago

https://github.com/garykac/amhs-robotics-4681/blob/4210af8eab9108ee03218ffa341b8927d5250e9b/workspace/2019%20DeepSpace/src/main/java/frc/robot/LifterHight.java#L18-L52

The concerns that have been brought up include:

BTW, kDIOLifterHeightSensor = 2.

RyanDecker123 commented 5 years ago

we are not using Ultrasonics in lifterheight

cmarley3-14 commented 5 years ago

Wait... so what's the lifter height sensor and counter for? What is it doing?

garykac commented 5 years ago

We need to test the laser distance sensor for measuring the lifter height.

garykac commented 5 years ago

The laser sensors arrived and were sitting on the workbench. I moved them into the "programming" bag hanging on the wall. They're in blue bubble wrap. They need to be wired up and code written to read the values (hopefully, there's a library for them already).

RyanDecker123 commented 5 years ago

some resources: http://static.garmin.com/pumac/LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf https://docs.px4.io/en/sensor/lidar_lite.html

cmarley3-14 commented 5 years ago

This is the source code: https://github.com/GirlsOfSteelRobotics/Docs/wiki/LIDAR-Lite-Distance-Sensor

cmarley3-14 commented 5 years ago

The pdf of the roborio with specificatinos for wiring and in/out put stuffs. http://www.ni.com/pdf/manuals/374474a.pdf

We should be wiring according to the left side. If it doesn't work, switch to the right side. image

Reading the comments will help decode the code. It may be relevant and helpful. Especially with working with pinouts and how to get data. Otherwise, just refer back to Ryan's code. https://github.com/garmin/LIDARLite_Arduino_Library/blob/master/examples/v3/GetDistancePwm/GetDistancePwm.ino

Has pinout charts (determine which is relevant) and a (possibly relevant) picture at the bootom of webpage. https://docs.px4.io/en/sensor/lidar_lite.html

Team4681 commented 5 years ago

https://learn.sparkfun.com/tutorials/lidar-lite-v3-hookup-guide/all

Team4681 commented 5 years ago

Code now reads in inches within an inch currently calibrating values but it works

amhsrobotics4681 commented 5 years ago

Wiring information on LIDAR:

Wire Color Function
Red 5Vdc (+)
Orange Power enable (internal pull-up)
Yellow Mode control
Green I2C SCL
Blue I2C SDA
Black Ground (-)

(from http://static.garmin.com/pumac/LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf)

amhsrobotics4681 commented 5 years ago

Wiring info (from https://github.com/GirlsOfSteelRobotics/Docs/wiki/LIDAR-Lite-Distance-Sensor):

roboRIO
DIO Port                           LIDAR-Lite
--------                           --------
Power  __________________________  +5V Power

Signal __________________________  Mode Select
               | 1KOhm
               |_/\/\/\_
Ground _________________|________  Ground

Other wires are not used.

cmarley3-14 commented 5 years ago

moved to wiki

garykac commented 5 years ago

The work item here is getting the LIDAR to work and that is not complete.