This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//********************************************************** | |
// pulseOneNote - JavaScript code to beep a single | |
// tone using the passive piezo buzzer from the | |
// 37 Sensors kit by Elegoo, connected to Roger Wagner's | |
// MakerBit. Paste this code into the JavaScript view | |
// of the programming web site micrmicro:bit Roger Wagner's | |
// MakerBit. | |
// | |
// David Sparks October 2018 | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// **************************************************************** | |
// Motion Switches | MakerBit Example Code | |
// To demonstrate using a micro:bit controller with the | |
// Tilt, Shock, and Tap modules in the 37 Sensors Kit V 2.0 | |
// from Elegoo | |
// | |
// Copy and paste into the JavaScript side of the Microsoft | |
// MakeCode browser-based editor for micro:bit. | |
// | |
// by David Sparks June 14, 2018 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// **************************************************************** | |
// Position Change | MakerBit Code Example | |
// | |
// Track the average value of pitch or roll obtained from the | |
// built-in micro:bit accelerometer over the prior 1/2 second. | |
// Turn on LED for 1/2 second after detecting difference of | |
// more than 10 degrees in either axis compared to the average. | |
// | |
// Copy and paste this code into the JavaScript side of the | |
// Microsoft MakeCode browser-based editor for micro:bit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ******************************************** | |
// MakerBit Example | Detect Shake Event | |
// | |
// Lights an LED connected to Pin P16 | |
// for 1/2 of a second | |
// after micro:bit raises a Shake event. | |
// | |
// Paste into the JavaScript area of the | |
// Microsoft MakeCode online blocks editor. | |
// |