New Year Countdown Clock with Circuit Playground Express

Similar documents
Make It Sound. Created by Mike Barela. Last updated on :10:45 PM UTC

Circuit Playground Hot Potato

Infrared Receive and Transmit with Circuit Playground Express

Digital Circuits 4: Sequential Circuits

COMP2611: Computer Organization Building Sequential Logics with Logisim

Edge Connector Light Level Detector

Binary s UFO Inventors Manual

SparkFun Inventor's Kit for micro:bit Experiment Guide

Experiment 0: Hello, micro:bit!

Transmitter Installation and Operation

SX7. Saga 7" Super Bright HDMI/3G-SDI Field Monitor with 3D-LUTs. Quick Start Guide. What s Included CHECKED BY

sonic pi / Jungle Doctor Who

DH7-DK QUICKSTART GUIDE. DH7 4K Support HDMI On-Camera Field Monitor Deluxe Kit

Procedure: Procedures: DIME TEAM: Drop # (circle one) Date: In Lab (either on Level 4, Level 6, or in shop): Installation: Functional Check

BodyBeat Metronome Instruction Manual

A/V Equipment Manual

GarageBand Tutorial

EDL8 Race Dash Manual Engine Management Systems

Transmitter Interface Program

S7H-DK S7H 7" High Bright Monitor Deluxe Kit

Introduction 1. Green status LED, controlled by output signal ST

MAutoPitch. Presets button. Left arrow button. Right arrow button. Randomize button. Save button. Panic button. Settings button

Introduction 1. Digital inputs D6 and D7. Battery connects here (red wire to +V, black wire to 0V )

Reference Guide 2015 ZOOM CORPORATION. Copying or reprinting this manual in part or in whole without permission is prohibited.

Your EdVenture into Robotics You re a Programmer

2.4GHz Digital Wireless Video Door Phone User Manual

The NORD MODULAR G2 demo software

Spectacle Light Board Hookup Guide

Check our knowledge base at

y POWER USER MUSIC PRODUCTION and PERFORMANCE With the MOTIF ES Mastering the Sample SLICE function

Integrated Circuit for Musical Instrument Tuners

The Playful Invention Company. PicoCricket Troubleshooting. Version 1.2a

CVP-609 / CVP-605. Reference Manual

About your Kobo ereader...6

WDP02 Wireless FHD Kit User Manual

10 Zone RGB-W LED Controller

Hip Hop Activity Box. Instruction Manual. Hip Hop Activity Box 22875, October 2018 Copyright ROMPA Ltd

About your Kobo ereader...6

About your Kobo ereader...5

EN Wireless programmable thermostat

AxumVideo 0 intro. Now that you have connected the different AXUM system parts, you are ready to configure the system according to your own needs.

What is the correct software program to use with my ClearOne units?

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Electronic Equipment Manual For 101, 102, 301 & 302 Azrieli Theatre For further information, please visit our website at:

Sound to Sight Showtime

Introduction. The Clock Hardware. A Unique LED Clock Article by Craig A. Lindley

DIGITAL PERSONAL STUDIO Version 1.30 Addendum

UHF Wireless Microphone System

CDM10: Channel USB Mixer. Item ref: UK User Manual

PHOENIX AUDIO. Owner s Manual

Spectacle Light Kit Hookup Guide

Let s Get Loud. The Big Idea. Supplies. Key Prep: What s the Math? Grades K-2

Board Production In CircuitPro

Neuratron AudioScore. Quick Start Guide

Introduction 1. Green status LED, controlled by output signal ST. Sounder, controlled by output signal Q6. Push switch on input D6

Smart Lighting Demos

DH5e-V2. Delta 5 On-Camera 4K HDMI Monitor with 3D LUTs. Quick Start Guide. What s Included

1 Synchronising Xsens with the Delsys Trigno EMG System

Introduction To LabVIEW and the DSP Board

CVM-WM300. UHF Wireless Microphone USER MANUAL

TELETEST Ltd 4-6 Shelley Road, Bournemouth, BH1 4HY, UK Tel: Intl: Web:

The Micropython Microcontroller

Software Ver

ALL 221 Classroom Technology

Character LCDs. Created by lady ada. Last updated on :47:43 AM UTC

Classroom. Chapter 1: Lesson 6

Data Acquisition Instructions

Arduino Lesson 3. RGB LEDs

