Does it make any sense? Share your ideas and guide me.
Does it make any sense?
- Start Player (music- You-Started-Driving.mp3) only if Location Sensor (speed >10 m/s and (< 1 m/s for past 5 minutes)). The concept of second point is that If a driver is not driving for 5 minutes and if he begins to drive after that, a music has to be played.
Sorry, I don't use extensions.
I don't think you are using the Pedometer right.
Pedometer
This component keeps count of steps using the accelerometer.
Properties
Distance
Returns the approximate distance traveled in meters.
ElapsedTime
Returns the time elapsed in milliseconds since the pedometer has started.
SimpleSteps
Returns the number of simple steps taken since the pedometer has started.
StopDetectionTimeout
Returns the duration of idleness (no steps detected) after which to go into a “stopped” state.
StrideLength
Returns the current estimate of stride length in meters, if calibrated, or returns the default (0.73 m) otherwise.
WalkSteps
Returns the number of walk steps taken since the pedometer has started.
Events
SimpleStep(simpleSteps,distance)
This event is run when a raw step is detected.
WalkStep(walkSteps,distance)
This event is run when a walking step is detected. A walking step is a step that appears to be involved in forward motion.
Methods
Reset()
Resets the step counter, distance measure and time running.
Save()
Saves the pedometer state to the phone. Permits permits accumulation of steps and distance between invocations of an App that uses the pedometer. Different Apps will have their own saved state.
Start()
Starts the pedometer.
Stop()
Stops the pedometer.
yes, but have you noticed the component 'StopDetectionTimeout' which detects if a person never walk for given time.
So, I planned in such a way that, When a person drive the following will happen,
-
He never walk. How can we know that if he is not walking?
-
But, he moves in high speed.
So I used this StopDetectionTimeOut to detect if a person never walk for 30 seconds and location sensor to know if he moves in high speed simultaneously.
But, this is not working. So, I shall test with NOT logic with some other block to know if a person is not walking (but in high speed).
This never changes in response to user activities.
It is a parameter you must set to control the sensitivity of the pedometer.
The pedometer never changes it, but you test it as if you expect it to change.
-
Start watching for new steps for 1 minute.
-
Then Reset
-
Then Repeat.
Wish to do something like this. So, at every minute we can check if a person walks, I guess.
Just track Simple Steps in a Clock Timer.
How can we do that?
I must confess that I have not yet used the pedometer component, and am working from the docs.
So here's an assignment for you.
Show all the pedometer attributes in Labels and walk around.
Report back on what you see.
I created something like this. I don't know what I did ie, my brain went into complete confusion.
Can you give me some clarity after seeing these block image. If there are errors please help me to solve.
I used this approach in this project Why these blocks are not working? Hi, I wish to play music3 when music1 and music2 are playing - #13 by S.V_Arul_Shiju
My confusion is mainly because of using clock. I don't know to use clock or tinyDB.
Purpose:
-
Check if user is 'walking or not' using pedometer. If pedometer walksteps are too low for a given time then user is not walking. If pedometer distance is too less for a given time, then user is not walking.
-
Check if user is 'driving or not' using accelerometer. If accelerometer speed is >10km/hr then user started driving. But, confirm this only if user is not walking.
-
Check if user is walking. If pedometer walksteps and distance are as expected then user is walking. If accelerometer speed is less as expected then user is walking.
-
Once the driving speed went above 10 km/hr, then do two things.
4.a) Say 'You started Driving'.
4.b) Check if the speed comes down at around 0 km/ hr for atleast 30 seconds. Then, confirm that the vehicle is stopped once. Only, this happen then repeat the above steps to know if he is driving again to give the voice again as 'You started driving'.
I wish to finish this project today, so somebody please help me.
Are these all your blocks? I did not see Clock.Timer event.
Okay, If it is necessary programming rule to include timer, then I shall include. I am adding few more blocks as well. Will share to clear more doubts.
Setting the Interval and Enabled is for trigger the Timer event.
But from your blocks, there is no relationship between your app and Clock.
I need to set interval.
-
I want to run pedometer sensor for few seconds (eg. 30 seconds or 10 seconds) repetitively and check if a person walked in that gap. I want to check this for every 30 seconds.
-
I want to run accelerometer sensor forever if the app is ON and I want to know the interval whenever the accelerometer sensor detects less movement or no movement. This is again to know if a person is not driving.
I expect to run all the blocks repetitively or in loop.
I am including blocks like this even more to find intervals like this. Guide me.
How can I create repetitive (loop) tasks/code-blocks using clock/timer? ie, to check some readings regularly and whenever that reading reaches expected value, an alert has to be triggered.