I have set up a rotary encoder to 2 digital pins. How do I store the position before turning the Arduino off?
I read the following 2 websites and the first says PROGMEM is hardly worth it for just one variable and the second website says EEPROMWrite is only good for analog data.
bodkin77:
I have set up a rotary encoder to 2 digital pins. How do I store the position before turning the Arduino off?
I read the following 2 websites and the first says PROGMEM is hardly worth it for just one variable and the second website says EEPROMWrite is only good for analog data.
Delta_G:
No, it's a good site, the OP just needs to learn how to read.
Yep, you're right. Be I'm pretty sure those links were not there when I answered so I just had to believe him when he said a site stated that. (Or I really was blind then )
@stuart0, why on earth do you quote... Please use reply next time
But still the real problem exists, how does the Arduino knows when he needs to "turn off"?
Thanks 4 all the replies. If it didn't say "EEPROM is only for analog" then I must have read it elsewhere. Apologies for that bumsteer! Seems like the EEPROM is the way to go. I'll get to it after I send this msg.
But still the real problem exists, how does the Arduino knows when he needs to "turn off"?
The Arduino' power is being switched on via a PIR sensor and mosfet. While the loop counts to 300 I set a digital pin HIGH as output to feed current back to the mosfet gate via a resistor and transistor, keeping the mosfet (and Arduino) on until 300 is reached. It is this value that I will make variable.
UKHeliBob:
The replies that I quoted looked like you were having difficulty typing joined up sentences, that's all.
hehe Bob. I could understand everything he was saying.
I understand because when I type a quick reply I often accidentally miss the odd word or two. It's funny sometimes when you read back something that you typed just a few minutes ago, and just one or two cases of incorrect tense or missing plural etc and it looks like you're a non English speaker, when in reality they're just simple typos.