Can esp32 with EspEasy not multitask?
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 19
- Joined: 02 Jun 2018, 22:02
Can esp32 with EspEasy not multitask?
Helo,
Try on as 4 pin's at the same time. I have not found a way.
I send via MQTT 4 commands e.g. PWM, 23,1023,1000 and so on.
Unfortunately, the ESP32 waits until the dimming is completed, then only the new pin is controlled. And so on.
The web interface is the same, only when the dimming is finished, you can first enter another command.
With dimming 0 seconds, it will take about 200ms before the next pin is switched.
Is it possible to change this somehow?
Is it the ESP32 or EspEasy?
Thank you
Try on as 4 pin's at the same time. I have not found a way.
I send via MQTT 4 commands e.g. PWM, 23,1023,1000 and so on.
Unfortunately, the ESP32 waits until the dimming is completed, then only the new pin is controlled. And so on.
The web interface is the same, only when the dimming is finished, you can first enter another command.
With dimming 0 seconds, it will take about 200ms before the next pin is switched.
Is it possible to change this somehow?
Is it the ESP32 or EspEasy?
Thank you
Re: Can esp32 with EspEasy not multitask?
I think it's EspEasy, see viewtopic.php?t=2530#p13672
-
- Normal user
- Posts: 19
- Joined: 02 Jun 2018, 22:02
Re: Can esp32 with EspEasy not multitask?
oh thanks, its not good.
Re: Can esp32 with EspEasy not multitask?
I am working on changing just this kind of behavior.
But it is going to take some time to get it all done.
For a first impression what's already changed, see: https://github.com/letscontrolit/ESPEas ... t-29741043
But it is going to take some time to get it all done.
For a first impression what's already changed, see: https://github.com/letscontrolit/ESPEas ... t-29741043
-
- Normal user
- Posts: 19
- Joined: 02 Jun 2018, 22:02
Re: Can esp32 with EspEasy not multitask?
Hello,
Thank you for the effort. Looks better.
Will it later work like that when just a pin is at its blot when new command on mqtt comes in. that the previous ferb is aborted?
So similar:?
Thank you
Thank you for the effort. Looks better.
Will it later work like that when just a pin is at its blot when new command on mqtt comes in. that the previous ferb is aborted?
So similar:?
Code: Select all
/*
* hell -> LED aus, PIR ohne Funktion
* dunkel - innerhalb Zeitspanne -> LED = Helligkeit von Wert des LDR, mit PIR LED=155
* dunkel - außerhalb Zeitspanne -> LED 0, mit PIR 155
*/
void dimmen_t(byte status, uint16_t helligkeit, bool zspanne) {
static uint32_t altMillisDimmen;
static byte fade = 0;
byte ziel = 0;
if (aktMillis - altMillisDimmen >= intervallDimmen) {
altMillisDimmen = aktMillis;
switch (status) {
case AUS:
ziel = 0;
break;
case MIN:
if (zspanne) {
ziel = map(helligkeit, helligkeitsschwelle, 1023, zielwertMin2, zielwertMin1);
} else {
ziel = 0;
}
break;
case MAX:
ziel = zielwertMax;
break;
}
if (fade < ziel) {
fade++;
Serial.print("fade Treppe ");
Serial.println(fade);
}
if (fade > ziel) {
fade--;
Serial.print("fade Treppe ");
Serial.println(fade);
}
analogWrite(pinLEDt, fade);
}
}
Re: Can esp32 with EspEasy not multitask?
One of the first things I want to change is the long pulse.power-dodge wrote: ↑18 Jul 2018, 22:07 Hello,
Thank you for the effort. Looks better.
Will it later work like that when just a pin is at its blot when new command on mqtt comes in. that the previous ferb is aborted?
So similar:?
[...]
That command should be split into several scheduled actions and being dealt with by the new scheduler.
The same could then be done for the dimmer. And the funny thing is, when it is using the same "scheduler ID" for a new given command, it should replace the already scheduled one.
Since a schedule-ID can only be set once in the queue. (made that on purpose, for reasons like these)
So the general idea is that a dimmer command would re-schedule itself when executed by setting its own ID in the scheduler. When called it knows what the new value must be and just set it.
-
- Normal user
- Posts: 19
- Joined: 02 Jun 2018, 22:02
Re: Can esp32 with EspEasy not multitask?
Hello,
that would be great!
Had used only for the lighting arduino, since switching worked in ms range.
Unfortunately EspEasy does not yet do that, waiting for a command to finish.
I'm curious how EspEasy32 is developing, this chip has so much potential!
Had thought even before first to look at the one without the EspEasy first to MQTT and looks at what's going on there.
greeting
that would be great!
Had used only for the lighting arduino, since switching worked in ms range.
Unfortunately EspEasy does not yet do that, waiting for a command to finish.
I'm curious how EspEasy32 is developing, this chip has so much potential!
Had thought even before first to look at the one without the EspEasy first to MQTT and looks at what's going on there.
greeting
-
- Normal user
- Posts: 19
- Joined: 02 Jun 2018, 22:02
Re: Can esp32 with EspEasy not multitask?
Hello,
I have 1 problem with GPIO 17 and GPIO 16 found.
When switching on the ESP you can switch off the outputs with PWM with rules. PWM, 16,0
Later, however, if you use the pin you can take any value but not zero. There is an answer from ESP but it will not be executed.
Let's say GPIO 16 was at 500,
if you send PWM, 16,0, then the pin will still be set to 500 although the following is answered in the web front:
GPIO,16,0 works dont
I have 1 problem with GPIO 17 and GPIO 16 found.
When switching on the ESP you can switch off the outputs with PWM with rules. PWM, 16,0
Later, however, if you use the pin you can take any value but not zero. There is an answer from ESP but it will not be executed.
Let's say GPIO 16 was at 500,
if you send PWM, 16,0, then the pin will still be set to 500 although the following is answered in the web front:
Code: Select all
{
"log": "GPIO 16 Set PWM to 0",
"plugin": 1,
"pin": 16,
"mode": "PWM",
"state": 0
}
Re: Can esp32 with EspEasy not multitask?
GPIO16 differs in functionality from the rest.power-dodge wrote: ↑21 Jul 2018, 21:33 Hello,
I have 1 problem with GPIO 17 and GPIO 16 found.
When switching on the ESP you can switch off the outputs with PWM with rules. PWM, 16,0
Later, however, if you use the pin you can take any value but not zero. There is an answer from ESP but it will not be executed.
Let's say GPIO 16 was at 500,
if you send PWM, 16,0, then the pin will still be set to 500 although the following is answered in the web front:
GPIO,16,0 works dontCode: Select all
{ "log": "GPIO 16 Set PWM to 0", "plugin": 1, "pin": 16, "mode": "PWM", "state": 0 }
The ESP8266 has 17 GPIO pins (0...16).
6 of them (GPIO 6 ...11) are connected to the flash and are thus not useable.
GPIO 1 & 3 are connected to hardware serial port.
GPIO 16 can be used to wake up from sleep. But you have to consider the internal resistors, since it has no pull-up resistor, but pull-down instead.
Should be connected to RST to wake up.
-
- Normal user
- Posts: 19
- Joined: 02 Jun 2018, 22:02
Re: Can esp32 with EspEasy not multitask?
Thanks for the answer.
It's about ESP32.
He has a lot more pins, so 16 and 17 not normal with PWM usable?
Thank you
It's about ESP32.
He has a lot more pins, so 16 and 17 not normal with PWM usable?
Thank you
Re: Can esp32 with EspEasy not multitask?
Oh sorry, I missed that part about the ESP32.power-dodge wrote: ↑25 Jul 2018, 20:03 Thanks for the answer.
It's about ESP32.
He has a lot more pins, so 16 and 17 not normal with PWM usable?
Thank you
I have not performed a lot of tests with ESP32.
So maybe there could be some "ESP8266-logic" left in the code about what pins to use and what not.
-
- Normal user
- Posts: 19
- Joined: 02 Jun 2018, 22:02
Re: Can esp32 with EspEasy not multitask?
Hello,
yes, the bad functioität the pin control I can confirm again.
Some pins can not be set to 0 via PWM and GPIO.
If you set the pins to 0 by rules when starting, then there are sporadically other pins that can not be set to 0.
These pins they can not go but put on PWM 1. But it's easy for consumers to shine.
This behavior I have also on several ESP32 and quite edentisch.
greeting
yes, the bad functioität the pin control I can confirm again.
Some pins can not be set to 0 via PWM and GPIO.
If you set the pins to 0 by rules when starting, then there are sporadically other pins that can not be set to 0.
These pins they can not go but put on PWM 1. But it's easy for consumers to shine.
This behavior I have also on several ESP32 and quite edentisch.
greeting
Re: Can esp32 with EspEasy not multitask?
The ESP32 is NOT an extra size ESP8266, but behaves completely different. Some pins cannot be programmed to be input and others cannot be programmed to be output. I fell into that trap, ruining my prototype (scratched the pcb and started over again).power-dodge wrote: ↑27 Jul 2018, 15:22 Hello,
yes, the bad functioität the pin control I can confirm again.
Some pins can not be set to 0 via PWM and GPIO.
If you set the pins to 0 by rules when starting, then there are sporadically other pins that can not be set to 0.
These pins they can not go but put on PWM 1. But it's easy for consumers to shine.
This behavior I have also on several ESP32 and quite edentisch.
greeting
For pwm it’s the same, some pins can do pwm while others cannot. Just like I2C: some pins are hardware I2C, while others are software I2C (hw is twice the speed).
Take a look at an ESP32 pinout like this one (wroom32 type): https://goo.gl/images/RXWicF
You’ll need to understand what each label on every pin means! If not you’ll be searching what went wrong for a very long time.
Cheers,
Lisa
-
- Normal user
- Posts: 19
- Joined: 02 Jun 2018, 22:02
Re: Can esp32 with EspEasy not multitask?
Helo,
thanks for answer.
I will use ESP01 with mcp23017, i hope this have more speed and works with PWM. (Dimming)
Or funktional it on ESP32 good?
Thanks
thanks for answer.
I will use ESP01 with mcp23017, i hope this have more speed and works with PWM. (Dimming)
Or funktional it on ESP32 good?
Thanks
Who is online
Users browsing this forum: No registered users and 89 guests