Skip to content

Commit

Permalink
fail on power supply bad
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Mar 1, 2023
1 parent 9d9c309 commit c6093a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ports/mimxrt10xx/apps/factory_test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ void loop(void) {
Serial_printf("5V out = %d\n\r", (int)five_mV);
if (abs(five_mV - 5000) > 500) {
Serial_printf("5V power supply reading wrong?");
return;
}
// Test 5V
int nine_mV = (float)analogRead(AD0) * 11.0 * 3.3 * 1000 / 4095.0;
Serial_printf("9V out = %d\n\r", (int)nine_mV);
if (abs(nine_mV - 9000) > 1000) {
Serial_printf("9V power supply reading wrong?");
return;
}
Serial_printf("*** TEST OK! ***\n\r");
}
Expand Down

0 comments on commit c6093a5

Please sign in to comment.