INTRODUCTION HARDWARE

Similar documents
Micro:bit - an Educational & Creative Tool for Kids

Don t Steal My BBC micro:bit Alarm!

Piano for Micro:bit User Manual

micro:bit Starter Kit Guide Your First Micro:bit Kit Funny Easy Suitable for Your Beginning YEAR

BBC micro:bit Cool Colours!

Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S

Prototyping & Engineering Electronics Kits Basic Kit Guide

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

Lab 2.2 Ohm s Law and Introduction to Arduinos

GUIDE TO SP STARTER SHIELD (V3.0)

Thursday, September 15, electronic components

micro:bit Lesson 1. Using the Built-in Sensors

mi:node User Manual Element14 element14.com/minode 1 User Manual V3.1

solutions for teaching and learning

Updating DAPLink Firmware and Using REPL with Tera Term

Arduino Programming. Arduino UNO & Innoesys Educational Shield

Goal: We want to build an autonomous vehicle (robot)

AeroCore 2 for Intel Joule Module

9 Output Devices: Buzzers

Assembly Instructions (8/14/2014) Your kit should contain the following items. If you find a part missing, please contact NeoLoch for a replacement.

micro:bit Lesson 2. Controlling LEDs on Breadboard

1/Build a Mintronics: MintDuino

09/05/2014. Engaging electronics for the new D&T curriculum. Geoff Hampson Managing Director of Kitronik. Presentation overview

BBC Micro:Bit. Year 7. Teacher Guide and Planning

.:Part Summary:. Plastic Box (23.5 cm x 13 cm x 3 cm)

AeroCore 2 for DragonBoard

1.0. Presents. techathon 3.0

Lab 1: Introductory Project to Breadware

Adafruit Metro Mini. Created by lady ada. Last updated on :12:28 PM UTC

Grove Inventor Kit for micro:bit Project Guide

Controlling the Robotic Arm using the BBC micro:bit

Adafruit Feather nrf52840 Express

RedBoard Hookup Guide

Page 1 / 14. Dear Makerspace User,

Use of ISP1880 Accelero-Magnetometer, Temperature and Barometer Sensor

Use of ISP1507-AL Evaluation Boards

Pi HAT Sensor Board TM

Use of ISP1807-LR Evaluation Boards

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

AlphaBot2 robot building kit for Arduino

Arduino Smart Robot Car Kit User Guide

Quick Guide WARNING: CHOKING HAZARD - Small parts. Not for children under 3 years old. mbot is an educational robot kit for beginners to get hands-on

RKP08 Component List and Instructions

Alessandra de Vitis. Arduino

Discover Robotics & Programming CURRICULUM SAMPLE

Chapter 2: Introducing the mbed tw rev

INVITATION FOR QUOTATION. TEQIP-III/2018/duie/Shopping/16

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

University of Hull Department of Computer Science C4DI Interfacing with Arduinos

Dwarf Boards. DN001 : introduction, overview and reference

Advance Robotics with Embedded System Design (ARESD)

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

ARDUINO PRIMO. Code: A000135

revolution How does the ibutton work? Full kit including PCB, PICAXE-08M chip and ibutton key. Spare ibutton Key

December 1, 2015 Jason Kridner

Layad Circuits Arduino Basic Kit B. Content Summary

ESPino - Specifications

solutions for teaching and learning

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing

User Manual For CP-JR ARM7 USB-LPC2148 / EXP

solutions for teaching and learning

WAVETEK BLE-WT51822AA/AB. Revision History. Bluetooth low energy Module WT51822AA (256k) /AB (128k) (Bluetooth Low Energy BT4.0) PRODUCT SPECIFICATION

A Beginners Guide to Raspberry Pi

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

Arduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface.

LinkIt ONE. Introduction. Specifications

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

Objectives: Learn how to input and output analogue values Be able to see what the Arduino is thinking by sending numbers to the screen

AVR 40 Pin Rapid Robot controller board

Intel Galileo gen 2 Board

Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc.

AlphaBot2 robot building kit for Raspberry Pi 3 Model B

HARDWARE REFERENCE IMM-NRF51822

Bolt 18F2550 System Hardware Manual

A4988 Stepper Motor Driver Carrier with Voltage Regulators

Introduction to Arduino (programming, wiring, and more!)

ECE 2036 Lab 4 Setup and Test mbed I/O Hardware Check-Off Deadline: Thursday, March 17, Name:

Gooligum Electronics 2015

