newbie has question about receiving data from ESP 8266 and P2021


I need a little guidance.

I am creating an art installation that will convert ocean waves into data for triggering music with Max MSP or another program.

I have an Adafruit P2021 9-DOF Accel/Mag/Gyro + Temp... AND an ESP 8266 connected on a breadboard.

I have setup the ESP 8266 to use Arduino IDE through this page:

The IDE serial monitor says I have successfully connected.

Two questions:

1) How do I interact with the ESP8266 wirelessly? The ESP8266 still doesn't compile if the USB cable is disconnected.

2) How do I test that I am receiving signal from the Accel/Mag/Gyro etc.?

The two devices are wired on the breadboard together properly.

Thank you!


2) How do I test that I am receiving signal from the Accel/Mag/Gyro etc.?

You should be able to use Serial.print() from the ESP 8266 to show the values sent from the P2021 to the ESP 8266/HUZZAH.

How do I interact with the ESP8266 wirelessly?

Do you need to be on a local wifi network, or be accessible over the internet?

Here's a link to an excellent Tutorial

There is an Adafruit tutorial for the IMU.

Since you have two Adafruit producets you should try Adafruit support forum.


Thank you for the link and info.

I followed the instructions and was able to setup an ESP8266 access point on my wifi networks list.

So I ping from ESP8266 Access Point wifi - I get this:

PING ( 56 data bytes 64 bytes from icmp_seq=0 ttl=255 time=4.662 ms 64 bytes from icmp_seq=1 ttl=255 time=37.653 ms 64 bytes from icmp_seq=2 ttl=255 time=2.037 ms 64 bytes from icmp_seq=3 ttl=255 time=30.806 ms Request timeout for icmp_seq 4 64 bytes from icmp_seq=5 ttl=255 time=4.374 ms 64 bytes from icmp_seq=6 ttl=255 time=51.566 ms 64 bytes from icmp_seq=7 ttl=255 time=100.161 ms 64 bytes from icmp_seq=8 ttl=255 time=27.967 ms

--- ping statistics --- 10 packets transmitted, 8 packets received, 20.0% packet loss round-trip min/avg/max/stddev = 2.037/32.403/100.161/30.589 ms

After that, I uploaded thru IDE the mDNS code, then try to ping: esp8266.local:

Nothing comes back.

What did I miss?

Thank you!

Hi Everyone!

I am a composer and I am creating a music/sound installation in which I receive signals generated from an ESP8266 connected with an Adafruit P2021 , over wifi, into my laptop.

The device, inside a buoy, will be in water and send signals generated from a gyro/potentiometer to my computer and be processed—likely with Supercollider.

Please advise on how to setup the ESP8266 to transmit signal.

On another forum it was suggested I follow this tutorial:

I got as far a page eight:

I just learned that I don't need to complete all the steps in the tutorial.

Please advise me on the steps needed to have the ES8266 send signals to my laptop.

Thank you!

duplicate thread with the same basic question ?

can you advise what you are sending ?

is it a temperature, in integer, like 72 that you send every 5 minutes ? is it a floating point like 72.123 that you send hourly ?

assuming you are sending a packet of information every " ____ " period of time and the packet is " ________ " in size.. for example " _ post a sample of your data_ "

since we do not care what you do with the data after you receive it, and I ASSUME, you are not working at CERN on the Supercollider.... we should only focus on getting the data and sending the data, and receiving the data.

everything else (at this point) might be too much information.


Ideally I would receive signals from the gyro and mag sensors, (to begin with). I would like the data to arrive as often as possible so the audience can perceive the sounds being affected by the undulating buoy.

I do not know how big a packet size would be, yet.

I suggest that you do some research into the topic of MQTT.

Instead of using the Huzzah as a web server, I think you might find success with the esp8266 set up as an MQTT client constantly pushing data to an MQTT broker which resides on your local computer. However, I'm not sure how the broker will pass the data to Supercollider or whatever program takes the data and turns it into the sound/art output.

Be awarwe, Many of the MQTT tutorials are geared towards getting the data to a remote server on the internet, but that doesn't sound like what you want.

I'll look into it.

Thank you.

I'm still open to suggestions everyone!


This thread shows how get IMU data into max/msp using the Open Sound Control protocol. OSC might also work for super collider. I do not know anything about max/msp or super collider except for reading the first paragraph or two of their respective Wikipedia pages.

The Arduino OSC library includes examples for Max/msp. And examples of how to use the library on ESP8266.

I am creating an art installation that will convert ocean waves into data for triggering music with Max MSP or another program.

Can you please describe more about your project, and the physical relationship between the ocean, the wifi module, and the computer and the music.

It sounds like you will have a sealed floating module to transmit the data, and I understand that you have ESP8266 wifi hardware, but why did you decide that wifi was the best wireless solution for your application?

Are you planning to use a local network router or the internet? Are you thinking of the ESP8266 as an access point directly sending to a computer with wifi without going through a local network wifi router? What is the transmission range required? My experience is that the range of the ESP8266 as an access point is less than that of my home router.

I understand that you are reviewing different wifi/iot protocols, but are you certain you are looking at the right wireless method?


Physical Relationship:The device will be encased in a buoy and anchored just inside the water line. As the water ebbs and flows the moving device will send signal to my computer will be about 30-40 feet away.I hope to control the signal in real-time.

Per your question:] ["Wifi was the best wireless solution for your application?"] I hadn't considered Bluetooth.

Currently my ESP8266 appear in my wifi network as ESP8266 Access Point.

I was told the ESP8266 I have will transmit at a good distance without obstacles.

What is the simplest way to get the ESP8266 signal to my laptop?

Thank you for the help.

What is the simplest way to get the ESP8266 signal to my laptop?

I am going to suggest another method which looks pretty simple–using ESP-NOW.

This is a special protocol designed to link two (or more) esp modules. It is described here with examples by Robin2

There is an excellent video about esp-now here

You will need to buy a second esp8266 module instead of using the wifi receiver of the computer. The usb connection is important, and a second Adafruit Huzzah (or a Wemos D1 or Node MCU) with a built in usb interface will make life easier.

The receiving module will pass the data it receives to the computer through usb and a serial port.

You have been focusing on the wireless data transfer, but I question where you are on other aspects of the project.

Can you read the sensor with the esp8266, and understand what the data packet will be?

If this data packet were presented to a serial port on the computer as either ascii or raw bytes do you know what to do with it? Do you know how to input a serial data stream to the program, which will turn the input data into output lights/music?

My simple experiments with esp now has been pretty positive. I have not really tested range issues or what the impact of the packing of one module in the bouy will be. Class1(high powered) bluetooth might be another simple serial option, but it will get you into new hardware.

One issue I have come across is that there may be a library link issue with #include <espnow.h> if you are using older versions of the esp8266 ide files. If you use the board manager to update to the latest version all will be well.


Thank you for the continuing suggestions. I may have come upon the right way to do this using OSC:

I'm going to give this a try.

I'll post my results.

Hi Everyone!

I am trying to connect the ESP8266 feather with LSM9DS0. The LSM won't communicate with the ESP.

Kindly assist!

I have the two boards connect as such: 1.ESP 3V to LSM VIN 2.ESP GND to LSM GND 3.ESP SCL to LSM SCM 4. ESP SDA to LSM SDA

When I upload code ISM9Dodtest and read the Serial Monitor I get:

ets Jan 8 2013,rst cause:4, boot mode:(1,6)