"BBC micro:bit Basic Tutorial" 01-How to control an LED with a key

Source: Internet
Author: User

"Required Materials"

    • BBC micro:bit motherboard x 1
    • Micro USB Cable x 1
    • Battery compartment for 2 x 7th (AAA) Batteries × 1
    • Number 7th (AAA) Battery x 2
    • Red LED light x 1
    • 100 ohm current limiting resistor x 1
    • Crocodile Clip x 3

? "Recognize LEDs"

, LED has a pin, a long and short, led light-emitting diode is a diode, the diode has a single wizard-pass characteristics: that is, the home Plus to the voltage conduction, the current can flow, the light-emitting diode will be bright, plus reverse voltage, the current can not flow, the light-emitting diode does not light. And if the reverse voltage is too large, it will cause the diode to penetrate, causing permanent damage.

"Understanding resistor"

In this lesson, the function of the resistor is to limit the size of the current, so we call it an overcurrent resistor, no current limiting resistor, and the LEDs cause permanent damage due to excessive currents.

There are various resistances and shapes on the market, how can we find what we need? According to Ohm's law, we can calculate the minimum resistance required for different LEDs, and the following table can be used as a reference:

"Circuit wiring Step"

    1. Disconnect the micro:bit from the computer and battery to ensure that the micro:bit is not in the power state.
    2. Use the alligator clip to clamp the short foot of the LED and any end of the resistor.
    3. Use alligator clips to clamp the other end of the resistor and the GND pin of the micro:bit.
    4. A piece of alligator clip holding the LED's long legs and micro:bit pin 0.

"Programming The Micro:bit"

"Test the program"

    1. Download the compiled program to Micro:bit
    2. Connect the battery, press A and key B respectively to test.

"View Original"

Please visit www.teachwithict.com

"Problem Contact Author"

: mengfeixiang007 (Verification information please note micro:bit)

qq:784827264 (Verification information please note micro:bit)

"BBC micro:bit Basic Tutorial" 01-How to control an LED with a key

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.