Part Number: PCB-STM32-F4B1 (unpopulated PCB with Discovery module sockets, no other parts) STM32-F4B1 (assembled board, not presently available)

EE 354 August 1, 2017 Assembly of the AT89C51CC03 board

Laboratory of Sensors Engineering Sciences 9 CFU

ECE471: Embedded Systems Final Project. Due: Friday, 14 December 2018 (Last day of Classes)

ARROW ARIS EDGE Board User s Guide 27/09/2017

Halloween Pumpkinusing. Wednesday, October 17, 12

Arduino Programming and Interfacing

Arduino Cookbook O'REILLY* Michael Margolis. Tokyo. Cambridge. Beijing. Farnham Koln Sebastopol

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

Update: Ver 1.3 Dec Arduino Learning Guide For Beginner Using. Created by Cytron Technologies Sdn Bhd - All Rights Reserved

Product description Rev. 3 11/06/14

Electronics Workshop. Jessie Liu

AXE Stack 18. BASIC-Programmable Microcontroller Kit. An inexpensive introduction to microcontroller technology for all ability levels

Husarion CORE2. Husarion CORE2 is a development board for Internet-connected automation & robotic devices.

Images Scientific OWI Robotic Arm Interface Kit (PC serial) Article

Hardware Overview and Features

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Bill of Materials: 8x8 LED Matrix Driver Game PART NO

Arduino Robots Robot Kit Parts List

Embedded Training MakeICT Workshop

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

Transcription:

Project Kit

Table of Contents INTRODUCTION... 3 HARDWARE... 3 Hardware built-in micro:bit:... 3 Hardware included in this kit:... 4 CODE... 5 Pseudo Code:... 5 Coding Tools:... 5 Running Programs:... 8 Error Codes:... 8 Projects... 9 1- Coin Toss... 9 2- Dice Roll...10 3- LED Control...11 4- Light Sensing...12 5- Tone Control...14 6- RGB LED...15 7- Temperature Sensing...17 8- Servo Control...18 9 Motor Control...19 10- Accelerometer Speed Control...20 2

INTRODUCTION Welcome to the wonderful world of micro:bit! The micro:bit is an easy to use yet surprisingly powerful piece of hardware that will allow you to create many impressive gadgets. The board was designed in the UK by the BBC and measures only 4 x 5 cm. The system is an ARM-based embedded system microcontroller (ARM Cortex M0). The module is best suited for beginners or younger users as an educational introduction to computing, coding and hardware. *Before getting started, review the basic safety tips here: http://microbit.org/assets/documents/microbit-safety-guide-090617.pdf Figure 1 - BBC micro:bit HARDWARE Figure 2 - Technical Specifications Hardware built-in micro:bit: 16MHz 32 bit ARM Cortex M0 Nordic nrf51822 256 kb Flash 16 kb RAM 2.4 GHz Bluetooth BLE USB 2.0 OTG (On-The-Go) 3.3V regulator (for USB only) 3 axis accelerometer (I2C) NXP/Freescale MMA8652 3 axis magnetometer (I2C) NXP/Freescale MAG3110 5x5 LED array 2 programmable tactile push buttons 1 reset button Ring connectors (3 x I/O, Power, Ground) 3 x PWM, 17 x GPIO (Analog, Serial, SPI, I2C) Reference: http://microbit.org/hardware/ 3

Hardware included in this kit: Description Abra Part NO. Project Micro:bit MICROBIT All 400 Tie solderless breadboard ABRA-6 3,4,5,6,7,8,9 Breakout Connector with Headers BOB-13989 3,4,5,6,7,8,9 Alligator Clips TL-155-1/2 3,4,5,6,7,8,9 Male/Male Jumper Wires 759-ADA 3,4,5,6,7,8,9 AAA Batteries 30-AAA-4 All Battery Holder BAT-H-2AAA All USB Cable CAB-600-R All LED - Green LED-5G 3 RGB LED LED-5RGB-4 6 Pushbuttion - N.O PBS-155 3 Potentiometer - 1kΩ P1K-MIN-PC 3 Photocell 5kΩ (Light, Detecting Resistor) PHOTO-300 4 Piezo Buzzer BUZ-120 5 Temperature Sensor TMP36 7 Servo Motor FS90 8 DC Motor MOT-500 9,10 Transistor BC337 9,10 Resistor - 150Ω (Brown-Green-Brown) 10kΩ (Brown-Black-Orange) 2.2kΩ (Red-Red-Red) R1/4-150 R1/4-10K R1/4-2.2K 3,4,6,9,10 4

