Answers.Body: <p>Use the <strong>Keep Alive Block</strong> in your program.</p>
  
  <p><a href="https://i.sstatic.net/1OTpM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1OTpM.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>This block will keep the NXT from entering sleep mode. Add this block
    if your program needs to wait for longer than the NXTs set "sleep
    time" (configured using the NXTs on-board menus).</p>
  </blockquote>
  
  <p>The <em>Time until sleep</em> plug will take a value from 0 - 4294967296 (16<sup>8</sup>) milliseconds .</p>
  
  <p>4294967296 milliseconds is just over 49 days which is most likely a lot longer than the battery lifespan and much, much longer then you would/should normally be running it for.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T20:49:58.590Z
Answers.Text: As Ambo100 suggested, use the Keep Alive Block. Keep in mind though, that many batteries don't like getting drained completely. If you're using rechargeable batteries, this might damage them. It's been a while since I used NXT-G code, so I can't remember if there's a block that let's you check the current status of the batteries.
Answers.UserDisplayName: f2k
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T16:27:31.550Z
Answers.LastActivityDate: 2017-08-25T16:27:31.550Z
Answers.UserDisplayName: Ambo100
Body: <p>I want to run an NXT 2 program that will continue until no power is left in batteries. I want it to rotate slowly so that a sculpture can be turned for as long as possible. It seems to go for a few hour then shuts down.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-24T14:46:41.470Z
Comments.Text: If all you're doing is rotating something, could you just do it with a regular power functions motor? It will definitely run until it overheats or drains the batteries.
Comments.UserDisplayName: Mr. Shiny and New 安宇
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-24T21:51:04.237Z
Comments.Text: The NXT has a feature to turn itself of after a period of inactivity. Somewhere in the menus on it you can turn that off. I don't remember where it was, by it wasn't hard to find.
Comments.UserDisplayName: Henrik supports the community
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-26T09:58:20.743Z
Comments.Text: Regarding using regular power functions, they are too fast in my experience. Using gear reduction is possible, but the parts will wear down. Using voltage regulation is imprecise and I think that besides running slower, the motor applies also less torque.
Comments.UserDisplayName: Michael Verschaeve
Tags: <nxt>
Title: Run an NXT 2 program that will continue until no power is left in batteries
UserDisplayName: mathew
ThreadText: # Run an NXT 2 program that will continue until no power is left in batteries
  
  (Asked by: username_0 on 2017-08-24)
  
  I want to run an NXT 2 program that will continue until no power is left in batteries. I want it to rotate slowly so that a sculpture can be turned for as long as possible. It seems to go for a few hour then shuts down.
  
  **Tags:** nxt
  
  > **Comments:**
  > **username_1**: If all you're doing is rotating something, could you just do it with a regular power functions motor? It will definitely run until it overheats or drains the batteries.  
  > **username_2**: The NXT has a feature to turn itself of after a period of inactivity. Somewhere in the menus on it you can turn that off. I don't remember where it was, by it wasn't hard to find.  
  > **username_3**: Regarding using regular power functions, they are too fast in my experience. Using gear reduction is possible, but the parts will wear down. Using voltage regulation is imprecise and I think that besides running slower, the motor applies also less torque.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2017-08-25. Score: 1
  
  Use the **Keep Alive Block** in your program.
  
  [![enter image description here](https://i.sstatic.net/1OTpM.png)](https://i.sstatic.net/1OTpM.png)
  
  > This block will keep the NXT from entering sleep mode. Add this block
  > if your program needs to wait for longer than the NXTs set "sleep
  > time" (configured using the NXTs on-board menus).
  
  The *Time until sleep* plug will take a value from 0 - 4294967296 (168) milliseconds .
  
  4294967296 milliseconds is just over 49 days which is most likely a lot longer than the battery lifespan and much, much longer then you would/should normally be running it for.
  
  > **Comments:**
  > **username_5**: As username_4 suggested, use the Keep Alive Block. Keep in mind though, that many batteries don't like getting drained completely. If you're using rechargeable batteries, this might damage them. It's been a while since I used NXT-G code, so I can't remember if there's a block that let's you check the current status of the batteries.  
  
  ---
  
  