Sample Codes

  • Collapse all
  • Expand all
[ESP8266] FCC&CE Test
[ESP8266] I2S Demo Codes

The attachment is an I2S demo based on ESP8266_NONOS_SDK.

If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of the Makefile.

Documentation about I2S

[ESP8266] frc1_timer Demo

The attachment is a demo of frc1_timer based on ESP8266_NONOS_SDK.

If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of the Makefile.

[ESP8266] SPI as slave

The attachment is a demo of SPI running as slave based on ESP8266_NONOS_SDK.

If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of the Makefile.

Documentation about SPI

[ESP8266] Demo for Gizwits

The attachment is a demo for Gizwits based on ESP8266_NONOS_SDK.

If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of the Makefile.

[ESP8266] PWM Demo

This is for ESP8266_NONOS_SDK.

If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of Makefile.

The PWM sample in IOT_Demo of ESP8266_NONOS_SDK:

1. It has a 100us tuning of PWM duty besides the original period.

2. During the tuning, it can not reach the 100% high-level. The tuning may seem like a noise wave.

3. This method can get a high accuracy(long period leads to high accuracy), but if duty gets close to 100%, the accuracy turns to be lower.

There is another PWM demo as the attachment which can get 100% duty, and reliable period, but the accuracy is lower.

How to use this demo:

1. Copy pwm.c into app/user, copy pwm .h into app/include.

Remove "-lpwm" in app/Makefile.

2. Sample codes:

#define PWM_1_OUT_IO_FUNC  FUNC_GPIO15

#define PWM_2_OUT_IO_MUX PERIPHS_IO_MUX_MTCK_U
#define PWM_2_OUT_IO_NUM 13
#define PWM_2_OUT_IO_FUNC  FUNC_GPIO13

uint32 io_info[][3] = {   {PWM_0_OUT_IO_MUX,PWM_0_OUT_IO_FUNC,PWM_0_OUT_IO_NUM},
                          {PWM_1_OUT_IO_MUX,PWM_1_OUT_IO_FUNC,PWM_1_OUT_IO_NUM},
                          {PWM_2_OUT_IO_MUX,PWM_2_OUT_IO_FUNC,PWM_2_OUT_IO_NUM},
                          };

u32 duty[3] = {600,604,634};
pwm_init(1000, duty,3,io_info);

// Set duty, the max duty is 8191 which is set in pwm.h
pwm_set_duty(duty, channel);   // 0~2
pwm_set_period(uint32 period);  // set period;
pwm_start();

[ESP8266] UART-TCP Passthrough Demo

Here is a demo of UART-TCP passthrough mode based on ESP8266_NONOS_SDK.

If using ESP8266_NONOS_SDK_V1.5.0 or later version, please add "-lcrypto" in 'LINKFLAGS_eagle.app.v6" area of Makefile.

[ESP8266 RTOS] SSL client Demo

Here is an example of SSL client based on ESP8266_RTOS_SDK. It will connect to Espressif Cloud and ping it.

  1. If ping succeed, it will continually ping the server.
  2. If ping fail, it will try to reconnect to the server.
  3. If the connection broke, it will try to reconnect to the server.
  4. It will verify the server's certificate during handshake.
ESP WIFI MESH DEMO

Wi-Fi Mesh Features:

Wi-Fi Mesh network allows a large number of IoT mesh nodes connected to internet without any changes to the original Router environment, making it possible to connect various Wi-Fi devices simultaneously to Router.

About ESP Wi-Fi Mesh:

The attached link provides the sample codes for ESP8266’s Wi-Fi Mesh functionality. The detailed description helps developers easily understand and master ESP Wi-Fi Mesh.

(1) By now, ESP mesh has supported 78 Wi-Fi IoT smart lights to connect to home routers simultaneously and stably. The number could be larger.

(2) ESP provides easily-programmable APIs as well as detailed sample codes for users to build a Wi-Fi mesh network quickly.

Link: https://github.com/espressif/ESP8266_MESH_DEMO

  •  

For more resources, please go to our download page.

Download

If you have any questions, please feel free to contact us.

Contact us