Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: sample_hardware.cpp
- Revision:
- 3:768d30157488
- Parent:
- 2:24eb98cf2376
- Child:
- 4:d884f14069c6
--- a/sample_hardware.cpp Tue Nov 21 11:36:19 2017 +0000
+++ b/sample_hardware.cpp Tue Nov 21 13:23:36 2017 +0000
@@ -17,11 +17,12 @@
//Serial pc(USBTX, USBRX);
AnalogIn adcIn(PA_0);
+
//POWER ON SELF TEST
void post()
{
//POWER ON TEST (POT)
- puts("TASK 616 - ALL LEDs should be blinking");
+ puts("ALL LEDs should be blinking");
for (unsigned int n=0; n<10; n++) {
redLED = 1;
yellowLED = 1;
@@ -31,5 +32,11 @@
yellowLED = 0;
greenLED = 0;
wait(0.05);
- }
+ }
+
+ //Output the switch states (hold them down to test)
+ printf("SW1: %d\tSW2: %d\n\r", SW1.read(), SW2.read());
+
+ //Output the ADC
+ printf("ADC: %f\n\r", adcIn.read());
}
\ No newline at end of file