Loading...
Pages: 1 [2]   Go Down
Author Topic: Help with Programming Arduino Uno to sleep and wakeup with FSR sensor  (Read 891 times)
0 Members and 1 Guest are viewing this topic.
Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 43
Posts: 2505
"We're a proud service of the Lost Electricity Reclamation Agency"
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

Get the infamous "One Million Ohms" board at tINDIE.com: http://tinyurl.com/BuyMohms

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
Tesla Member
***
Karma: 89
Posts: 6383
-
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

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 43
Posts: 2505
"We're a proud service of the Lost Electricity Reclamation Agency"
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

Get the infamous "One Million Ohms" board at tINDIE.com: http://tinyurl.com/BuyMohms

Pages: 1 [2]   Go Up
Print
 
Jump to: