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: BufferedSerial SDFileSystem
Diff: funktions.h
- Revision:
- 2:6bb642c850bc
diff -r b08afedb843c -r 6bb642c850bc funktions.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/funktions.h Tue Apr 09 15:01:50 2019 +0000
@@ -0,0 +1,21 @@
+//funktionen
+
+void sendData(string dataForTX)
+{
+ uint8_t n = dataForTX.length();
+ uint8_t cs = 0;
+ char command[3]= {0x02,0x00,n};
+ for (int p=0; p<3; p++) {
+ cs = cs ^ command[p];
+ AMB.printf("%c",command[p]);
+ // pc.printf("%c",command[p]);
+ }
+ for (int p=0; p<n; p++) {
+ cs = cs ^ dataForTX[p];
+ AMB.printf("%c",dataForTX[p]);
+ // pc.printf("%c",dataForTX[p]);
+ }
+ AMB.printf("%c",cs);
+ //pc.printf("%c",cs);
+}
+