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:ea2f8a21085d
diff -r 000000000000 -r ea2f8a21085d main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Dec 04 20:05:25 2022 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+DigitalOut C[] = {(COL1), (COL2),(COL3)};
+DigitalOut R[] = {(ROW1), (ROW2),(ROW3)};
+
+int main() {
+ int col = 0;
+ int row = 0;
+
+ while(1) {
+ col = rand() % 2;
+ row = rand() % 2;
+ C[col] - 0;
+ R[row] = 1;
+ wait(0.9);
+ R[row] = 0;
+ C[col] = 1;
+ }
+}
\ No newline at end of file