Using the SparkFun PicoBoard and Scratch

Similar documents
Getting Started Guide

Teaching Kids to Program. Lesson Plan: Interactive Holiday Card

Getting Started Guide

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

Getting Started with the micro:bit

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

HTC VIVE Installation Guide

GrovePi Temp-Humidity Sensor Lesson Video Script. Slide 1

Coding with Arduino to operate the prosthetic arm

Lab 06: Ohm s Law and Servo Motor Control

Creating Computer Games

Rodni What will yours be?

Tilt Sensor Maze Game

LogicBlocks & Digital Logic Introduction a

RUNNYMEDE COLLEGE & TECHTALENTS

On the front of the board there are a number of components that are pretty visible right off the bat!

MicroLab 500-series Getting Started

Getting started with the SparkFun Inventor's Kit for Google's Science Journal App

1Getting Started SIK BINDER //3

Your Hammond Sk-series keyboard is shipped from the factory set for 120 V.A.C. power. To connect the Sk-series keyboard to A.C.

Lesson 3: Arduino. Goals

ECE 2274 Lab 1 (Intro)

LAUNCHPAD. Getting Started Guide

Tarocco Closed Loop Motor Controller

1hr ACTIVITY GUIDE FOR FAMILIES. Hour of Code

Downloading a ROBOTC Sample Program

Introducing Scratch Game development does not have to be difficult or expensive. The Lifelong Kindergarten Lab at Massachusetts Institute

LogicBlocks & Digital Logic Introduction

Example KodeKLIX Circuits

Blue Point Engineering

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. S4A - Scratch for Arduino Workbook

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink

Studuino Icon Programming Environment Guide

A Super trainer with advanced hardware and software features only found in very expensive equipment.

Ohm s Law. Equipment. Setup

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

MAKEBLOCK MUSIC ROBOT KIT V2.0

Game Making Workshop on Scratch

Nano v3 pinout 19 AUG ver 3 rev 1.

STRUCTURE SENSOR QUICK START GUIDE

Your EdVenture into Robotics 10 Lesson plans

BMW E90 Android Touch Screen Radio Installation Instructions

DragonLink Advanced Transmitter

Interfacing Clockaudio microphones with the Logic Box

Ultimate Actuator Drivebox 30A Quick start guide

etatronix PMA-3 Transmitter Tester Manual

A flashlight. An electric toothbrush. A TV remote control.

LAB 1 AN EXAMPLE MECHATRONIC SYSTEM: THE FURBY

Instruction Manual. Ultrasonic and Radar

Attribution Thank you to Arduino and SparkFun for open source access to reference materials.

MT Alliance Temperature Sensor Calibration Procedure

Mic Mate Pro. User Manual

understanding sensors

RigExpert TI-7 USB Transceiver Interface User s manual

Understanding the Arduino to LabVIEW Interface

LIGHT-SCENE ENGINE MANAGER GUIDE

Ev3 Robotics Programming 101

Controlling a Sprite with Ultrasound

Vision Ques t. Vision Quest. Use the Vision Sensor to drive your robot in Vision Quest!

Lost in Space. Introduction. Scratch. You are going to learn how to program your own animation! Activity Checklist.

ezsystem elab16m Light Sensing Robot

A Day in the Life CTE Enrichment Grades 3-5 mblock Robotics - Simple Programs

OVEN INDUSTRIES, INC. Model 5C7-362

Programming I (mblock)

Installation & Quick Start Guide AIT2000 Class B AIS Transponder

The SparkFun Guide To Arduino By Derek Runberg;Brian Huang READ ONLINE

Touch Potentiometer Hookup Guide

Veterinary Digital X-Ray System Quick Start Guide

PWM P108. Programming Instructions v 3.2 PWM Controller Software

ICS REPEATER CONTROLLERS

Copyright 2017 MakeUseOf. All Rights Reserved.

User s manual. Signaling. Connection of emergency button

// Parts of a Multimeter

Digital Multifunctional RC-Soundmodule TBS Mini V2

BrewsBySmith.com STC DIY Kit

MAX11300PMB1 Peripheral Module and Munich (USB2PMB1) Adapter Board Quick Start Guide

Quick Start Guide.indd 1 05/11/15 10:07

Line Detection. Duration Minutes. Di culty Intermediate. Learning Objectives Students will:

Starting from LEARNER NOTES edited version. An Introduction to Computing Science by Jeremy Scott

Velleman Arbitrary Function Generator: Windows 7 by Mr. David Fritz

