IoT Expansion Board Based on micro:bit Wiki - DFRobot

Introduction

With the development of IoT, there are so many mature IoT platforms emerging in both domestic and overseas, but most of them are mainly designed for the professional, which could be very hard for the non-experts to get started. Therefore, we specifically developed this Micro: IoT, a micro:bit-based IoT expansion board. Use the board together with DFRobot Easy IoT platform, lower the barrier of using IoT.

This micro: IoT board is pretty cute and delicate, on which we integrated Wi-Fi, OLED, 2-way motor drive, 6-way IO port, 2-way IIC, 1-way serial port, 1-way buzzer, 3-way RGB, 2-way servo, Li-ion battery holder, charging circuit, emergency power interface etc. So many resources for you to programme! Even without complicated background knowledge, you can build you IoT applications in few steps!

We designed the board as cloud shape to make it more suitable for the theme of IoT. As for power supply, we selected CR123A 3.6V lithium rechargeable battery of 1000mA. This kind of battery features small size, high capacity and high safety. What’s more, we add short circuit and reverse connection protection for the product to further improve the safety in using Li-ion Battery.

Supports makecode and Mind+ graphical programming platforms.

Specification

Overview

Pinout

Color Indication
Red failed to connect
Blue connecting to WiFi
Green Work properly
Purple MQTT disconnected
White WiFi module firmware upgrading

Note: when the indicator turns purple, it means that MQTT is disconnected, and please check if the id account is correct.

Makecode Online Graphical Programming

Makecode basic operation tutorial: https://wiki.dfrobot.com/Makecode%20Get-started%20Tutorial

Micro:IoT library address: https://github.com/DFRobot/pxt-microIoT. How to install an library?

Easy IoT Platform

Sign in and Setting Easy IoT

Easy IoT

Click Sign Up/In

Add a new device

Device Setting

Information Check

ID account Interface

Easy IoT Basic Tutorial

Smart Emojis

Makecode Program: smart emojis

Function: display your current feeling. For example, if you are not in the mood, you can send a message to micro:bit through Easy IoT to let micro:bit board display the set pattern.

Programs for reference

Smart Emojis

Program Effects:

Send message

Send a message

Smart Emojis

Voting Machine

Makecode programs: voting machine-hosting

Makecode programs: voting machine-voting

Function description: voting machine utilizes the wireless communication function. The voting machine has hosting post and voting port. The voting port can have abundant devices. When the voter presses the related button, the number of the votes will be displayed on the screen. Meanwhile, the data will be sent to IoT platform.

Programs for reference

Voting Machine-Hosting Port

Voting Machine-Voting Port

Programs Effects:

Press down button A, send a message to topic0 and change A by 1; press down B, send a message to topic1 and change B by 1.

Voting Machine Results

The vote number for A

The vote number for B

Light and Temperature Monitor

Makecode programs: light and temperature monitor

Function description: use micro:bit to detect the light and temperature, and send the data to Easy IoT and OLED by pressing button A and B.

Programs for reference

Light and Temperature Monitor

Programs effects:

Press down button A, send the current temperature value to the workshop; the first line of the OLED screen displays the temperature value. Press down button B, send the current light value to the workshop; the second line of OLED screen displays the light value.

T for temperature; L for Light

Temperature and light monitor

Remote Watering System

makecode programs: watering system

Function description: connect a soil moisture sensor to the module's P1, connect a servo to pin S1. When the internet connected, send the command "see" to Easy IoT to check the soil humidity. We can decide if the plants need to be watered according to the humidity data. In order to avoid we forget to turn off the water system, we should first set that, when the humidity is over than 550, the water system will be turned off automatically.

Components: servo, soil mositure sensor(P1)

Programs for reference

Watering System

Program Effects:

Note: when the servos turns to 100 degrees, the watering system is closed, servo to 10 degrees, the system opened.

Watering System

Watering System-Easy IoT

Watering System-disable

Watering System-enable

Automatic Clothes Hanger

Makecode Programs: automatic clothes hanger

Function Description: send humidity value to Easy IoT every 8 minutes, then user can determine if it is suitable to dry our clothes. When OBLOQ receives "OFF", the servo rotates to a certian degree to retract the clothes hanger; When OBLOQ receives "ON", the servo rotates to another degree to stretch the hanger.

Components: Servo(S1), soil moisture sensor(P1)

Programs for Reference

Automatic Clothes Hanger

Program Effects:

When Easy IoT sends "ON", the servo rotates to 160 degrees to stretch the clothes hanger; when Easy IoT sends "OFF", the servo rotates to 30 degrees to retract the clothes hanger. Or we can control it manually by pressing the button A and B.

Automatic Clothes Hanger-Easy IoT

Retract the clothes hanger

Stretch the clothes hanger

Remote Entrance Guard System

Makecode programs: remote entrance guard system

