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: main.cpp
- Revision:
- 0:ce4f87a989a6
diff -r 000000000000 -r ce4f87a989a6 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Feb 09 18:16:28 2016 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+
+SPISlave SPINUCLEO(PA_7,PA_6,PA_5,PA_4);
+DigitalOut myled(LED1);
+int main() {
+ int a=0;
+ myled = 0;
+SPINUCLEO.frequency(21000000);
+SPINUCLEO.reply(0x00);
+
+while (1)
+{
+if (SPINUCLEO.receive())
+{
+a=SPINUCLEO.read();
+SPINUCLEO.reply(a);
+ myled = 1;
+wait(2);
+myled = 0;
+wait(2);
+}
+
+}
+
+}