TaskInterval less then one Second for Shock detection

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
leszek77
New user
Posts: 1
Joined: 05 Dec 2021, 08:10

TaskInterval less then one Second for Shock detection

#1 Post by leszek77 » 05 Dec 2021, 10:08

Hi,

i just wondering if I can lower TaskInterval to less then one second. I want detect shocks.

I have an punch box for my son and I want detect the punches. The punch is shorter then an second so this means it can be undetected.

Currently I have 3 approches what not works so well.
- Analog in
- gyro 6050
- Force Sensor analog out or peak digital out.

but so far I don't get good results.

Solution would be lower TaskInterval to 100ms or can do an switch-off delay for gpio?

thank you

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: TaskInterval less then one Second for Shock detection

#2 Post by Ath » 05 Dec 2021, 10:18

ESPEasy doesn't have that fine-grained configuration for Interval, as it uses that to send data out to Controllers as well.
Some devices do send events to be handled from rules at every measurement, you have to enable Rules in the Tools/Advanced page for that. Not sure if the 6050 plugin does that, though, I'll check later when the laptop is fired up ;)

I've started a plugin for an accellerometer sensor, I'll see if that can be included.
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: TaskInterval less then one Second for Shock detection

#3 Post by Ath » 05 Dec 2021, 13:29

the MPU6050 Gyro sensor does only get a measurement once a second, so increasing the Interval isn't going to help for that plugin.

The Accelerometer ADXL345 does support sending events when 'tapped' (that can be enabled separately), Plugin P120 will add support for the I2C version of that type of board. If you have that type of board available, you can get a testbuild (Download from here, you will need the TEST_D build).
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: TaskInterval less then one Second for Shock detection

#4 Post by Ath » 05 Dec 2021, 14:28

And here's a preliminary version of the documentation:
(Zipped pdf file)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 22 guests