Spresense Header CodeSpresense Header Code

Edge computing with low power consumption

The Spresense development board enables edge solutions with high computing ability and low power consumption.

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)

1Step 1

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

Spresense Wifi ESP 01 Pin ConfSpresense Wifi ESP 01 Pin Conf

2Step 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.

3Step 3

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

4Step 4

Change SSID and PASSWORD to your own.

Wifi SsidWifi Ssid

5Step 5

Upload this sketch to the first Spresense board.

6Step 6

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

7Step 7

Copy the STAIP address shown in the serial monitor window:

STAIPSTAIP

8Step 8

Open File > Examples > ITEADLIB_Arduino_WeeESP8266 > TCPClientSingle.

9Step 9

Change SSID and PASSWORD to your own.

10Step 10

Host Name IPHost Name IP

Change HOST_NAME to the address copied from step 7.

11Step 11

Upload this sketch to the second Spresense board.

12Step 12

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

13Step 13

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

Wifi Serial OutputWifi Serial Output

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