CODE We ve seen how powerful micro:bit hardware is. Now let s learn how to unleash it with code. Reference: http://microbit.org/code/ Pseudo Code: Every program begins in Pseudo Code. Pseudo code is the list of instructions written in plain English that is worked out before the program is coded. This helps the programmer logically decide on code structure and operations. (See PROJECTS section for examples) Coding Tools: The micro:bit is unique in that it offers the possibility of programming in many different languages with many different environments. Beginner programmers can get the basics using a block editor by simply dragging and dropping segments of already written code. Experienced users can write bare-bone scripts. Reference: https://www.microbit.co.uk/create-code# 1 JavaScript Block Editor: [RECOMMENDED] https://makecode.microbit.org/# Sample projects and User Guide can be found here: https://makecode.microbit.org/reference 5

1 Block mode 2 Code block selection menu 3 Program simulator 4 Name/Save file.js 5 Download hex file for uploading on board 6 JavaScript mode Figure 3 JavaScript 2 Python Editor [ADVANCED] http://python.microbit.org/editor.html# 6

1 Script sample code 2 File name 3 Save.py file 4 Download hex file for uploading onto board Figure 4 - Python 3 Microsoft Block Editor [OLD] https://www.microbit.co.uk/app/# 1 Load previously saved scripts 2 Block selection menu 3 Run script on simulator 4 Simulator 5 Name file 6 Save file locally 7 Download hex file for upload onto board 8 Screen navigator Figure 5 - Microsoft 7

Running Programs: Now that our script has been written and tested on the simulator, we are ready to download it and install it onto the micro:bit. Reference: http://microbit.org/hardware/usb/ Requirements: USB cable, Windows 7 (or later), MAC OS X 10.6 (or later), Internet Procedure: 1. Connect the micro:bit into your computer USB. Your computer should recognize the device and create a MICROBIT drive 2. Compile the script (varies with each program editor). This creates a.hex file 3. Save file locally on your computer (ex: My Documents) 4. Locate the downloaded.hex file and folder and copy it (drag and drop) into the MICROBIT drive folder. This will compile the file onto the hardware. (You cannot do multiple files at a time) 5. The micro:bit LED will flash for a few seconds. The software has been incorporated into the flash memory. This means that even after unplugging your device your program will remain. It will execute next time the board is powered. Figure 6 Upload Error Codes: Programming can be tricky and often doesn t work on the first try. When you see the micro:bit frowny face, something is wrong. Here are a few error codes to look out for: 10 MICROBIT_I2C_LOCKUP I2C bus is not working 20 MICROBIT_OOM No free memory available 30 -- Heap space corruption 40 -- Uninitialized object type 41 -- Out of bounds 42 -- Cannot execute script Figure 7 - Error Code Reference: http://microbit.org/hardware/error-codes/ 8

Projects *Other PROJECTS ideas can be found at: https://www.microbit.co.uk/blocks/lessons 1- Coin Toss This project helps you decide with a simple coin toss LEVEL: Beginner MATERIALS: microbit, Battery, USB cable PSEUDO CODE: 1. When the device is shook (or button pressed), do coin toss 2. Coin toss can have 1 of 2 random results 3. Set heads to 0 and tails to 1 4. If the randomly generated toss is 0, print heads (H) on LED screen 5. Else, the toss must be 1, print tails (T) on LED screen SAMPLE CODE: ALTERNATE CODE: Figure 8 - Coin Toss 9

2- Dice Roll This project creates a useful gadget for rolling dice and playing games LEVEL: Beginner MATERIALS: microbit, Battery, USB cable PSEUDO CODE: 1. When the device is shook (or button is pressed) roll dice, 2. Coin toss can have 1 of 6 random outcomes 3. Set result to random outcome 4. If result is 1, print 1 on LED screen 5. Else if result is 2, print 2 on LED screen 6. Repeat for all possible cases SAMPLE CODE: Figure 9 - Dice Roll 10

3- LED Control This project shows you how to turn an LED ON and OFF with pushbuttons and control its brightness with a potentiometer. LEVEL: Intermediate MATERIALS: LED, Resistor(150), Potentiometer, Pushbutton Jumper wire, Breadboard, microbit Breakout, Battery pack, USB cable HARDWARE: *LED: Longer leg is + Shorter leg is (connect to black wire) Figure 10 - LED Circuit PSEUDO CODE: 1. Assign button to a pin (P0) 2. Check and update light state when button pin is pressed 3. If light state is OFF (0), change it to ON (1) 4. Else, change light state to OFF (0) 5. Check light state forever 6. If light state has been set to ON(1), control LED brightness 7. LED brightness is controlled by reading the analog value of potentiometer pin (P1) and analog writing it on to LED pin (P2) 8. Else, light state is OFF, LED must be turned off (digital write P2 to 0) 11

