Teeterboard

来自Microduino Wikipedia
1304410487@qq.com讨论 | 贡献2015年5月21日 (四) 03:19的版本 (Created page with "{{Language| Teeterboard}} {| style="width: 800px;" |- | ==Objective== Here we simulate two persons via two Crash keys and Scratch to play teeterboard. ==Principle== Judge if...")
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索
Language English

Objective

Here we simulate two persons via two Crash keys and Scratch to play teeterboard.

Principle

Judge if Crash keys are pressed or not and control the lean according to Crash values.

Equipment

Build Hardware

  • Setup 1:Stack CoreUSB and Sensorhub
  • Setup 2:Connect two Crashes to D2 and D3 via deconcentrator.

Software Debugging

  • Setup 1:Build Scratch programming environment.
  • Setup 2:Start programming. Example program download:文件:Seesaw.zip
  • Setup 3:Code description: Detect two Crash values for one part and lean in a fixed range according to the values.
    • You need to create two variables to save the two Crash data.
    • Tilt the teeterboard according two variables.

Result

Press the left Crash key, the teeterboard will tilt leftward and vice versa.

Video