YouTube video: https://www.youtube.com/watch?v=k_D_Qu0cgu8
sensorsiot / esp32-dual-core Goto Github PK
View Code? Open in Web Editor NEWSketches to support the YouTube video
Sketches to support the YouTube video
YouTube video: https://www.youtube.com/watch?v=k_D_Qu0cgu8
I am trying to read 2 different sensor values and publishing them to an mqtt server from 2 different cores.
It starts off nicely but after some time I get this following error and the core1 reboots. So I am get data from core1 but core0 doesn't work.
CORRUPT HEAP: Bad head at 0x3ffe84cc. Expected 0xabba1234 got 0x3ffffff8
assertion "head != NULL" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/heap/./multi_heap_poisoning.c", line 199, function: multi_heap_free
abort() was called at PC 0x400d87af on core 1
Backtrace: 0x40087f20:0x3ffdd570 0x4008801f:0x3ffdd590 0x400d87af:0x3ffdd5b0 0x40087c49:0x3ffdd5e0 0x40083d6e:0x3ffdd600 0x400842f9:0x3ffdd620 0x4000bec7:0x3ffdd640 0x400f204e:0x3ffdd660 0x400d33ac:0x3ffdd680 0x400d3175:0x3ffdd6a0 0x400d3221:0x3ffdd6c0 0x401424ea:0x3ffdd6e0 0x400d393b:0x3ffdd700 0x400d39a1:0x3ffdd720 0x400d3ac8:0x3ffdd740 0x400d1db5:0x3ffdd790
Rebooting...
Hi Andreas,
I developed a Gate Door opener via WebInterface.
The Interface looks like that:
If you push the Button the ESPx switches a relais, and if the Door Status changes the Button changes the color.
I use therefore:
My code runs fine on the ESP8266 for many years.
I tried to bring this code into the ESP32 with dual core functionality.
But I have to use some parts in the traditional loop()
if not the ESP crashes.
Are you interested to discuss this point with me?
Hello Andrea
Thank you so much for your excellent work!
In certain conditions it seems relevant to designate core #0 for an Interrupt Service Routine instead of core #1.
Do you know how to do that?
Kind regards
Aurelien
Hi Andreas, your videos on the LED fade (PWM) and creating tasks and assigning them to a specific cpu core were really great and easy to follow. I am trying to make a temperature controlled forced-air furnace vent. I am using a 12vdc gear motor to open and close the louvers depending on the room temperature. I created a sketch that uses the ledcWrite(channel, duty) function as in your example. I works great. I then moved this code into a task and tried running on CPU 0 and CPU 1, but the motor doesn't turn on. I assume that it should work, I have looked the code over several times over days. Here are the two sketches. If you have a chance, please them over.
Thanks in advance for help with this:
Working_Vent_Motor_Control_PWM.zip
Non-Working_Furnace_Vent_Control_Two_Task.zip
First: Thanks a lot for your effort creating such a huge pool of information about ESP!!!
I used the Multi-Core feature for a main-loop (reading/sending sensor-data) and a LED-Status loop.
The LED-Loop (run on CPU#0) controls all my status LEDs which use JLed-Library and if sending take some time (run on CPU #1), the status leds are not affected.
But the message "Task watchdog got triggered. The following tasks did not reset..." (you also mentioned in your video) is realy annoying.
Do you have a solution, how to prevent such message? Change logLevel or do some other magic?
Thx, in advance
Olli
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.