In this project you ll learn how to create a times table quiz, in which you have to get as many answers correct as you can in 30 seconds.

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

WCS-D5100 Programming Software for the Icom ID-5100 Data

isys-4001 isys-4002 isys-4003

Brain Game. Introduction. Scratch

SCATT Biathlon shooting trainer User s Manual

An Introduction to Programming using the NXT Robot:

iphoto Getting Started Get to know iphoto and learn how to import and organize your photos, and create a photo slideshow and book.

IGNITE BASICS V1.1 19th March 2013

EE 210: CIRCUITS AND DEVICES

ABC V1.0 ASSEMBLY IMPORTANT!

EULAMBIA ADVANCED TECHNOLOGIES LTD. User Manual EAT-EOM-CTL-2. Alexandros Fragkos

Ambir ImageScan Pro 930u. User Guide. High Speed Document Scanner with UltraSonic Misfeed Detection. Ver 1.2. p/n UG930u-1.

isys-4004 GUI interface - V2.1 Power up Initialize Peripheral Start Measurement YES LED flashes red Object available LED blinking

In this project we ll make our own version of the highly popular mobile game Flappy Bird. This project requires Scratch 2.0.

smraza Getting Start Guide Contents Arduino IDE (Integrated Development Environment)... 1 Introduction... 1 Install the Arduino Software (IDE)...

Thomas S. Narro David Zucker Darren Garnier 4/05. Copyright 2005 CPO Science

Internet of Things Student STEM Project Jackson High School. Lesson 2: Arduino and LED

ACCU-GOLD QUICK START MANUAL

Built-in soft-start feature. Up-Slope and Down-Slope. Power-Up safe start feature. Motor will only start if pulse of 1.5ms is detected.

Transcription:

Page 1 of 7 Using the SparkFun PicoBoard and Scratch Introduction Scratch is an amazing tool to teach kids how to program. Often, we focus on creating fun animations, games, presentations, and music videos in Scratch. But, imagine how how cool it would be if you could add physical interactivity into your Scratch animation. For example, what if your Scratch character started to dance when you turned off the lights in your room or stopped as soon as the lights turned back on! With the PicoBoard, we can do all of this and more. What is the PicoBoard? The PicoBoard is a piece of hardware called a sensor board that can be combined with MIT s Scratch programming environment to allow your Scratch programs to react (and even respond) to events happening outside of the computer. (If you re unfamiliar with Scratch and would like to learn more about it, read the Science Buddies Introduction to Scratch page.) A sensor is a device that detects (senses) and measures the presence or absence of something. The PicoBoard is actually made up of several different types of sensors so it can detect many different somethings, including sound and light. The PicoBoard has several sensors that can be used directly with the Scratch programming environment: Slider: Changes values from 0 to 100 based on the position of the slider. Light Sensor: Changes values from 0 to 100 based on the amount of light on this sensor.

Page 2 of 7 Button: The position or state of the button controls the button pressed value (true or false). Sound Sensor: Changes values from 0 to 100 based on the amount of sound it detects. Auxiliary Connections (A,B,C,& D): Alligator Clips: These are generic connections to any resistive sensor. As the resistance changes, so does the input value. This sensor can also be setup as a digital detector to detect whether the alligator clips are connected. Download Scratch 1.4 Note: Currently, the PicoBoard is only compatible with Scratch 1.4. To get started, you will need to install Scratch 1.4 for your computer. Visit scratch.mit.edu/scratch_1.4/ to download version 1.4 of Scratch. At this moment, the interface between Scratch 2.0 and the PicoBoard is currently under development. We are still working out the kinks of this. We recommend using the older and stable (v1.4) version of Scratch for interfacing to the PicoBoard. Installing Drivers In addition to installing Scratch, you will need to install the FTDI drivers for your computer. The FTDI driver will allow the PicoBoard hardware to communicate with your computer. Follow our guide here on how to install and setup the drivers for your machine. Connecting the PicoBoard Using the USB cable, connect the PicoBoard to your computer, and open up Scratch. To test the functionality, let s play with the Scratch sprite s size feature using this block. Find these blocks and string them together. Move the (slider sensor value) block into the set size block to replace the size by the sensor value. Find the Green Flag Hat block and forever block under the Control palette, the set size block under the Looks palette, and the sensor value block under the Sensing palette. Assemble the blocks together so that it looks like this:

