The example sketch checks the return value of the nau.begin() call. If it returns false, the example sketch prints the helpful "Failed to find NAU7802" message to Serial. Previously it then proceeded with the program execution (including inappropriately printing "Found NAU7802"). The rest of the program can not work correctly if the initialization failed. It might even crash some boards, causing the useful "Failed to find NAU7802" message to not be seen by the user. The more user friendly behavior implemented here is for the example sketch to go into a perpetual loop if the initialization failed. |
||
|---|---|---|
| .. | ||
| nau7802_test.ino | ||