Spresense 6-core microcontroller board with ultra-low power consumption

High-performance microcontroller board with hi-res audio, camera input, internal GPS and Edge AI support.

Buy Spresense

Equipping Spresense with WiFi connectivity

WiFi might be the most well-known wireless connectivity method for both professional and private use. The infrastructure is widely familiar and deployed in many places and the data throughput is very high. Once connected to a network with internet access, you can communicate with your devices from anywhere in the world theoretically. In the case of the Spresense development board, WiFi connectivity can either be added directly to the Spresense main board or by using the Spresense extension board together with a WiFi Arduino shield. This tutorial explains how to equip Spresense with WiFi directly to the main board, but the steps after step 1 could be applied when using a WiFi Arduino shield as well.

Connecting WiFi directly to the Spresense main board

Equipping Spresense with WiFi is an exercise of connecting five wires to the WiFi module. For this example, we’re using an Arduino library with an ESP8266 ESP-01 WiFi module.

Here is the list of components we need for this example:

  • 2 Spresense main boards
  • 2 WiFi modules (ESP8266)
  • A 10k ohm resistor
  • A USB micro cable (or two if you don’t want to move it between the boards)

Step 1

Connect one WiFi module on each Spresense main board using the pins in the table below:

Step 2

Go to the site https://github.com/kamtom480/ITEADLIB_Arduino_WeeESP8266 and “Download ZIP”. In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library. Navigate to the .zip file's location and open it.

Step 3

Next, go to File > Examples > ITEADLIB_Arduino_WeeESP8266 > TCPServer.

Step 4

Change SSID and PASSWORD to your own.

Step 5

Upload this sketch to the first Spresense board.

Step 6

Open the serial monitor connected to the first Spresense board and set the baud rate to 9600.

Step 7

Copy the STAIP address shown in the serial monitor window:

Step 8

Open File > Examples > ITEADLIB_Arduino_WeeESP8266 > TCPClientSingle.

Step 9

Change SSID and PASSWORD to your own.

Step 10

Change HOST_NAME to the address copied from step 7.

Step 11

Upload this sketch to the second Spresense board.

Step 12

Open the serial monitor connected to second Spresense board and set the baud rate to 9600.

Step 13

You should see information about incoming packets from the second Spresense board.

The list of available AT commands for the ESP8266 can be found here: https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf

And examples of how to use AT commands can be found here: https://www.espressif.com/sites/default/files/documentation/4b-esp8266_at_command_examples_en.pdf