Skip to content

Latest commit

 

History

History
93 lines (48 loc) · 2.16 KB

demo.md

File metadata and controls

93 lines (48 loc) · 2.16 KB

Demo Talking Points

  • As you can see, the CPX has lots of sensors and lights to play with

  • In 2018, we found the younger kids were interested in the CPX the older kids worked with

  • We created two programs with the CPX in order to include the younger kids in the fun

  • MakeCode - block based coding

  • CircuitPython - Python based coding

MakeCode

  • Our curriculm is on our the website

  • which is open source and freely available for use

  • Click on Curriculum where we have all of our workshops

  • Go to the MakeCode workshops

  • appropriate grades for this workshop is 5-7

  • All of our sessions are here but for this demo we just need to go to the MakeCode Editor

  • Start a New Project

  • You can see:

    • Device Simulator
    • Forever Loop in the code editor
    • Code Block Categories
  • I'm going to make the device turn on lights when I Shake it so I go to input and select Shake

  • Just an easy drag and drop

  • Make the lightsOn variable

  • easy right click options

  • now I need to set the lights to turn on and off

  • and add the lightsOn variable

  • I use colors other than red and green in case a student is color blind

  • Name and save

  • The code is downloaded as firmware to my host computer

  • Plug in the CPX

  • Shows up as a UBS drive and I'll drag and drop to load it

  • You don't have to download to device to test

  • Since we are using shake we can see shake is on the device simulator

  • If students prove to be more advanced they can look at the Javascript editor

  • Read through code and make changes, like how I'm going to adjust the color in Hexidecimal

  • Lets go back to see the Blocks color has changed to purple

  • Download the update to the device

CircuitPython

  • Go to the website

  • Select CircuitPython

  • Lets choose the Acceleronmeter exercise

  • Plug in the CPX

  • Shows up as a USB drive with some files in it

  • we are going to edit the main.py

  • opens automatically when we open Mu editor

  • Copy and paste from the website

  • Save and the CPX reloads with the new code

  • Select Serial and you immediately see the device return data

  • Select Plotter and you see the data on a graph

  • Mu is made for CircuitPython and is a great teaching IDE