Edge Connector Light Level Detector

Similar documents
Experiment 0: Hello, micro:bit!

The BBC micro:bit: What is it designed to do?

Binary s UFO Inventors Manual

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

Lesson Sequence: S4A (Scratch for Arduino)

SparkFun Inventor's Kit for micro:bit Experiment Guide

Inputs and outputs. Connecting leads. Buzzer

Theory and Practice of Tangible User Interfaces. Thursday Week 3: Analog Input. week. Sensor 1: Potentiometers. Analog input

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

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

Data Acquisition Using LabVIEW

DSO138mini Troubleshooting Guide

AXE101 PICAXE-08M2 Cyberpet Kit

Technology Control Technology

Using a Photron FASTCAM APX RS High-Speed Camera with MiDAS DA

Using a Vision Research Phantom v1610 High-Speed Camera with MiDAS DA

Basic LabVIEW Programming Amit J Nimunkar, Sara Karle, Michele Lorenz, Emily Maslonkowski

COLOUR CHANGING USB LAMP KIT

ThermalCapture GrabberUSB - User Guide

"shell" digital storage oscilloscope (Beta)

2. Get a free Adobe ID at adobe.com (Click Sign In (top right corner), click Get an Adobe ID, fill in the form and click Sign Up)

Building the ChronoDot Calendar Reminder

QUIZ BUZZER KIT TEACHING RESOURCES. Version 2.0 WHO ANSWERED FIRST? FIND OUT WITH THIS

7 SEGMENT LED DISPLAY KIT

Contents: 1 LANsmart Pro Main Unit 4 Remote Unit: ID1, ID2, ID3, ID4

ELECTRONIC GAME KIT ESSENTIAL INFORMATION. Version 2.0 BUILD YOUR OWN MEMORY & REACTIONS

MONO AMPLIFIER KIT ESSENTIAL INFORMATION. Version 2.2 CREATE YOUR OWN SPEAKER DOCK WITH THIS

ELECTRONIC GAME KIT TEACHING RESOURCES. Version 2.0 BUILD YOUR OWN MEMORY & REACTIONS

B2 Spice A/D Tutorial Author: B. Mealy revised: July 27, 2006

Spectacle Motion Board Hookup Guide

Objectives: Learn how LED displays work Be able to output your name on the display

Using an IDT Redlake X4 High-Speed Camera with MiDAS DA

SECU-16. Specifications Power: Input Voltage 9-12V DC or AC Input Current Max 200mA. 8 2-wire inputs, Analog (0 5VDC) or Supervised

1. Logging into My Media Mall

Alice EduPad Board. User s Guide Version /11/2017

DE2-115/FGPA README. 1. Running the DE2-115 for basic operation. 2. The code/project files. Project Files

Using Sliders with the 4201-B Lighting Controller Application Note June 26, 2008

B. The specified product shall be manufactured by a firm whose quality system is in compliance with the I.S./ISO 9001/EN 29001, QUALITY SYSTEM.

Hardware Guide BrightSign, LLC Version:.1 Los Gatos, CA, USA. MODELS: XD Product Line

Step What to do Expected result What to do if test fails Component tested 1 Visual inspection. Board is accurately assembled

Dual HD-SDI Output (MCX + BNC connector) HD- SDI Cable Driver. HDMI DVI Tx connector. Optical HD- SDI Output LC - connector. 8pin

PaPiRus Assembly Tips And Gotchas

Aegis Electronic Group

RECORD & PLAYBACK KIT

Tailgate module BEXPRO PRINS VSI

SPECIFICATION SFW056XU1-AV

ENGR 1000, Introduction to Engineering Design

RotorX RX122 Atom Building Guide

EP486 Microcontroller Applications

Instructions and answers for teachers

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

A Motor can be in many groups, by assigning additional channel# on it.

Combo Board.

FOUR CHANNEL USB RECORDER PCRU01. User manual. Table of Contents

Spring 2011 Microprocessors B Course Project (30% of your course Grade)