Function description: imagine when you are on business, your friend suddenly calls you and says he is waiting at the door of your house, but you cannot go home immediately. However, you have this remote entrance guard system, so you can just use your phone to open the door and let he enter your house.

Component: servo (S1)

Programs for Reference

Remote entrance guard system

Programs Effect:

Press down button A, the telephone number will be displayed. If the house master gets the phone call, he will send command "ON" via Easy IoT to the guard system, the servo rotates to 90 degrees to open the door. 1 minute later, the servo rotates to 10 degrees, the door will be closed.

Entrance Guard System-Easy IoT

Door opened

Door closed

Remote controlled RGB LEDs

Makecode Programs: remote controlled RGB LEDs

Function Description: you were gonna throw a home party, unfortunately, you have to work overtime, so you told your friends to start the party themselves. They want to turn on the festival lamps but cannot find the remote controller. This time you use you phone to turn the lamp on.

Programs for reference

Remote controlled RGB LEDs

Programs Effect:

Send a command "L" via Easy IoT, to dispaly an effect of water lamp (alternatively emit red and purple). When the module receives the command "B", it will play the music "twinkle, twinkle, little start" and the RGB shines with the music.

Remote-controlled RGB LEDs

Water Lamp

Music Lamp

IFFTT IoT Platform

IFFTT operation

Preparation

  1. Enter IFFTT website, register an account. Website: https://ifttt.com

  2. Sign in and enter the My Applets page, click New Applets.

New Applets

  1. Create an Applet, enter the Applet interface, click This and input webhooks.

Click This

Input webhooks

  1. Fill the Event Name in the next page.

Fill event name

IFFTT Basic Tutorial

Send data to email

Function description: press the button to send a message to email.

Click That

Select Email

Click send me an Email

Set the content

Enter webhooks

Check password

Makecode Programs: Send data to Email

Send data to Email programs

Data in the Email

Send note to Evernote

Function Description: send note to Evernote

Create new This

Click That

Select Evernote

Click create a note

Select the default form

Makecode Programs: send date to Evernote

Programs for reference

Send message to Evernote

Send Message to Evernote

Send Message to Twitter

Function description: when you get up in the morning, press down button A and B, send the temperature and light intensity to Twitter.

Create a new This

Click That

Select Twitter

Post a tweet

Complete the action fields

Add event

Makecode Programs: Send message to Twitter

Semd message to Twitter

Send message to Twitter

Send Message to iPhone

Function description: the climate is changeable during the seasonal alterantion. Use the micro:bit to detect temperature. If temperature is more than 30 degree, send a message to iphone to notice the user to pay attention to heatstroke. If temperature is less than 20 degree, send a message to iphone to notice the user to protect themselves from the cold.

Create A new This

Click That

Select IOS reminders

Select add reminder to list

Note: the alarm date can be set according to your actual use.

Makecode: Send a message to iPhone

Programs for reference

Send a message to iPhone

Send messages to iPhone

Use an Android phone to Send Message

Function description:We often forget to water out plants, sometime, you have to be on business for a long time, but you want someone to take care of your plants. We can use the IoT expansion board to make an application to solve this problem. When the soil moisture is less than 350, the system automatically sends a message to your friend to water the plants. If it is over 520, send a message that the moisture is suitable.

Click a new This

Click That

Select Android sms

Set the phone number to send message and add ingredient

Add the phone number

Note: the type of the phone to send messages must be Android, and there should be a IFFTTT app installed on the phone. IFFTTT needs to have the access permission to Message.

App Permission to SMS

Makecode Programs: Send messages to Android phone

Send Message to Android Phone

Send the message

Receive the Message

Beebotte IoT Platform

Send data configuration from MQTT to Beebotte

Get Started For Free

Create your own Channels

Create a humidity Channel

Completed the Humidity Channel

Get MQTT password

Create Dashboards

Create Time Table

Record the data of the Soil Moisture

Function description: Create a channel-humidity and time table. When connected with Internet, the moisture will be updated to Beebotte platform, and we will check the change of the moisture through the curve graph in Dashboards.

Makecode Programs: Record the data of the Soil Moisture

Programs for reference

Note: IoT_id should be API Key; IoT_pwd should be Secret Key; TOPIC is the name of Channel/Resource, there is a / between them.

Chose Beebotte as the server in the Program.

Record moisture data on Beebotte

Click Humidity to check data

Basic Tutorials

Drive a motor

makecode programs: drive a motor

Programs for reference:

Motor Driving

Result: the motor rotates forward at speed of 255 for 1 second, and then rotate backward for 1 second.

Light and Temperature Monitor

makecode programs: light and temperature monitor

Programs for reference:

Light and Temperature Monitor

Function description: use micro:bit to detect the light and temperature value, display the values on the OLED.

Results: OLED displays the current temperature and light in real-time.

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum

More Documents

DFshopping_car1.png Get micro:bit IoT Expansion Board from DFRobot Store or DFRobot Distributor.

Turn to the Top