# Introduction ## Introduction Smarthon IoT Bit is an IoT orientated expansion board for Micro:bit. With the help of this, Micro:bit able to connect to different sensors or actuators without welding and start to use the internet services.
It provides 13 regular GVS socket, allow user to connect batch of sensors at the same time to receive group of data. For some special purpose sensors/actuator, such distance sensor, motor and OLED display, an independent socket are offered, so not only the digital and analog I/O device can use in project, but also I2C device become an option to the Micro:bit from now on. Last but not least, a buzzer is built-in on the board to provide sound generation.
It is the most powerful Wi-Fi extension board for micro:bit in the STEM community. The core is using dual core processor ESP32 compared with the ESP8266 which is single core processor. Besides of the basic ThingSpeak and IFTTT Web services, it supports Wide Area Network (WAN) and can be controlled by mobile app, Amazon echo dot and Google home remotely. Also, it supports object to object communication (O to O) in the Internet. It can facilitate the students to learn the communication between the objects.

## Product Features

* The Most powerful IoT chip ESP32 embedded for micro:bit
* Exchangeable wireless modular design (ESP8266, ESP32, BLE)
* Integrated OLED and Onboard buzzer embedded
* Extended I/O port x13, I2C port x2 from Micro:bit with GVS socket
* Extended Servo port x3 from ESP module
* Various types of power supply (USB, 3.7V lithium battery, 6V Normal battery)
* Extra Port: Crocodile Pin, Quick Access Port and 4-Pin Port for different usage
## Hardware Size
Product size: 75mm X 65mm X 20mm
PCB thinkness: 1.5mm
Hole diameter: 4mm

## Specification
|Item|Parameters|Remarks|
|--|--|--|
|Size|75mm X 65mm X 20mm| Without Packing|
|Power supply| USB:5V
Lithium Battery :3.7~4.2V
AA Battery*4 :6V |Maximun current limit
of whole board: 1A |
|Operation Temperature|0 to 80℃||
|Buzzer|Passive Buzzer(Musical)||
|Wireless Module|ESP8266
ESP32
Bluetooth|Operate under UART protocol|
|OLED Module|128*64 resolution OLED
Screen SSD1306|Operate under I2C protocol|
|Micro:bit lead out|13 I/O Pins
(13 Digital & AnalogOut Pins)
(6 AnalogIn Pins)|Reserved Pins:
Wireless module:P8,P16
4-Pins module:P12,P13|
|I2C Pins|P19,P20|3 available ports,
1 port reserved for OLED|
|ESP lead out|3 Pins for servo control(S1,S2,S3)|Control by ESP chip|
## Pinout Information
Please open the image in the new tab for full size
| Type | Micro:bit | IoT:bit | Extra Port | |
|---|---|---|---|---|
| Analog | P0 | Buzzer | Rapid Access Port | |
| P1 | Rapid Access Port | |||
| P2 | Rapid Access Port | |||
| P3 | LED | |||
| P4 | LED | |||
| P10 | LED | |||
| Digital | P6 | LED | ||
| P9 | LED | |||
| P12 | 4-Pin Port | |||
| P13 | SPI(SCK) | 4-Pin Port | ||
| P14 | SPI(MISO) | 4-Pin Port | ||
| P15 | SPI(MOSI) | 4-Pin Port | ||
| Serial | P8 | UART(TX) | ESP32(RX) | |
| P16 | UART(RX) | ESP32(TX) | ||
| I2C | P19 | I2C | OLED(SCL) | |
| P20 | I2C | OLED(SDA) | ||
| External Servo |
S1 | ESP32(23) | ||
| S2 | ESP32(22) | |||
| S3 | ESP32(21) |
## Hardware Interface  1. Micro:bit edge connecter 2. USB Port 3. Power Switch 4. 3.7V Lithium battery Port [XH2.54] 5. 6V 4*AA(1.5V) battery Port [DC 5.5mm] 6. Rapid Access Port 7. Crocodile Pin 8. I2C Port 9. 4-Pins Port 10. ESP Servo Port 11. Buzzer switch 12. 4mm Hole 13. OLED Module (128*64 pixel) 14. ESP32 Wireless Module 15. Buzzer 16. General GVS Port ## Detail Hardware Description
Provide the socket for the Micro:bit to install. Follow the instruction icon right about that to install the Micro:bit to the expansion board.
Provide three different type of methods to power on the expansion board and Micro:bit. User can either choose common 5V USB power, or two different port which connect to 3.7V ~ 6V battery box.
The Wireless Module provide the Core function of the expansion board. Though different modules install on the socket, Micro:bit gain the correspond connectivity ability. User may install ESP32, ESP8266, Bluetooth to implement various application project, make use of the IoT resource.
The expansion board have the reserved space to place a SSD1306 0.96 inch OLED screen. User can use the I2C connection port to output the visual element on that module.
When installed the ESP32 module, it provide extra 3 servo control port to connect the Servo motor. Compatible with general GVS 180/360 Servo motor (SG90/SG90S)
The IoT Bit built in a Passive Buzzer on the board, which connected to P0. Using the program can generate different tone of sound.
Since each I/O pin should be only serve for one sensor/actuators at the same time, so you should pulling the switch down (to the sound icon) when using buzzer, otherwise pulling the switch up (to the mute icon) to avoid the interrupt from buzzer to P0.
The Lead Out from the Micro:bit I/O pins, provide great expansion feature for the Micro:bit , user can connect up to 13 different sensor/actuator at the same time. Each independent GVS socket make the connection become more connivance.
On the IoT Bit, two ports are reserved for the 4 Pins Module. Each port can connect to some sensors or actuators which required use two I/O Pins at the same time, such Distance Sesnor. In total, there are 4 I/O Pins being used, they are P12, P13, P14, P15 respectively.
Since Micro:bit support I2C protocol, IoT:bit provide three I2C port (one reserved for OLED Module) to connect I2C peripherals, make the IoT project can access more sensors/actuators.
To some GVS sensor which provide the Rapid Insert Pin, it can use on the Rapid Access Port. It do not need to use the cable to connect the sensor, simplify the product in the application.
For the user who use the crocodile cable clips to connect parts, Iot Bit reserved 5 Pins for them to get easier access. There are 3 Pins from GVS Port 0,1,2 and 2 Pins for 3V and Ground.
## Software Support
The editor offer a text-based mode for user to programming using JavaScript rather than drag the blocks
[MakeCode](https://makecode.microbit.org/#editor)

Python is one of the most famous programming language, widely used in school and industry. Micro:bit provided an online python editor for user to study and exercise python on Micro:bit. User just need to connect Micro:bit with USB and click the Flash button, the compile and upload progress will be finish automatically.
[Python editor](https://python.microbit.org/v/2.0)

## Quick Start
>
Method 1:
>Plug the USB cable into the USB port and turn on the switch
>
Method 2:
>Plug the battery case(1.5V AA*4) into the battery port and turn on the switch
>
Method 3:
>Plug the lithium battery into the lithium battery port and turn on the switch
>
>*18650 battery holder and the battery are not included in the kit set ## Best Practice 1. Load the program into the micro:bit (Micro:bit not connected to iot:bit) 2. Take the USB out from micro:bit 3. Insert the micro:bit to iot:bit 4. Switch on the iot:bit