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: maint.cpp
- Revision:
- 1:ad54e8b7ac20
- Child:
- 2:3576839565ae
- Child:
- 3:56cd9dff3b5f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/maint.cpp Mon Sep 04 20:00:30 2017 +0000
@@ -0,0 +1,45 @@
+#include "mbed.h"
+
+
+class Afficheur
+{
+ Afficheur()
+ {
+ afficheur.format(8,0);
+ afficheur.frequency(50000);
+ p8 = 1;
+ }
+
+ void write(char characters[4], bool dot )
+ {
+
+ char rx;
+
+ pin =0;
+ afficheur.write
+ afficheur.write(characters,4,rx,4);
+ pin =1;
+
+ }
+
+ static SPI afficheur(p5,p6,p7);
+ static DigitalOut chipSelect(p8);
+}
+
+DigitalOut pin(p8);
+
+Serial pc(USBTX, USBRX); // tx, rx
+
+int main() {
+
+ while(1)
+ {
+ char rx[50];
+ if(pc.readable()) {
+ pin = 0;
+ afficheur.write("1234",4,rx,50);
+ pin = 1;
+ wait(1);
+ }
+ }
+}
