Skip to content

Instantly share code, notes, and snippets.

View IowaDave's full-sized avatar

Iowa Dave IowaDave

View GitHub Profile
@IowaDave
IowaDave / pulseOneNote.ts
Last active October 8, 2018 02:27
Pulse One Note
//**********************************************************
// 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
//
@IowaDave
IowaDave / Toggle_Button_HD.ino
Created June 21, 2018 21:14
Toggle Button Example Code for HyperDuino
/*******************************************************
* Toggle Button | HyperDuino Example Code
*
* To demonstrate using Roger Wagner's Hyperduino
* with the 37 Sensors 2.0 kit by Elegoo.
*
* Target: Arduino IDE and compatible editors
*
* David Sparks June 21, 2018
********************************************************/
@IowaDave
IowaDave / Push_Button_HD.ino
Created June 21, 2018 20:48
Push Button Example for HyperDuino
/*************************************************
* Push_Button | HyperDuino example Code
*
* To demonstrate use of the HyperDuino with the
* 37 Sensors kit by Elegoo.
*
* Target: Arduino IDE and compatible editors
*
* by David Sparks June 21, 2018
**************************************************/
@IowaDave
IowaDave / Crypto_Button_MB.ts
Created June 21, 2018 19:10
Crypto Push Button for MakerBit
// *************************************************************
// Crypto Push Button | MakerBit Example Code
//
// Demonstrates coding to make a simple push button
// require a user code to activate a switch.
// The code counts the number of button presses in a short time.
//
// Target: MakeCode Javascript editor for micro:bit
//
// David Sparks June 21, 2018
@IowaDave
IowaDave / Toggle_Button_MB.ts
Created June 21, 2018 19:04
Toggle Button for MakerBit and MakeCode
// **********************************************************
// Push Button Toggle Switch | MakerBit Example Code
//
// To demonstrate using code to make a simply push button
// function as a toggle switch.
//
// Target: MakeCode Javascript editor for micro:bit
//
// David Sparks June 21, 2018
// **********************************************************
@IowaDave
IowaDave / Push_Button_MB
Created June 21, 2018 19:00
Simple Push Button for MakerBit/MakeCode
// ******************************************************
// Push button with pull-up resistor | MakerBit example
//
// To demonstrate using a micro:bit with the push-button
// module in the 37-Sensors kit by Elegoo.
// The module has a built-in pull-up resistor, so
// the signal pin is HIGH when the button is NOT pressed.
// Pressing the button grounds the signal pin to LOW.
//
// Target: MakeCode Javascript editor for micro:bit
@IowaDave
IowaDave / Motion_Switches.ts
Last active June 14, 2018 20:56
Motion_Switches
// ****************************************************************
// 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
@IowaDave
IowaDave / Position_Change.ts
Last active June 14, 2018 20:22
Position_Change.ts
// ****************************************************************
// 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.
@IowaDave
IowaDave / Shake_Event.ts
Last active June 14, 2018 18:05
Shake Event Example Code
// ********************************************
// 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.
//