Intelligent Lifting Lever

来自Microduino Wikipedia
跳转至: 导航搜索
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: 文件: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