1CHDVRD1 USER MANUAL. These instructions apply to unit model 1CHDVRD1 only. Please read carefully before use.

USER GUIDE MULTI-CHANNEL STEREO MIXER S MIX 4M2S UD

SynthiaPC User's Guide

Getting started with Spike Recorder on PC/Mac/Linux

EEM Digital Systems II

Camtasia for Mac. Create Your First Video Guide. Release 1.1. February TechSmith Corporation. All rights reserved.

RMS 8424S Quick Start

Diamond Piano Student Guide

Music Tech Lesson Plan

LEGO MINDSTORMS PROGRAMMING CAMP. Robotics Programming 101 Camp Curriculum

IMPORTANT: before using your new Sparkup, watch the tutorial at or read the following instructions.

LMH0340/LMH0341 SerDes EVK User Guide

SIGNAL PROCESSOR. Operation Manual

HCS-4100/50 Series Fully Digital Congress System

SIGNAL PROCESSOR. Operation Manual

Design and Realization of the Guitar Tuner Using MyRIO

VISUAL PRESENTER P100HD

Installation Guide. NEC InfinityBoard 65 & 84

Arduino LED Matrix Control. Controlling lots of LEDs

User Guide MD755. Programmable Motion Sensor for BrightSign Solid State Digital Sign Controllers. Overview

SDS PODCAST EPISODE 96 FIVE MINUTE FRIDAY: THE BAYES THEOREM

GFT channel Time Interval Meter

Reference Guide 2014 ZOOM CORPORATION. Copying or reprinting this manual in part or in whole without permission is prohibited.

USING MEDIACAST FOR LIVE EVENTS THERE ARE THREE SEPARATE KEYS NEEDED TO ACCESS THE FRONT AND BACK OF THE VIDEO CART.

DH5e QUICKSTART GUIDE. 5" 4K Support HDMI On-Camera Field Monitor w/ Touch Screen

Auxiliary states devices

17 19 PROFESSIONAL LCD COLOUR MONITOR ART

Let s Animate! 15 Clock 15 Variables 17 Logic 17. I see a mistake! 20

Outline ip24 ipad app user guide. App release 2.1

MODE MENU /F1 /F2 F3 F4 PLCMHD80

32" LED Television. Initial Assembly B. Main Unit. 1. Fix the Left Base Stand to the main unit using 2 pcs provided screws.

spiff manual version 1.0 oeksound spiff adaptive transient processor User Manual

Transcription:

New Year Countdown Clock with Circuit Playground Express Created by John Park Last updated on 2018-08-22 04:05:02 PM UTC

Guide Contents Guide Contents Overview Program It With MakeCode Clock and Noisemaker On Start Functions Switch It Loud Sound Write a Song Function Countdown 2 3 4 4 4 5 6 7 8 9 Adafruit Industries https://learn.adafruit.com/new-year-countdown-clock-with-circuit-playground-express Page 2 of 10

Overview Press a button on your Circuit Playground Express to begin the countdown of the last ten seconds of the year! It will count them down on the NeoPixel LEDs, and play Auld Lang Syne when the New Year has begun! Plus, you can flip the switch to get to Party Favor Noisemaker mode, where you can blow on the Circuit Playground Express and it will animate the lights and play festive sounds! 1 x Circuit Playground Express super awesome microcontroller board ADD TO CART 1 x 3 x AAA Battery Holder with On/Off Switch, JST, and Belt Clip ADD TO CART 1 x Alkaline AAA batteries 3 pack ADD TO CART Or, get the bundle of all the parts, plus a USB cable and mini storage box: 1 x Circuit Playground Express Base Kit ADD TO CART Adafruit Industries https://learn.adafruit.com/new-year-countdown-clock-with-circuit-playground-express Page 3 of 10

