Arduino code for flex sensor to count footsteps

Hello
I'm working on a project
How can use flex sensor to count steps walk
And print the data serially after every 5 minutes.
Please help me to write code in Arduino ide

Where have you got to? Post it in code tags

I have deleted your other cross-post @farhan_lone.

Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting can result in a suspension from the forum.

In the future, please take some time to pick the forum category that best suits the subject of your question and then only post once to that forum category. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Before anyone (including you) can write code, you would need to be clear on what you expect the sensor to be doing- where's it attached, and how does its flexing relate to steps. You ask this under Programming Questions, so that would lead me to think that you've thought through the mechanics of the matter? Share them with us so we can think about the code.

Better yet, as pmagowan says, show your code so far. Asking for help means you are need help on a specific issue, not someone to write the whole code.

Presumably you have a sensor something like this:

image

Sparkfun have a tutorial here, that at least shows how to get it to show degrees of flex.

Have you got that far?

Is your idea to count the straight/bend/straight cycles of one of the leg joints? Once you have it showing the angle, it's a simple enough matter to check when the angle goes from "straight" to "bent", ie crosses over some threshold that you would need to determine.

So my advice is to get to the stage where you can reliably show the degrees of flex with it attached wherever you plan to do that, then come back and we can discuss how to count flex cycles.

(I see they warn about the mechanical robustness of the connections....)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.