HiFive1 Web Server With ESP32 / ESP8266 WiFi Modules Tutorial




The HiFive1 is the first Arduino-compatible RISC-V based board built with FE310 CPU from SiFive. The board is about 20 times faster than Arduino UNO yet like the UNO board HiFive1 lacks wireless connectivity. Fortunately, there are several inexpensive modules on the market to mitigate this limitation.

In my previous tutorials, we have seen how to add minimalistic WiFi connectivity via AT commands or achieve worldwide reachability with MQTT broker.

In this tutorial, we will add a Web Server capability to the HiFive1.
Any device on the local network will be able to communicate with the Web Server using a Web Browser.

This project demonstrates how to control the HiFive1 built-in RGB LED via a simple Web page.

Materials Needed For This Project:

  • HiFive1 board (can be purchased here)
  • ESP32 Dev Module or ESP8266 NodeMCU 1.0
  • 4 jumper wires

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Environment Setup

First, you need the Arduino IDE

1. Follow the instructions to install the HiFive1 board Arduino package and USB driver.

2. Install the ESP32 or ESP8266 board package by adding an appropriate URL to the "File->Preferences->Additional Boards Manager":

  • ESP8266 - http://arduino.esp8266.com/stable/package_esp8266com_index.json
  • ESP32 - https://dl.espressif.com/dl/package_esp32_index.json

Step 2: Wiring the ESP32

If you are using an ESP8266 skip to step 3.

Connect the jumper wires in the following way:

  • GPIO 10 (HiFive1) - > Tx (ESP32)
  • GPIO 11 (HiFive1) - > Rx (ESP32)

Make sure that the IOREF jumper is set to 3.3v.

Step 3: Wiring the ESP8266

Connect the jumper wires in the following way:

  • GPIO 10(HiFive1) - > Tx (ESP8266)
  • GPIO 11(HiFive1) - > Rx (ESP8266)

Make sure that the IOREF jumper is set to 3.3v.

Step 4: Programming

HiFive1 Code:

Before programming set the "Tools->Board" to "HiFive1", the "Tools->CPU Clock Frequency" to "256MHz PLL", the "Tools->Programmer" to "SiFive OpenOCD" and set the correct Serial Port.

ESP32/8266 Code:

During the programming, the ESP board should have the hardware Rx and Tx pins disconnected.

After the code was successfully uploaded, reconnect the Rx and Tx pins on the ESP to ensure communication between the HiFive1 and the ESP.

For ESP32 - Set the "Tools->Board" to "ESP32 Dev Module", the "Tools->Programmer" to "AVRISP mkll" and set the correct Serial Port.

For ESP8266 - Set the "Tools->Board" to "NodeMCU 1.0 (ESP-12E Module)", the "Tools->Programmer" to "AVRISP mkll" and set the correct Serial Port.

Step 5: Final Result

In order to connect to the ESP Web Page, open a browser on your PC or mobile device and enter the IP Address (You can find the IP Address by uncommenting the line with WiFi.localIP() in the setup function. Remember to re-comment the line after finding the IP in order for the sketch to work properly).

In my case, the IP's were: ESP32 - and ESP8266 -

Set your Serial Monitor’s Baud Rate to 115200 used in the sketch.

Your final page should look like in the attached pictures.

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    2 Discussions


    6 months ago

    Guide me if possible.


    Question 6 months ago on Step 5

    Do you have any examples for hifive1 i2c related things?
    i would like to make a quad copter using hifive1 ,just seen arduino uno based sample,MPU6050 gyro also been used,When i analysed the code they have included Wire.h and EEPROM library.
    So how can i replace those libraries ?
    i think EEPROM library isn't available for hifive1 and there is software i2c for hifive1.But is it possible?