Hey guys,
A friend and I are working on a UAV using Maple Mini and we noticed something strange. It looks like every once in while, micros() takes a very long time to return. For example, if I just run the following code...
------------------------------------------------
unsigned long time = 0;
void setup() {
time = micros();
}
void loop() {
unsigned long curTime = micros();
if (curTime - time > 75000)
SerialUSB.println("1");
time = curTime;
}
------------------------------------------------
...then I see a 1 get printed out about once every 10 or 15 seconds. When this delay happens we've seen the delay be anywhere 75ms and 500ms.
Anyone have any thoughts or ideas of where to look? Has anyone else seen this? We would like to keep using micros() to get better resolution on our calculations than we would achieve using millis().
For reference, here is our system setup:
MapleIDE 0.0.12 (no updates made to libmaple since downloading libmaple)
Mac OS X 10.6.8
Writing code in Xcode, but compiling and loading code with MapleIDE
Does anyone have any guidance (or a pointer to a post) on how to update libmaple when using MapleIDE on Mac OSX? I searched but couldn't find anything.
- Andy