Unit Converter Drill¶
Run the Unit Converter Drill MicroSim Fullscreen
You can include this MicroSim on your website using the following iframe:
<iframe src="https://dmccreary.github.io/robot-arm/sims/unit-converter-drill/main.html"
height="622px" width="100%" scrolling="no"></iframe>
Description¶
Set a joint position in raw steps, degrees, radians or percent and see the other three units for a calibrated range you choose. Then calculate six conversions yourself and type the answers. Used in Chapter 10.
The dial shows one joint. The blue arc is its calibrated range, and the top of the dial is 0 degrees, the middle of that range. The four cards show the same position in four units, and the panel shows the working with 4095 / 360 = 11.375 steps per degree. A target beyond the range is held at the end of the range.
The calibrations of the shoulder pan (742 to 3242) and of the gripper (1977 to 3397) come from the Chapter 8 lab, which uses made-up positions, so they are illustrative.
Lesson Plan¶
Grade level: Middle school and up (age 12+). Time: 10 to 15 minutes.
- Explore. Leave the range at 742 to 3242 and move the raw value. Find the raw value that gives 0 degrees. What percent is it?
- Change the range. Move range_min or range_max. The same raw number now means a different angle. Why?
- Go past the end. Set the value in degrees and ask for 150 degrees. What raw value is sent, and what angle does the joint really reach?
- Six problems. Switch to Six problems. Work each one out on paper or with a calculator, type the number and press Check. You get one try for each.
- Think about it. Why does the library convert units only inside a driver, and use degrees everywhere else?
Specification¶
The learning objective, evidence of mastery and content for this MicroSim are specified in Chapter 10: A Python Hardware Library for Robot Arms.