Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use iot:bit: Examples, Pinouts, and Specs

Image of iot:bitDesign with iot:bit in Cirkit Designer

Introduction

The iot:bit by ELECFREAKS is a compact microcontroller designed specifically for educational purposes and IoT (Internet of Things) projects. It features built-in sensors, LED lights, and multiple connectivity options, making it an excellent choice for beginners and advanced users alike. The iot:bit is compatible with micro:bit boards, enabling seamless integration into various projects.

Explore Projects Built with iot:bit

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32 Mini Battery-Powered OLED Display with RTC and Potentiometer Control: A project utilizing iot:bit in a practical application
ESP32 Mini Battery-Powered OLED Display with RTC and Potentiometer Control

This circuit is a battery-powered IoT device featuring an ESP32 microcontroller, an OLED display, and an RTC module for timekeeping. It includes a TP4056 for battery charging, a potentiometer for user input, and a pushbutton for resetting the ESP32. The circuit is designed to display information on the OLED and maintain accurate time using the RTC, with power management handled by the TP4056 and voltage regulation by the LM2596 and AMS1117.

Open Project in Cirkit Designer
Image of Arduino Mega 2560 Biometric Security System with Wi-Fi Connectivity: A project utilizing iot:bit in a practical application
Arduino Mega 2560 Biometric Security System with Wi-Fi Connectivity

This is a multi-functional sensor system controlled by an Arduino Mega 2560, designed to read biometric data from a pulse oximeter and an infrared thermometer, authenticate using a fingerprint scanner, display information on an OLED screen, and transmit data wirelessly via an ESP8266 module. User inputs can be received through two pushbuttons, and the system's power distribution is managed through common ground and voltage supply nets.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Below are the key technical details of the iot:bit:

Specification Details
Manufacturer ELECFREAKS
Part ID iot:bit
Input Voltage 3.3V to 5V
Communication Protocols I2C, UART
Connectivity Options Wi-Fi (via ESP8266 module), Bluetooth (via micro:bit)
Built-in Sensors Light sensor, Sound sensor
Output Components RGB LED (programmable), Buzzer
Expansion Ports 4x Grove connectors, 1x I2C port
Dimensions 65mm x 50mm x 15mm
Compatibility micro:bit V1 and V2

Pin Configuration and Descriptions

The iot:bit features multiple ports and pins for connecting external components. Below is the pin configuration:

Pin/Port Description
Grove Port 1 Analog/Digital input/output for external sensors or actuators
Grove Port 2 Analog/Digital input/output for external sensors or actuators
Grove Port 3 I2C communication port for connecting I2C-compatible devices
Grove Port 4 UART communication port for serial devices
I2C Port Dedicated I2C port for additional peripherals
RGB LED Programmable RGB LED for visual feedback
Buzzer Built-in buzzer for sound output
Power Input Micro-USB or battery input (via micro:bit)

Usage Instructions

How to Use the iot:bit in a Circuit

  1. Attach the micro:bit: Insert the micro:bit into the iot:bit's edge connector, ensuring proper alignment.
  2. Power the iot:bit: Connect a micro-USB cable or use a battery pack to power the device.
  3. Connect peripherals: Use the Grove connectors or I2C port to attach external sensors or actuators.
  4. Program the micro:bit: Write and upload code to the micro:bit using the MakeCode editor or Python.

Important Considerations and Best Practices

Example Code for micro:bit (MakeCode)

Below is an example of how to control the RGB LED and read data from a light sensor using the MakeCode editor:

// Import the iot:bit extension in MakeCode before using this code

// Set the RGB LED to red
iotbit.setRGBLED(255, 0, 0) // Red: 255, Green: 0, Blue: 0

// Read light sensor data and display it on the micro:bit screen
basic.forever(function () {
    let lightLevel = iotbit.getLightLevel() // Get light sensor value
    basic.showNumber(lightLevel) // Display the light level on the LED matrix
    basic.pause(1000) // Wait for 1 second before updating
})

Example Code for micro:bit (Python)

Below is an example of how to control the buzzer and read data from the sound sensor using Python:

from microbit import *
import iotbit

# Play a tone on the buzzer
iotbit.buzzer_on(440)  # Play a 440 Hz tone
sleep(1000)            # Wait for 1 second
iotbit.buzzer_off()    # Turn off the buzzer

# Continuously read sound sensor data
while True:
    sound_level = iotbit.get_sound_level()  # Get sound sensor value
    display.scroll(str(sound_level))       # Display the sound level on the LED matrix
    sleep(1000)                            # Wait for 1 second

Troubleshooting and FAQs

Common Issues and Solutions

  1. The iot:bit is not powering on:

    • Ensure the micro:bit is properly inserted into the edge connector.
    • Check the power source (micro-USB cable or battery pack) for proper connection.
  2. Sensors are not responding:

    • Verify that the sensors are connected to the correct Grove port.
    • Check the sensor's compatibility with the iot:bit and ensure proper wiring.
  3. Wi-Fi connectivity issues:

    • Ensure the ESP8266 module is configured with the correct SSID and password.
    • Check for interference or weak Wi-Fi signals in the area.
  4. RGB LED or buzzer not working:

    • Confirm that the correct commands are being sent in the code.
    • Check for any short circuits or loose connections.

FAQs

Q: Can I use the iot:bit without a micro:bit?
A: No, the iot:bit is designed to work as an expansion board for the micro:bit and requires it for operation.

Q: What programming languages are supported?
A: The iot:bit supports MakeCode (block-based programming) and Python for coding.

Q: Can I connect multiple I2C devices to the iot:bit?
A: Yes, the I2C port supports multiple devices as long as they have unique addresses.

Q: Is the iot:bit compatible with micro:bit V2?
A: Yes, the iot:bit is compatible with both micro:bit V1 and V2.

For additional support, refer to the official ELECFREAKS documentation or community forums.