Configuring the Stack ST8961 VS Module when used in conjunction with a Stack ST81xx series display.

ECE Design Team 3 Madi Kassymbekov How to use MSP 430 Peripheral Sensors and use of LEDs as sensors

About your Kobo ereader...5

USB-0100TX USB Fast Ethernet Converter. User s Guide

Spectacle Light Kit Hookup Guide

About your Kobo ereader...6

8 PIN PIC PROGRAMMABLE BOARD (DEVELOPMENT BOARD & PROJECT BOARD)

Your EdVenture into Robotics You re a Programmer

Capstone Experiment Setups & Procedures PHYS 1111L/2211L

SquareLED - Aura Bar & Matrix Beam Light 100

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

Arduino Nixie Clock Modular Rev3

EDL8 Race Dash Manual Engine Management Systems

48x24. Options ORDER NUMBER OF TYPE PFL B


Atlatl FPV Video Transmitter

013-RD

BLINKIN LED DRIVER USER'S MANUAL. REV UM-0 Copyright 2018 REV Robotics, LLC 1

DOGM GRAPHIC SERIES 128x64 DOTS

Spectacle Light Board Hookup Guide

C2 +5V. (14) Vdd (+5 Vdc) (13) OSC1/A7 1.2K (12) 1.2K (11) 1.2K (10) U1 16F628 16F628A 1.2K (1) A2 1.2K (8) 1.2K (7) 1.2K. (Gnd) Vss (5) (6) 1.

INTRODUCTION GoNowTV

Troubleshooting. 1. Symptom: Status indicator (Red LED) on SSR is constant on. 2. Symptom: Output indicator (Yellow LED) on SSR is flashing.

DOGM GRAPHIC SERIES 132x32 DOTS

Mendeley Basics. Get Mendeley. Get Articles and Documents into Mendeley. Import Citations from a Website

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

Package Contents. LED Protocols Supported. Safety Information. Physical Dimensions

About your Kobo ereader...6

Data Acquisition Networks. Installing and Configuring the DM01 Hardware

NOTE: We take no responsibility if anything goes wrong or breaks when you try to do this!

Digital (5hz to 500 Khz) Frequency-Meter

USER MANUAL FOR THE ANALOGIC GAUGE FIRMWARE VERSION 1.1

New Year Countdown Clock with Circuit Playground Express

VIDEO GRABBER. DisplayPort. User Manual

COPYRIGHT NOVEMBER-1998

DAGON Company Leszno Jackowskiego 24 Street tel DAGON Lighting series SPL-3

Wall Ball Setup / Calibration

Hygrotest 600. Instruction manual WH / WHT -20/+70 C DH / DHT -20/+70 C / DHT -20/+120 C PHT -20/+70 C / PHT -20/+120 C

Night Hawk Firing System User s Manual

Harmony Ultimate. User Guide

DT1-PCM21. for Porsche PCM2.1 navigation systems

National Wire and Cable and National Cable Molding Headquarters Los Angeles California

Reason Overview3. Reason Overview

DOGM GRAPHIC SERIES. 128x64, 3.3V available in low quantity! flat: 5.6mm with LED b./l. mounted TECHNICAL DATA ORDERING CODE ACCESSORIES

DATA SHEET Panorama Rudder Indicator, TRI-2

Transcription:

Description This is a simple tutorial demonstrating how to use a Kitronik edge connector breakout with the BBC micro:bit. The tutorial will cover measuring ambient light levels with an LDR and dimming an LED correspondingly. In this example we will use the prototyping space on the breakout board with an LDR, two resistors and an LED. Learn how to: Breakout the BBC micro:bit using a Kitronik Edge Connector. Program your BBC micro:bit to read an external sensor. Control an LED based on light levels. Level of difficulty: Beginner. Parts List In order to complete this tutorial, you will need: 1 x BBC micro:bit. 1 x Edge connector breakout board. 1 x LED (most standard LEDs with a forward voltage no higher than 3V should work). 1 x Miniature LDR (dark resistance 20M, light resistance 5K). 1 x 100K resistor. 1 x 220 Ohm resistor. 1 x USB to Micro USB lead. 2 x AAA battery cage with JST connector. 2 x AAA batteries. 1 x Length of wire. You will also need the following equipment: A computer with a USB port and internet access.

