GithubHelp home page GithubHelp logo

mytechnotalent / micropython-micro-bit-talking-led-blink Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 2.48 MB

The micro:bit Talking LED Blink is a micro:bit Electronic Educational Engagement Tool designed to help students create a talking LED blink application.

License: Apache License 2.0

Python 100.00%
kids kidscancode educators education educational-technology educational-resources python python3 stem pythonforeverybody

micropython-micro-bit-talking-led-blink's Introduction

image

MicroPython-micro-bit

Talking LED Blink

The micro:bit Talking LED Blink is a micro:bit Electronic Educational Engagement Tool designed to help students create a talking LED blink application.

Schematic

image
*** NOTE *** USE PIN1 INSTEAD OF PIN0 (GREEN WIRE)

Parts

micro:bit
Ks0360 Keyestudio Sensor Shield V2 for BBC micro:bit

  • Keyestudio Micro bit sensor V2 shield * 1
  • keyestudio Digital White LED Module * 1
  • Dupont jumper wire * 3

STEP 1: Navigate To The FREE micro:bit Python Web Editor

micro:bit Python Web Editor

image

STEP 2: Plug micro:bit V2 Into Computer

PLUG IN USB CABLE TO COMPUTER AND DEVICE

STEP 3: Click CONNECT

image

STEP 4: Click "BBC micro:bit CMSIS-DAP" & CONNECT

image

STEP 5: Highlight Sample Code - Select All

image

STEP 6: Click Backspace On Keyboard To Delete Sample Code

image

STEP 7: Copy Study Buddy Python Code Template Into Python Web Editor

CODE

from time import sleep

from microbit import pin1, display, Image
from speech import say

# Customize bot speaking speed
SPEED = 95

while True:
    # Here we write a digital 1 or True to our pin1
    # as this will turn the LED on
    pin1.write_digital(1)
    
    display.show(Image.SURPRISED)
    say('The light is on!', speed=SPEED)
    display.show(Image.HAPPY)
    sleep(5)
    
    # Here we write a digital 0 or False to our pin1
    # as this will turn the LED on
    pin1.write_digital(0)
    
    display.show(Image.SURPRISED)
    say('The light is off!', speed=SPEED)
    display.show(Image.HAPPY)
    sleep(5)

STEP 8: Rename Script Name To talking_led_blink

STEP 9: Click Save

image

STEP 10: Click Download Python Script

image

STEP 11: Click Flash

image

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache License, Version 2.0

micropython-micro-bit-talking-led-blink's People

Contributors

mytechnotalent avatar

Watchers

 avatar  avatar  avatar

Forkers

incod3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.