Body: <p>I am using Bricx Command Center to write some NXC code for a side project. I am working with the MindSqualls C# Library in Unity and am trying to figure out some ways to use the NXT robots in an event-driven situation.</p>
  
  <p>Since lots of things change on the fly with event-driven programming I need to be able to run different NXC programs multiple times, and very quickly.</p>
  
  <p>I have a collection of basically three line programs that I need to run about 12 times a second or so.</p>
  
  <p>The problem is, the NXT brick cannot run them fast enough, the NXT brick UI that goes from the file selected to "Done" is seemingly taking up a half of a second per run. Because of this I can only run the program about twice a second.</p>
  
  <p>I was wondering if anyone knew how to disable the UI so it doesn't waste any time or even bypass the Brick firmware all together so I could just interface with the hardware directly, or maybe even rewrite some of the Brick's firmware to make it faster. </p>
  
  <p>Any help is appreciated,
  Thanks</p>
  
  <p>Brick Firmware Info:
  FW:    1.28
  AVR:   1.01
  BC4:   1.01
  Build: 1902091856</p>
  
  <p>MindSqualls v2.2.0</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-29T00:35:15.607Z
Comments.Text: Why do you have to have 3 separate programs? Can't you just put all of the code into one NXC program and use messages to trigger the 3 different branches as needed?
Comments.UserDisplayName: David Lechner
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-01T13:09:43.770Z
Comments.Text: Personally I'd ditch the brick.
Comments.UserDisplayName: Dave Newton
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-02T14:15:04.437Z
Comments.Text: I'm not quite sure that the UI is what is slowing the brick down, it sounds like your program is *very* resource intensive.  If you are looking to stay with the platform, you may wish to consider the [BrickPI](http://www.dexterindustries.com/brickpi/) which is a little pricy (but hey, you have an NXT), and uses a [Raspberry Pi](https://www.raspberrypi.org) to control the motors and sensors, which may give you the processing boost.
Comments.UserDisplayName: Gliderman
Tags: <nxt><programming><nxc>
Title: NXT (NXC) Programs are too slow
UserDisplayName: Twon Johnson
ThreadText: # NXT (NXC) Programs are too slow
  
  (Asked by: username_0 on 2016-02-28)
  
  I am using Bricx Command Center to write some NXC code for a side project. I am working with the MindSqualls C# Library in Unity and am trying to figure out some ways to use the NXT robots in an event-driven situation.
  
  Since lots of things change on the fly with event-driven programming I need to be able to run different NXC programs multiple times, and very quickly.
  
  I have a collection of basically three line programs that I need to run about 12 times a second or so.
  
  The problem is, the NXT brick cannot run them fast enough, the NXT brick UI that goes from the file selected to "Done" is seemingly taking up a half of a second per run. Because of this I can only run the program about twice a second.
  
  I was wondering if anyone knew how to disable the UI so it doesn't waste any time or even bypass the Brick firmware all together so I could just interface with the hardware directly, or maybe even rewrite some of the Brick's firmware to make it faster.
  
  Any help is appreciated,
  Thanks
  
  Brick Firmware Info:
  FW: 1.28
  AVR: 1.01
  BC4: 1.01
  Build: 1902091856
  
  MindSqualls v2.2.0
  
  **Tags:** nxt, programming, nxc
  > **Comments:**
  > **username_1**: Why do you have to have 3 separate programs? Can't you just put all of the code into one NXC program and use messages to trigger the 3 different branches as needed?  
  > **username_2**: Personally I'd ditch the brick.  
  > **username_3**: I'm not quite sure that the UI is what is slowing the brick down, it sounds like your program is *very* resource intensive.  If you are looking to stay with the platform, you may wish to consider the [BrickPI](http://www.dexterindustries.com/brickpi/) which is a little pricy (but hey, you have an NXT), and uses a [Raspberry Pi](https://www.raspberrypi.org) to control the motors and sensors, which may give you the processing boost.  
  
  ---
  
  ## 0 answers
  
  