Author Topic: sleep mode on arduino  (Read 3061 times)

0 Members and 1 Guest are viewing this topic.

Offline gaurav.pTopic starter

  • Robot Overlord
  • ****
  • Posts: 142
  • Helpful? 0
  • Go robotics
sleep mode on arduino
« on: July 16, 2010, 04:42:59 AM »
i hav a arduino board based on atmega8 and i want a functionality so that it would go into a sleep mode after pressing of a button on the board.in the atmega8 datasheet it is specified that the atmega8 has sleep mode function.how can it be done?

regards,
shakerobo
Big Things Come In Small Packages!!!

Offline voyager2

  • Supreme Robot
  • *****
  • Posts: 463
  • Helpful? 6
    • Voyager Robotics
Re: sleep mode on arduino
« Reply #1 on: July 16, 2010, 04:58:14 AM »
Maybe an interrupt?
When the button is pressed, it activates an interrupt, turning of all non-essential functions and processes(servos,sensors,etc.)
I've heard this is not recommended though, as most robots can't afford to urn off anything at any time.
But too go into the atmega8 sleep mode, hmm, seems hard, anything in the data-sheet about doing this that you may have missed?
And Admin said "Let there be robots!"
And it was good.

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: sleep mode on arduino
« Reply #2 on: July 16, 2010, 05:25:58 AM »
You can go into sleep mode just through the code itself, no interrupts needed, usually you use the interrupt to wake up from sleep mode.

Here's something to look into:
http://www.arduino.cc/playground/Learning/ArduinoSleepCode

Offline gaurav.pTopic starter

  • Robot Overlord
  • ****
  • Posts: 142
  • Helpful? 0
  • Go robotics
Re: sleep mode on arduino
« Reply #3 on: July 17, 2010, 06:18:33 AM »
thnx it was a vry useful resource
Big Things Come In Small Packages!!!

 

SMF spam blocked by CleanTalk