Library of hardware declarations and utility functions for the ELEC350/1 Practicals and Coursework
Dependents: Task618-mbedos-F429ZI Task621-mbedos_FZ429ZI Task622-mbedos-FZ429ZI Task632-mbedos-FZ429 ... more
Revision 3:768d30157488, committed 2017-11-21
- Comitter:
- noutram
- Date:
- Tue Nov 21 13:23:36 2017 +0000
- Parent:
- 2:24eb98cf2376
- Child:
- 4:d884f14069c6
- Commit message:
- Fixed small bug
Changed in this revision
| sample_hardware.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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