I am currently using an Arduino Mega with a fast vibration sensor to trigger the components operation (force sensor, temperature sensor) and also toggle sleep mode.
I am very new at this and I have been doing some googling, but I just can't seem to understand it.
So, my questions are:
- How would I toggle(on/off) sleep mode?
- How would I use interrupts (timer, pin change interrupt?) for an analog pin that triggers when the vibration sensor is triggered, resulting in other components operating?
I am currently working on a Mega, but I will eventually move on to the Arduino Mini Pro. I hope there are no exclusive problems later on.
I realize that this is not a professional question, but I find these tasks very challenging.
Please help me. An example link or perhaps example code to help me understand better.
Thank you very much.