Step-by-step guide to building an edge connector light level detector Step 1 First this tutorial will cover the code for the dimmer; the later steps will cover the hardware side of things. Go to the BBC micro:bit website, click Create Code then look for the Microsoft Research blocks banner and click New Project. Pick a name for your project and click create! Let s practice using the block system to build some code. The blocks are organised into categories and the categories are listed in a column down the left hand side of the screen. Step 2 Initially we need to create a forever loop. This is the block that the rest of our code will sit inside. The forever loop runs all the blocks inside it starting from the top and working its way to the bottom. Once it gets to the bottom block it starts again at the top and this process will continue forever. Click on the Basic category to open it and then drag the Forever block into the workspace. (This is the big white area in the middle of the screen.) The forever block is useful as it runs the program again from the beginning once all of the steps have been completed.

Step 3 This will require us to store and use data from a pin on the BBC micro:bit. To do this first we will create a variable, this is a location where we can store data in the BBC micro:bit s memory. We will then pull data from the pin and store it in that variable. Grab the Set item to block from the variables category. Rename the variable by clicking the dropdown and call it LightLevel. We will use this variable to store data from the LDR. The data stored will be a number between 0 and 1024 as this is how the BBC micro:bit sees analogue data. Drop this block into the forever block you just placed and you should find it snaps into position. Step 4 Now we have a variable ready to store temperature information we need to get the information from the sensor and put it into that variable. The way to do this is to perform an analog read. Attach an analog read pin block to the variable you just made. The analog read pin block is used to read data from a pin that you can select by clicking the drop down menu to the right hand side of the block. These blocks, when combined, will read the value from the selected pin and set the variable you created to that value. In this tutorial we will read from pin P2. Step 5 Now we need to do something with the information gathered from the analog read. Grab an analog write block and clip it underneath the first block. Set the pin to P1. Replace the number block from the analog write block with our variable LightLevel. The brighter the light that shines on the LDR the higher the output will be driven.

Step 6 Now would be a good time to put what we ve just done to the test. First however, we need to set up the hardware. Take your 100K resistor and solder one leg to the negative strip in the prototyping area (marked with - ) on the edge connector breakout. Solder the other end onto the centre strip at the edge of the board. Next solder the LDR. Put one leg through the positive strip (marked + ). The other leg should go into the centre strip at the edge of the board. Take a short piece of wire and connect the centre strip at the edge of the board to the pin labelled 2. Next take your current limit resistor and solder one end into the pin labelled 1. The other end of the resistor should be soldered into the left hand strip at the edge of the board. Finally take your LED and solder the long positive leg into the left hand strip at the edge of the board, and the short negative leg into the negative strip (marked with - ). Step 7 Now, let s try that out! Press compile* and after a few moments the code should appear as a download in your browser. If you plug your BBC micro:bit into a USB port it will show up as a storage device. Simply drag and drop the.hex file you just downloaded onto the BBC micro:bit. The file might not show up on the BBC micro:bit in the file explorer but it is there! Once the file has been transferred (the light on the BBC micro:bit will stop blinking rapidly) remove the BBC micro:bit from your computer. Now power up your BBC micro:bit with the batteries, then press the reset button next to the USB connector. The LED should be on and grow dimmer if you cover the LDR. *If this is the first time you have used the compiler you will be asked to make an account. Ask your teacher for the code required to make an account.

Further Tasks If we wanted to invert the function of the light sensor board we have built so that the LED lights up when the LDR is covered, we can do this in the code. The analog value read from pin P2 will be between 0 and 1024, so if we want to reverse the reading we can subtract it from 1024. So a reading of 0 will become 1024 and a reading of 1024 will become 0.