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.
Dependencies: mbed MODSERIAL FATFileSystem
Revision 104:426224a55f5f, committed 2019-09-13
- Comitter:
- joel_ssc
- Date:
- Fri Sep 13 19:15:40 2019 +0000
- Parent:
- 103:45b554df05bd
- Commit message:
- slight change includes reset_PI
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 13 17:01:18 2019 +0000
+++ b/main.cpp Fri Sep 13 19:15:40 2019 +0000
@@ -1,5 +1,7 @@
#include "mbed.h"
#include "StaticDefs.hpp"
+//Raspberry Pi reset pin set high at beginning of code
+DigitalOut reset_pin(p11,1);
////////////////////////////////////////////////////////////////// NEW TICKER
Ticker systemTicker;
@@ -125,7 +127,12 @@
}
}
}
-
+void reset_Pi(){
+ reset_pin = 0;
+ wait_ms(20);
+ reset_pin = 1;
+ xbee().printf("\n\rWaking up Raspberry PI\n\r");
+}
void setup() {
// xbee().baud(115200); // comment out so default is 9600 for USB communications
xbee().printf("\n\n\r 2019-13-09 FSG PCB XBee\n\n\r");
@@ -562,5 +569,8 @@
mbedLogger().appendDiagFile(buf,0);
led1()=0; led2()=0; led3()= 0 ;led4()=0;
configFileIO().save_FinalTime(); // saves last time before closing shop
+
+ reset_Pi();
+
exit(0);
} // end main()
\ No newline at end of file