Intelligent Lifting Lever

From Microduino Wiki
Revision as of 03:19, 21 May 2015 by 1304410487@qq.com (talk) (Created page with "{{Language| Smart Lift Lever }} {| style="width: 800px;" |- | ==Objective== Simulate switch of a lift lever through Crash key. Just press the key, the lift lever as well as th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Language: English  • 中文

Objective

Simulate switch of a lift lever through Crash key. Just press the key, the lift lever as well as the servo will get rasied and the small car gets through.

Principle

Judge if Crash key is pressed down or not. When pressing down, please make sure the lift lever rotates to a certain angle. The small car goes on Y-axis and gets smaller, meaning the car getting through. Meantime, you can control the rotation of the servo to a certain angle to simulate a true rise of the lift lever.

Equipment

=Hardware Buildup

  • Setup 1:Stack CoreUSB and Sensorhub.
  • Setup 2:Connect Crash to D2.
  • Setup 3:Connect servo to D8.

Software Debugging

  • Setup 1:Build Scratch programming environment.
  • Setup 2:Start programming. Example program download: File:Landing Car.zip
  • Setup 3:Code description: Monitor Crash key value and make servo rotate to a certain angle for one part and you can see the key value change in Scratch for another part.
    • Monitor Crash key value and make servo rotate to a certain angle at the same time. You can see the lift lever open.
    • The small car moves according to Crash values.

Result

Press down the key, the lift lever is activated when rotating a certain angle. The small car goes on Y-axis and gets smaller, meaning the car getting through. Meantime, you can control the rotation of the servo to a certain angle to simulate a true rise of the lift lever.

Video