Program It With MakeCode You'll begin by getting familiar with MakeCode, in case you haven't used it before, by following this guide (https://adafru.it/agq). Then, return here to program your Circuit Playground Express with the NYE Clock code. https://adafru.it/agq https://adafru.it/agq Clock and Noisemaker We'll give the Countdown Clock a few different capabilities: Turn it on to hear a short intro to Auld Lang Syne, the lights turn on purple and white Press the B button (the one on the right) to hear the intro again at any time Blow on the microphone to create a party horn noisemaker sound as long as you blow Press the A button at ten seconds until midnight -- it will count down the seconds with the NeoPixel LEDs, and then play a festive animation, and the full rendition of Auld Lang Syne Flip the switch to the left to disable the noisemaker This is the embedded code window for MakeCode. If you like, you can download it and then drag it onto you Circuit Playground Express in CPLAYBOOT mode to start playing with the clock and noisemaker immediately. If you'd like to take a closer look at how it works, follow on below. On Start Follow the image below to create the on start block. The code contained within it will run once at start-up. This is a good place to set parameters, such as: set brightness to control NeoPixel brightness set volume to set the base volume level for notes and songs set tempo to set the meter for songs You'll also add a show ring block to turn on the NeoPixels in an alternating white/purple pattern by clicking a color Adafruit Industries https://learn.adafruit.com/new-year-countdown-clock-with-circuit-playground-express Page 4 of 10

wedge and then clicking each pixel circle in the wheel. Functions Sometimes, there are pieces of code that are complex or long, and need to be used in multiple places throughout your program. In this program, the songs that we'll play qualify. Both the startup and button presses cause the songs to play, so we don't want to have to write the songs, note by note, in multiple places. This is where functions come in! A function is a user-defined block you can create and name, which you can then refer to elsewhere with a call function block. Create one by clicking ADVANCED category dropdown, and then the FUNCTIONS category, and then clicking Make a Function. Name the function play_auld_lang_syne_intro. You'll see the blue function play_auld_lang_syne_intro block appear on the canvas. We'll add code to it later. For now, drag the call function play_auld_lang_syne block to your on start block as shown. Go ahead and make a second one the same way, named play_auld_lang_syne. Adafruit Industries https://learn.adafruit.com/new-year-countdown-clock-with-circuit-playground-express Page 5 of 10

Switch It We'll use the switch to turn on and off the loud sound detection that will be used to control the noisemaker function. Create two on switch moved blocks. Set one to left and one to right. Create a variable called noise_maker to use in a couple of set item to 0 blocks as seen below. Place one in the on switch moved left block and leave the value at 0, then place the other in the on switch moved right block, and change the value to 1. This variable can then be read inside another block to change functionality based on the switch position. Adafruit Industries https://learn.adafruit.com/new-year-countdown-clock-with-circuit-playground-express Page 6 of 10

You'll also use another pair of show ring blocks to change the colors. Green means "safe" and red means "it's gonna get noisy in here!" Loud Sound This is a pretty neat trick -- the microphone can be tested for loud sounds, and blowing on the mic happens to trigger it. So, we can blow on the mic just like a real party horn! Create an on loud sound input block, and then add an if true then block as shown below. Drag in the noise_maker variable and change the True to a 1. Now, the switch position will dictate if the code contained with in gets run or not. When the switch is flipped right, and there's a loud sound, we can do the following: set all pixels to blue while sound level > 100 show ring play tone at sound level x 10 for 1/16 beat This will create a really fun, noisy, squealy sound, because the pitch of the sound will vary based on the volume of the noise. Blow softly for a lower tone, and blow hard to raise the pitch! Adafruit Industries https://learn.adafruit.com/new-year-countdown-clock-with-circuit-playground-express Page 7 of 10

Write a Song Function Earlier, we created a couple of functions for our songs. Now, we can populate them with play tone at _ for _ beat blocks. Follow the image to create the intro to Auld Lang Syne and then a second time for the full song. Adafruit Industries https://learn.adafruit.com/new-year-countdown-clock-with-circuit-playground-express Page 8 of 10

Countdown Make an on button A click block, and an on button B click block. The B button is simple -- we'll just use this to play the intro to the song. Add a call function play_auld_lang_syne_intro block. Button A has more going on -- first, set all pixels to medium white. Then, we'll count down the ten seconds with a for index from 0 to 9 block. Inside this: set brightness to 20 play tone at 1020 Hz for 1/8 beat pause for 1 second set pixel color at index to blue Since the index variable changes with each iteration of the loop, this is what changes the color of each sequential NeoPixel. Adafruit Industries https://learn.adafruit.com/new-year-countdown-clock-with-circuit-playground-express Page 9 of 10

Once the ten seconds have counted down, the play sound magic wand block plays, then show animation sparkle for 3000 ms. Then, we'll set brightness down to 15, and show ring to alternating blue and green. Finally, we get to play the full song with call function play_auld_lang_syne. Happy New Year! Adafruit Industries Last Updated: 2018-08-22 04:04:56 PM UTC Page 10 of 10