Pages: 1 [2]   Go Down
Author Topic: Help with Programming Arduino Uno to sleep and wakeup with FSR sensor  (Read 2695 times)
0 Members and 1 Guest are viewing this topic.
Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4061
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, Jack. I'm not totally surprised. If the voltage from the FSR when not pressed is quite high (eg. 4V) and when pressed is quite low (eg. 2V) then that effectively could be treated as a digital signal, because the digital inputs would have a "transition" zone (around 2.5V) where above that is considered high, and below is considered low.

Indeed, I've measured it, and I think the FSR is darn near an open circuit with no load (weight) on it, so I'd bet the pin is very close to Vcc (the project actually runs on 2xAA alkaline cells). Since the FSR actuations in my project are quite slow, I did use a fairly long debounce interval on it (100ms vs. 20 or 25 for the buttons), but I'm not sure that is really of any consequence. Just one of those serendipitous things, it still makes me smile smiley-grin

I used this FSR from Sparkfun if that makes a difference to anyone:
https://www.sparkfun.com/products/9376
« Last Edit: December 15, 2012, 06:02:29 pm by Jack Christensen » Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, Jack. I'm not totally surprised. If the voltage from the FSR when not pressed is quite high (eg. 4V) and when pressed is quite low (eg. 2V) then that effectively could be treated as a digital signal, because the digital inputs would have a "transition" zone (around 2.5V) where above that is considered high, and below is considered low.

Thanks for your help. I have one more question , how do i test to see if the arduino is at sleep or not. ?
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12631
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how do i test to see if the arduino is at sleep or not. ?

Do you mean how can your code test whether the Arduino it runs on is asleep or not? The answer is that it is awake.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4061
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your help. I have one more question , how do i test to see if the arduino is at sleep or not. ?

You're welcome! I just used an ammeter to monitor the current drawn by the circuit.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: 1 [2]   Go Up
Jump to: