Is it possible to process multiple data at the same time with ESP32?
Is it possible to process multiple data at the same time with ESP32?
Hi, can esp32 evaluate data from several sensors at the same time? I want to explain a little more; for example i have firebeetle esp32. Can it simultaneously process data from 10 lis3mdl magnetic field reader modules? can i export this data to a screen?
Re: Is it possible to process multiple data at the same time with ESP32?
How frequently does each need to be sampled? How are you defining "at the same time"? You could process them in a loop with a task, or have them each sampled with their own software timer. A single processor doesn't truly do multiple things "at the same time", and a dual core processor can do up to two things "at the same time".
Re: Is it possible to process multiple data at the same time with ESP32?
Thank you for the answer. There will be 5 magnetic reader inputs as a peripheral to the mcu. It is not my intention to confuse sensor data with each other. I just want to measure the voltage change at the digital output of each sensor separately and evaluate it in the code. these data naturally enter the mcu as instant data. While doing this, as an observer, I should be able to see these values on the screen at the same time.
Re: Is it possible to process multiple data at the same time with ESP32?
In general, it is possible to connect multiple sensors with ESP32 and read the data like this example: https://www.theengineeringprojects.com/ ... esp32.html
But I am not sure which magnetic reader you're using. Which communication protocol does it support? I2C? Or something else? The method of receiving data from all the sensors will depend on the communication protocol.
But I am not sure which magnetic reader you're using. Which communication protocol does it support? I2C? Or something else? The method of receiving data from all the sensors will depend on the communication protocol.
Re: Is it possible to process multiple data at the same time with ESP32?
The sensor I want to use is the lis3mdl magnetic sensor with polo. It provides i2c and spi protocol communication.
Re: Is it possible to process multiple data at the same time with ESP32?
Of course, the following is what comes to my mind as code design;
1- the average of the sensor output voltages.
2- Separate sensor output voltage values for each sensor.
3- to use all these values in formulas with the if operator according to the criteria I have determined.
1- the average of the sensor output voltages.
2- Separate sensor output voltage values for each sensor.
3- to use all these values in formulas with the if operator according to the criteria I have determined.
Re: Is it possible to process multiple data at the same time with ESP32?
Your software can or should be able to distinguish the devices. You mentioned SPI and/or I2C. If you have multiple devices on one of these busses, they are distinguished by I2C address or some other chip select logic, unless you have them on separate busses. In either case, the code must know which one it is accessing. The software processing is fast enough that when you update the screen after reading each one, it appears instantaneous to a user.Ahmet58 wrote: ↑Fri Dec 02, 2022 6:41 am... It is not my intention to confuse sensor data with each other. I just want to measure the voltage change at the digital output of each sensor separately and evaluate it in the code. these data naturally enter the mcu as instant data. While doing this, as an observer, I should be able to see these values on the screen at the same time.
Re: Is it possible to process multiple data at the same time with ESP32?
Thanks for the replies. it was very enlightening.
Re: Is it possible to process multiple data at the same time with ESP32?
Would you allow me to ask you one more question? I understand the explanations so far. I need to connect several of the same digital sensor type to the mcu. If the sensors are of the same type, will there be a problem with the i2c protocol being called by the mcu and routing its data?
Re: Is it possible to process multiple data at the same time with ESP32?
If you are using multiple i2c devices, ideally, each device has its own unique i2c address. Some devices support multiple i2c addresses by setting some pins to ground or Vcc. However, if you are using two or more devices which have identical i2c addresses, then you can either connect them to separate i2c busses (the ESP32 can support multiple busses), or you could use GPIOs and a little circuitry to disable or enable specific devices.Ahmet58 wrote: ↑Sat Dec 03, 2022 10:22 amWould you allow me to ask you one more question? I understand the explanations so far. I need to connect several of the same digital sensor type to the mcu. If the sensors are of the same type, will there be a problem with the i2c protocol being called by the mcu and routing its data?
Who is online
Users browsing this forum: No registered users and 155 guests