Stufin
Home Quick Cart Profile

IoT:Bit- Internet WIFI Extension Board for Micro:Bit by Elecfreaks

Buy Now

IoT

Bit - Internet WIFI Extension Board for MicroBit by Elecfreaks

Overview

The IoT

Bit is ideal for a wide range of projects, including

IoT-enabled robots and automation systems

Wearable devices and health monitoring systems

Environmental monitoring and tracking systems

Smart home automation and control systems

Educational projects and STEM learning initiatives

WiFi Module

ESP8285

Frequency

2.4GHz

WiFi Standards

802.11 b/g/n

UART Baudrate

115200bps

Power Supply

3.3V

Current Consumption

<200mA

Dimensions

50x25mm

Applications

By combining the Micro

Bit with the IoTBit, users can unlock the full potential of IoT and create innovative, connected projects that interact with the world around them.

Pin Configuration

  • IoT: Bit - Internet WIFI Extension Board for Micro:Bit by Elecfreaks
  • The IoT:Bit is a WIFI extension board designed specifically for the Micro:Bit, enabling it to connect to the internet and perform various IoT-related tasks. This documentation provides a detailed explanation of the pins on the IoT:Bit board and how to connect them.
  • Pins Explanation:
  • 1. GND (Ground)
  • Function: Provides a common ground connection for the board.
  • Connection: Connect to the GND pin on the Micro:Bit or other devices requiring a ground connection.
  • 2. VCC (Voltage Supply)
  • Function: Supplies power to the IoT:Bit board.
  • Connection: Connect to the VCC pin on the Micro:Bit or a power source (3.3V recommended).
  • 3. RX (Receive)
  • Function: Receives data from the Micro:Bit serial communication.
  • Connection: Connect to the TX (Transmit) pin on the Micro:Bit.
  • 4. TX (Transmit)
  • Function: Transmits data to the Micro:Bit serial communication.
  • Connection: Connect to the RX (Receive) pin on the Micro:Bit.
  • 5. WIresco Pins (WIRESLESS Communication)
  • Function: Enables WIFI connectivity through the ESP8266 module.
  • Connection: No external connection required; these pins are used internally for WIFI communication.
  • 6. Reset
  • Function: Resets the ESP8266 WIFI module.
  • Connection: No external connection required; this pin is used internally for reset functionality.
  • 7. EN (Enable)
  • Function: Enables the ESP8266 WIFI module.
  • Connection: No external connection required; this pin is used internally for enable functionality.
  • 8. Micro:Bit Connection Pins (P0-P16)
  • Function: Provides a direct connection to the Micro:Bit pins for ease of use.
  • Connection: Connect to the corresponding pins on the Micro:Bit (P0-P16).
  • Connecting the Pins:
  • To connect the IoT:Bit to the Micro:Bit, follow these steps:
  • 1. Connect the GND pin on the IoT:Bit to the GND pin on the Micro:Bit.
  • 2. Connect the VCC pin on the IoT:Bit to the VCC pin on the Micro:Bit or a 3.3V power source.
  • 3. Connect the RX pin on the IoT:Bit to the TX pin on the Micro:Bit.
  • 4. Connect the TX pin on the IoT:Bit to the RX pin on the Micro:Bit.
  • 5. Connect the Micro:Bit pins (P0-P16) to the corresponding pins on the IoT:Bit (P0-P16).
  • Important Notes:
  • Ensure the IoT:Bit is powered using a 3.3V power source to avoid damage to the board.
  • When using the IoT:Bit, make sure the Micro:Bit is running the latest firmware that supports the WIFI extension board.
  • For more information on programming and using the IoT:Bit, refer to the official documentation and tutorials provided by Elecfreaks.

Code Examples

IoT:Bit - Internet WIFI Extension Board for Micro:Bit by Elecfreaks
Overview
The IoT:Bit is a WiFi extension board designed for the Micro:Bit, allowing users to connect their Micro:Bit projects to the internet and create IoT-based applications. This board provides a simple and convenient way to add WiFi capabilities to the Micro:Bit, making it ideal for a wide range of projects, from home automation to robotics.
Features
Compatible with Micro:Bit
 WiFi connectivity (2.4GHz, 802.11b/g/n)
 Supports TCP/IP, UDP, HTTP, and FTP protocols
 On-board antennas for improved signal strength
 Micro-USB interface for programming and power
 Supports both 3.3V and 5V power supply
Code Examples
### Example 1: Connecting to WiFi Network and Sending HTTP Request
This example demonstrates how to connect to a WiFi network using the IoT:Bit and send an HTTP request to a server.
```python
import microbit
from IoTBit import IoTBit
# Initialize IoT:Bit
iot = IoTBit()
# Set WiFi credentials
iot.wifi_set_credentials("your_wifi_ssid", "your_wifi_password")
# Connect to WiFi network
iot.wifi_connect()
# Check if connection is successful
if iot.wifi_is_connected():
    print("Connected to WiFi network")
    
    # Send HTTP request
    url = "http://example.com/iot_data"
    data = "temperature=25&Celsius"
    response = iot.http_post(url, data)
    print("HTTP response: ", response)
else:
    print("Failed to connect to WiFi network")
```
### Example 2: Creating a Simple Web Server
This example demonstrates how to create a simple web server using the IoT:Bit and serve a webpage.
```python
import microbit
from IoTBit import IoTBit
# Initialize IoT:Bit
iot = IoTBit()
# Set WiFi credentials
iot.wifi_set_credentials("your_wifi_ssid", "your_wifi_password")
# Connect to WiFi network
iot.wifi_connect()
# Check if connection is successful
if iot.wifi_is_connected():
    print("Connected to WiFi network")
    
    # Create a simple web server
    server = iot.http_server(80)
    
    # Define a route for the root URL
    @server.route("/")
    def index():
        html = "<h1>IoT:Bit Web Server</h1><p>Welcome to my IoT project!</p>"
        return html
    
    # Start the web server
    server.start()
    print("Web server started. Accessible at http://iotbit.local/")
else:
    print("Failed to connect to WiFi network")
```
### Example 3: Sending Data to MQTT Broker
This example demonstrates how to connect to an MQTT broker using the IoT:Bit and send sensor data.
```python
import microbit
from IoTBit import IoTBit
import random
# Initialize IoT:Bit
iot = IoTBit()
# Set WiFi credentials
iot.wifi_set_credentials("your_wifi_ssid", "your_wifi_password")
# Connect to WiFi network
iot.wifi_connect()
# Check if connection is successful
if iot.wifi_is_connected():
    print("Connected to WiFi network")
    
    # Set MQTT broker credentials
    broker = "your_mqtt_broker"
    port = 1883
    topic = "iot_data"
    
    # Connect to MQTT broker
    client = iot.mqtt_connect(broker, port)
    
    # Send sensor data to MQTT broker
    while True:
        temperature = random.randint(20, 30)
        data = f"temperature={temperature}&Celsius"
        iot.mqtt_publish(client, topic, data)
        microbit.sleep(1000)
else:
    print("Failed to connect to WiFi network")
```
Note: These examples assume that you have the IoT:Bit library installed and configured correctly. You may need to modify the code to suit your specific project requirements.