Skip to content

Commit

Permalink
Lower cpu usage on non-interrupt examples
Browse files Browse the repository at this point in the history
- Add delay to non-interrupt examples to lower CPU usage per #7
  • Loading branch information
TMRh20 committed Dec 24, 2015
1 parent 82b89b3 commit 31f6603
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/RF24GatewayNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ int main(int argc, char** argv) {
network.read(header,&buf,size);
printf("Received Network Message, type: %d id %d from %d\n",header.type,header.id,mesh.getNodeID(header.from_node));
}
delay(2);
}
return 0;
}
1 change: 1 addition & 0 deletions examples/ncurses/RF24Gateway_ncurses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ int main() {


}
delay(2);
}//while 1


Expand Down

0 comments on commit 31f6603

Please # to comment.