view measurements of a sensor via WiFi

H4rold
Posts: 3
Joined: Tue Jan 25, 2022 10:14 pm

view measurements of a sensor via WiFi

Postby H4rold » Tue Jan 25, 2022 10:20 pm

Hello friends, I am starting with esp32 and I want to visualize data from an accelerometer on my computer and I want to do everything via Wi-Fi, programs and types of wireless communication, do you recommend me, Thank you.

MakerMan
Posts: 9
Joined: Wed Dec 22, 2021 8:01 pm

Re: view measurements of a sensor via WiFi

Postby MakerMan » Thu Jan 27, 2022 11:30 am

Perhaps you could tell us more about your requirement.

For example, what is the accelerometer measuring, how often, are you seeking real-time readings, what are you expecting at server ...?

H4rold
Posts: 3
Joined: Tue Jan 25, 2022 10:14 pm

Re: view measurements of a sensor via WiFi

Postby H4rold » Thu Jan 27, 2022 4:47 pm

MakerMan wrote:
Thu Jan 27, 2022 11:30 am
Perhaps you could tell us more about your requirement.

For example, what is the accelerometer measuring, how often, are you seeking real-time readings, what are you expecting at server ...?
Hello, I want to see the acceleration exactly, I am using the MPU6050, and I want to see the data in graphic form at the sensor sampling frequency which is 1kHz, and then save it in any file format, thanks.

H4rold
Posts: 3
Joined: Tue Jan 25, 2022 10:14 pm

Re: view measurements of a sensor via WiFi

Postby H4rold » Thu Jan 27, 2022 4:48 pm

MakerMan wrote: Perhaps you could tell us more about your requirement.

For example, what is the accelerometer measuring, how often, are you seeking real-time readings, what are you expecting at server ...?
MakerMan wrote:
Thu Jan 27, 2022 11:30 am
Perhaps you could tell us more about your requirement.

For example, what is the accelerometer measuring, how often, are you seeking real-time readings, what are you expecting at server ...?
Hello, I want to see the acceleration exactly, I am using the MPU6050, and I want to see the data in graphic form at the sensor sampling frequency which is 1kHz, and then save it in any file format, thanks.

MakerMan
Posts: 9
Joined: Wed Dec 22, 2021 8:01 pm

Re: view measurements of a sensor via WiFi

Postby MakerMan » Sun Jan 30, 2022 7:11 pm

Writing out what you want to achieve presumably looks something like ...

initially ...
open a wifi connection to an access point
open a transport layer connection to a server / your computer
next ...
every 1 ms
> check connection, handle disconnection
> read MPU6050 acceleration (x,y,z values)
> send to a server (timestamp, x,y,z values)
> and repeat

You need to be able to detect loss of WiFi connection and / or transport connection and reconnect.

One option would be to start by getting the sensor talking locally to the ESP32 and displaying the results, in which case this approach could be helpful as a building block ..

https://randomnerdtutorials.com/esp32-m ... eb-server/

And then get this running faster and expand on this to stream the data to your server ...

If you don't need the sensor data in 'real time' and / or you need to retrieve it, then writing the data to a microSD card attached to the ESP32 could be an option. Then you could retrieve the data if the WiFi connection fails, for example.

Who is online

Users browsing this forum: No registered users and 14 guests