Sensorupdate faster than 1 second?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Gnassel
Normal user
Posts: 4
Joined: 22 Jan 2020, 18:23

Sensorupdate faster than 1 second?

#1 Post by Gnassel » 22 Jan 2020, 18:29

Hi,
I love the ESPeasy project. Thanks a lot.

Currently I have a application with a hx711 board + 4 weighting Sensor.
For my iPhone I made an iOS application that ask for values every 500mseconds (Json).

Works stable and fine so far.

Is is somehow possible to update the sensor mor often than 1 per second?
This would make my application more accurate.

Thanks
Frank

User avatar
grovkillen
Core team member
Posts: 3607
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Sensorupdate faster than 1 second?

#2 Post by grovkillen » 22 Jan 2020, 19:27

You would need to compile that yourself then. Currently only once per second for the official builds.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 2793
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensorupdate faster than 1 second?

#3 Post by TD-er » 22 Jan 2020, 19:52

You should also look in the timing stats page to see how long it takes to perform a reading.
I doubt it is possible to do it at a higher frequency.

Gnassel
Normal user
Posts: 4
Joined: 22 Jan 2020, 18:23

Re: Sensorupdate faster than 1 second?

#4 Post by Gnassel » 23 Jan 2020, 07:52

Thanks a lot for you fast support.

Timing looks good - as I understand-
Read HX711 2ms
Loop: 229ms

I will now try to find the relevant lines in the code a compile a new one.

Thanks
Frank

TD-er
Core team member
Posts: 2793
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensorupdate faster than 1 second?

#5 Post by TD-er » 23 Jan 2020, 13:29

You can also test with the rules to trigger multiple taskrun calls.
As a hack you can cause some sub-second delay by calling the LongPulse_ms command (see: https://espeasy.readthedocs.io/en/lates ... -available )
This will block for as long as set.

Gnassel
Normal user
Posts: 4
Joined: 22 Jan 2020, 18:23

Re: Sensorupdate faster than 1 second?

#6 Post by Gnassel » 26 Jan 2020, 16:03

Thanks a lot.
Setting an output pin with
Longpulse_ms
Connected via wire to an input pin, and trigger an action by a change
Works for me.
Maybe there is a software solution, but I am happy for now.

Frank

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: Sensorupdate faster than 1 second?

#7 Post by Domosapiens » 26 Jan 2020, 23:31

Gnassel wrote:
26 Jan 2020, 16:03
Thanks a lot.
Setting an output pin with
Longpulse_ms
Connected via wire to an input pin, and trigger an action by a change
Works for me.
Maybe there is a software solution, but I am happy for now.

Frank
Smart Frank !
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests