The thing is! I´m trying to build an icefishing simulator. Sounds weird and it is.
I have a dc motor inside my fish that has an offset weight into it. The "fishingline" is my electrical wires and goes from the dc trough my fishingrod and into my arduino.
Inside the fishingrod i´ve placed placed a flex sensor that is also hooked to my arduino board.
The story goes like this....
You´re sitting and fishing and raise your rod up and down like normally when you go icefishing.
Suddenly you get a fish snatching on your hook(the snatch is done by rotating the dc motor, but i need my snatches to be random without delay! (as the fish itself, you never know when it bites)
I made it like this. If you pull your fishingrod at the same second/seconds at a mapped strenght in the flexsensor,(which is inside the rod) you get you fish hooked properly. Like hooking a real fish.
When the given value in the flexsensor(when you´ve pulled in the rod at the right time) the dc will spin continously --> now the fish is properly on your hook and it´s wrigling.
A servo is opening a little hole in the ice after a few seconds and then the "fish" is yours.
Shortened down I actually need my flexsensor to react to the dc, which i can´t do with a delay in the loop.