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:d308aef39cfa
- Child:
- 1:14c0250ab954
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jan 16 21:10:27 2012 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+SPI spi(p11, p12, p13);
+DigitalOut latchpin(p10);
+
+void latch() {
+ latchpin = 1;
+ latchpin = 1;
+ latchpin = 1;
+ latchpin = 1;
+ latchpin = 1;
+ latchpin = 1;
+ latchpin = 0;
+}
+
+int main() {
+ spi.format(12, 0);
+ spi.frequency(16 * 1000 * 1000);
+
+ latchpin = 0;
+ while (1) {
+ for (int i = 0; i < 100; i++) {
+ spi.write(0);
+ }
+ latch();
+ }
+}
\ No newline at end of file