SAMPLE CODE: Figure 11 - LED Control 4- Light Sensing This project demonstrates how to measure light intensity with a sensor and use it for control (TIP: Try controlling an LED brightness with this technique from Project 3) LEVEL: Intermediate MATERIALS: Photocell, Resistor (10k), Microbit breakout, Breadboard, Battery pack, USB cable HARDWARE: Figure 12 - LDR Circuit 12

PSEUDO CODE: 1. Check sensor reading forever 2. Set sensor value to variable Light 3. Light is read from analog pin P0 4. Light can have values 0 to 1024 (analog pin) 5. If light is greater than 512, show SUN on LED 6. Else, show MOON on LED SAMPLE CODE: Figure 13 - LDR Control 13

5- Tone Control This project plays with sound and varies a tone using a piezo buzzer LEVEL: Intermediate MATERIALS: Piezo buzzer, Microbit breakout, Breadboard, Battery pack, USB cable HARDWARE: PSEUDO CODE: 1. When Button A is pressed, 2. Play tone (note) for (beat) SAMPLE CODE: Figure 14 - Piezo Buzzer Circuit Figure 15 - Tone Control 14

6- RGB LED This project lets you manipulate light, change colors and patterns LEVEL: Intermediate MATERIALS: RGB LED, 150Ω resistor, Microbit breakout, Breadboard, Battery pack, USB cable HARDWARE: Figure 16 - LED RGB Circuit PSEUDO CODE: 1. Keep LED running forever 2. Assign analog write variables Red to P0 3. Assign analog write variables Green to P1 4. Assign analog write variables Blue to P2 5. If button A, increase the level of Green by 10 6. If Green surpasses 1020, reset to 0 7. If button B, increase the level of Red by 10 8. If Red surpasses 1020, reset to 0 9. If button A+B increase the level of Blue by 10 10. If Blue surpasses 1020, reset to 0 15

SAMPLE CODE: Figure 17 - LED RGB Control 16

7- Temperature Sensing This project creates a very accurate thermometer LEVEL: Intermediate MATERIALS: TMP35, Microbit breakout, Breadboard, Battery pack, USB cable HARDWARE: Figure 18 - TMP36 Temperature Circuit PSEUDO CODE: 1- Check temperature sensor forever 2- Create variable to hold sensor value from analog read pin P0 3- Create variable to map temperature from lowest signed sensor input(124) and highest signed sensor input (496) to lowest temperature (-20) and highest temperature (100) 4- Show number corresponding to temperature SAMPLE CODE: Figure 19 - Temperature Control 17

8- Servo Control This project gets the gears rotating by controlling a servo motor LEVEL: Advanced MATERIALS: Servo motor, Microbit breakout, Breadboard, Battery pack, USB cable HARDWARE: Figure 20 - Servo Motor Circuit PSEUDO CODE: 1- When Button A is pressed 2- Command servo on P0 to 180 degrees 3- Pause 1 second 4- When Button B is pressed 5- Command servo back to 0 degrees 6- Pause 1 second SAMPLE CODE: Figure 21 - Servo Control 18

9 Motor Control This project gets the wheels turning by controlling a motor LEVEL: Advanced MATERIALS: DC motor, BC337 Transistor, Microbit breakout, Breadboard, Battery pack, USB cable HARDWARE: Figure 22 - Motor Circuit PSEUDO CODE: 1- On start, create variable called duty and set it to 0 2- Run motor forever 3- Ramp up motor speed by analog write the value of duty to P0 until it reaches max value of 1023 4- Ramp down motor speed until it reaches min value of 0 SAMPLE CODE: Figure 23 - Motor Control 19

10- Accelerometer Speed Control This project will get you accelerating motors with the built-in accelerometer LEVEL: Advanced MATERIALS: DC motor, BC337 Transistor, Microbit breakout, Breadboard, Battery pack, USB cable HARDWARE: Figure 24 Accelerometer Motor Circuit PSEUDO CODE: 1- Run motor forever 2- Analog write the absolute value (positive values only) of the built-in accelerometer to P0 SAMPLE CODE: Figure 25 - Accelerometer Motor Control 20