Page 3 of 7 Click the green flag or the hat block to start your program. In a few seconds, you should see the red / green lights on your PicoBoard start flashing. Move the slider back and forth and watch what happens! The red / green lights indicate data is being received (RX) and transmitted (TX) between the PicoBoard and your computer. The Sensor value reporter block can be used in place of any value field (blank / number) in Scratch. Experiment with any of the other Scratch blocks such as move ( ) steps or go to x: ( ) y: ( ). Any of these values can be replaced by the sensor value from the PicoBoard. Find your favorite Scratch program and re-mix it using the Sensor blocks! Using Additional Sensors (PicoBoard Add-on / LabPack) The PicoBoard LabPack comes with several add-ons to attach the the auxiliary ports. How to Add Sensors to the PicoBoard The four additional ports (A-D) allow the PicoBoard to be connected to a number of other additional sensors. The PicoBoard measures the resistance across the two alligator clips. When plugging in the PicoBoard connectors, make sure that you push the connector all the way in. Plug an alligator clip into one of the PicoBoard end connectors. There are four end connectors. They are A, B, C, or D. The PicoBoard measures the resistance between the two alligator clips of the auxiliary ports. You can use any resistive sensor with these clips. We ve created an add-on kit of parts that you might find useful to play with. In the add-on kit, we have: Button / Switches (Digital Sensors) The most basic sensor is a simple switch. Switches allow us to electrically connect or disconnect a path for electricity between two metal connections. The PicoBoard senses whether or not the two alligator clips are connected. In the Add-on kit, we include two arcade switches.

Page 4 of 7 These switches are pretty neat. They use a momentary limit switch that has three connections to it. Connect one of the alligator clips to the inner-most tab. Connect the second alligator clip to the outer-most connection tab. The switches can be triggered in Scratch using the boolean sensor block: These blocks can be used with control blocks such as: Analog Sensors All other resistive sensors are considered analog sensors. The PicoBoard will measure the resistance of the sensor and report a value that ranges from 0 to 100 in Scratch. These values can be accessed using any of these blocks for the auxiliary sensors on A, B, C, or D. Turn / Rotary Potentiometer

Page 5 of 7 A rotary potentiometer is basically the same as the slider however, instead of moving the slider back and forth, you simply turn the knob on the potentiometer. Connect one of the alligator clips to the center tab and the second alligator clip to either one of the outside tabs. Note: The limits of this sensor will only vary from 0 to 50 (instead of 0 to 100). Motor Traditionally, a motor is an output device, but when connected to the PicoBoard, you can use the motor as a generator. Spin the motor and see what happens to your input values. Simply connect the two wires of the motor to the two alligator clips. Force Sensitive Resistor This square sensor senses pressure applied to the surface. As you press down on the square, the resistance changes. Attach the alligator clip extensions (regular alligator clip wires) onto the two metal prongs on the end of the Force Sensitive Resistor. When clipping, make sure that the metal clips are fully seated and touching the metal part of the sensor. Also, make certain that the alligator clips do not touch each other.

Page 6 of 7 Thermistor A thermistor is a special type of resistor whose resistance varies significantly with temperature. As the temperature increases, the resistance of a thermistor decreases. Technically, the thermistor requires the use of the Steinhart-hart equation to convert from the PicoBoard sensor values to a real temperature but, you can simply connect the thermistor up using the alligator clips. If you re interested in a guide to calibrating a thermistor in Scratch, check out our blog post on using a standard turkey thermometer in Scratch. Turkey Scratch -- Thanksgiving, Programming, and a 'lil Data Quick Reference Guide Now that you have the PicoBoard set up correctly, you re ready to start playing with it. The sensor table describes each sensor, how you can use it, and the Scratch blocks that you could use to capture and use the sensor information (Click the image for a larger view).

https://learn.sparkfun.com/tutorials/using-the-sparkfun-picoboard-and-scratch Page 7 of 7 1/18/2017 Resources and Going Further You re not limited to just the sensors that we include in the add-on kit. Experiment around with seeing what things are conductive and what things are not! Because the alligator clips measure resistivity (conductance), you can use this as a sensor for water salinity or conductivity of solutions. Check out these other educational SparkFun tutorials. DigitalSandbox PicoBoard Digital Sandbox Experiment Guide LogicBlocks & Digital Logic Introduction LogicBlocks Experiment Guide The Great Big Guide to Paper Circuits

https://cdn.sparkfun.com/assets/learn_tutorials/3/2/9/scratchpicotable.png Page 1 of 1 1/18/2017