- Home
- Hardware
- SDKs
- Cloud
- Solutions
- Support
- Ecosystem
- Company
- Contact
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
Link to a demo of UART-TCP passthrough mode based on ESP8266_NONOS_SDK, please click here.
[ESP8266 RTOS] SSL client Demo
Link to an example of SSL client based on ESP8266_RTOS_SDK, please click here.