Programming Kidbright using Arduino IDE

Anya A.
3 min readMar 19, 2020

Note: For those who want to know more about Kidbright board and Kidbright IDE please follow the link: https://medium.com/@anyapava/introduction-to-kidbright-board-24c596ed3b37

Kidbright is a board whose microcontroller is based on ESP-WROOM-32. In this tutorial, I’ll show how to start programming Kidbright using C++ on Arduino IDE

Tools:

  1. A Kidbrightboard available to be ordered from https://www.kidbright.io/
  2. Arduino IDE software available to download at https://www.arduino.cc/en/main/software

Getting start with Arduino IDE

  1. Download Arduino IDE as an integrated development environment from https://www.arduino.cc/en/main/software
  2. You need to install additional libraries in order to program ESP32 board. The libraries can be installed by navigating to File →Preference and add the database URL https://dl.espressif.com/dl/package_esp32_index.json to the field additional board manager URLs as shown in the figure below.
After navigating to File → Preference menu, this window will be displayed. Add https://dl.espressif.com/dl/package_esp32_index.json to additional boards manager URLs.

3. Once the URL is added, close the Arduino IDE program and restart it.

4. Once restart, navigating to the menu Tools → Boards → Boards Manager… The window below will be displayed. Type esp in the input field and click install

Install Arduino AVR Boards from additional board manager menu

5. Once the additional board is installed. Close the program and restart the program

6. Connect Kidbright board to your computer’s USB port

7. Select Board as “Node32s” and select the serial port that matches your input port as shown:

Select Node32s from board manager

8. You can start writing a program and Upload to the board

Starting your first program

On the board, there are four built-in LEDs available with four different colors. These LEDs can be used to indicate the status of BT, WiFi, NTP, and IoT. These lights are blue, red, yellow and green respectively. The following figure explains the input and output of the Kidbright board. In your first program, you’re going to create sequential control over these LED lights.

  1. Taking a brief look at the board. We notice that LED lights that indicate the status of Bluetooth, Wifi, NTP and IoT are connected to pin IO17, IO2, IO15, and IO12 respectively.
  2. We want to create a program that consecutively turns on and off the LED lights one by one. Here is the C++ programming code that is used to program the Kidbright board.
void setup() {
// Initailize LED pins
pinMode(17, OUTPUT); // Bluetooth
pinMode(2, OUTPUT); // Wifi
pinMode(15, OUTPUT); // NTP
pinMode(12, OUTPUT); // IoT
}
void loop() {
// Turn on LEDs
digitalWrite(17,HIGH);
delay(100);
digitalWrite(2,HIGH);
delay(100);
digitalWrite(15,HIGH);
delay(100);
digitalWrite(12,HIGH);
delay(300);

// Turn off LEDs
digitalWrite(17,LOW);
delay(100);
digitalWrite(2,LOW);
delay(100);
digitalWrite(15,LOW);
delay(100);
digitalWrite(12,LOW);
delay(300);
}

3. Compile and Upload the program

4. If no error persists, you will see the sentense Done uploading on the screen

5. The LED lights will be blink one by one consecutively

References: http://quantum.engr.tu.ac.th/smf/index.php?topic=48.0

Note: This article is translated from Thai and reformulated to be used as a teaching material. It is available to the public for educational proposed.

--

--