Lets get the party started and +1
[url=https://www.banggood.com/custlink/KvGGhGF4wG[/url]
I like ESP8266 and ESP8285 and ESP32
Explore... Chat... Share...
#define PWM_0_OUT_IO_MUX PERIPHS_IO_MUX_GPIO2_U
#define PWM_0_OUT_IO_NUM 2
#define PWM_0_OUT_IO_FUNC FUNC_GPIO2
#define PWM_CHANNEL 1
uint8_t duty=0;
pwm_init( 150, &duty);
pwm_start();
pwm_set_duty(duty, 0);
pwm_start();
#include <ets_sys.h>
#include <osapi.h>
#include <os_type.h>
#include <gpio.h>
#include "user_interface.h"
#define user_procTaskPrio 0
#define user_procTaskQueueLen 1
os_event_t user_procTaskQueue[user_procTaskQueueLen];
// see eagle_soc.h for these definitions
#define PWM_0_OUT_IO_MUX PERIPHS_IO_MUX_GPIO2_U
#define PWM_0_OUT_IO_NUM 2
#define PWM_0_OUT_IO_FUNC FUNC_GPIO2
#define PWM_CHANNEL 1
LOCAL uint8_t led_state=0;
LOCAL uint8_t duty=0;
//Main code function for heartbeat LED on GPIO2
void ICACHE_FLASH_ATTR
loop(os_event_t *events)
{
os_delay_us(10000);
led_state ? duty-- : duty++;
if (duty >= 255 ) led_state=1;
else if (duty <= 10 ) led_state=0;
pwm_set_duty(duty, 0);
pwm_start();
system_os_post(user_procTaskPrio, 0, 0 );
}
void user_init(void)
{
pwm_init( 150, &duty);
pwm_start();
//Start os task
system_os_task(loop, user_procTaskPrio,user_procTaskQueue, user_procTaskQueueLen);
system_os_post(user_procTaskPrio, 0, 0 );
}
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]