Simple problem: blink LED
Posted: 20 Feb 2017, 20:50
I’m using Firmware R147_RC8.
Measuring Temperature, Humidy, Controlling Relais and reading Switches with fhem.
Working very good.
But I have a simple problem: write a rule letting a LED blink with 1Hz.
With PWM I can’t control the frequency.
I tried this:
Is working well, low CPU load, fast Web response. But slow blinking.
‘timerSet’ with times lower 1 seems not to work.
My next try:
Some fast blink (pulse 0/1) and one slow blink (timerSet). Looks good, but CPU load high and slow Web response.
So I read about ‘longpulse’. Tried with a http command and seems that the Parameter is in seconds.
Filled in the longpulse in the example above, but did not work.
Are timer and longpulse conflict ESP internal resources???
Till now no good solution:
- Blink frequency 1Hz or faster
- Low CPU load
- Fast Web response
May be there is a simple solution. I’m not so experienced….
Thank you!
Willi
Measuring Temperature, Humidy, Controlling Relais and reading Switches with fhem.
Working very good.
But I have a simple problem: write a rule letting a LED blink with 1Hz.
With PWM I can’t control the frequency.
I tried this:
Code: Select all
On System#Boot do
gpio,13,1
timerSet,1,1
endon
On Rules#Timer=1 do
gpio,13,0
timerSet,2,1
endon
On Rules#Timer=2 do
gpio,13,1
timerSet,1,1
endon
‘timerSet’ with times lower 1 seems not to work.
My next try:
Code: Select all
On System#Boot do
pulse,13,1,500
timerSet,1,3
endon
On Rules#Timer=1 do
pulse,13,1,500
pulse,13,0,500
pulse,13,1,500
pulse,13,0,500
pulse,13,1,500
pulse,13,0,500
pulse,13,1,500
pulse,13,0,500
pulse,13,1,500
pulse,13,0,500
pulse,13,1,500
pulse,13,0,500
timerSet,1,1
endon
So I read about ‘longpulse’. Tried with a http command and seems that the Parameter is in seconds.
Filled in the longpulse in the example above, but did not work.
Are timer and longpulse conflict ESP internal resources???
Till now no good solution:
- Blink frequency 1Hz or faster
- Low CPU load
- Fast Web response
May be there is a simple solution. I’m not so experienced….
Thank you!
Willi