Teeterboard

From Microduino Wiki
Revision as of 03:19, 21 May 2015 by 1304410487@qq.com (talk) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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:File: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.
Seesaw mCookie1.gif
    • Tilt the teeterboard according two variables.
Seesaw mCookie2.gif

Result

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

Video