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: Afficheur.cpp.orig
- Revision:
- 8:5124be43c963
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Afficheur.cpp.orig Tue Sep 05 10:00:13 2017 +0000
@@ -0,0 +1,46 @@
+
+
+#include "Afficheur.h"
+
+ Afficheur::Afficheur():afficheur(p5,p6,p7),chipSelect(p8)
+ {
+ afficheur.format(8,0);
+ afficheur.frequency(50000);
+ chipSelect = 0;
+ }
+
+ void Afficheur::write(char* characters,int length,int expo )
+ {
+
+Serial pc(USBTX, USBRX);
+ pc.printf("1");
+ static char buf[20];
+ pc.printf("2");
+ resetDisplay();
+ pc.printf("3");
+ afficheur.write(characters,length,buf,20);
+ pc.printf("4");
+ showDot(expo);
+ }
+ void Afficheur::write(char ch)
+ {
+ static char buf[1];
+ afficheur.write(&ch,1,buf,1);
+ }
+ void Afficheur::resetDisplay()
+ {
+ char buf[1];
+ afficheur.write("v",1,buf,1);
+ }
+ void Afficheur::showDot(int expo)
+ {
+ char command[2] = {'w',expo};
+ char buf[2];
+ afficheur.write(command,2,buf, 2);
+ }
+ void Afficheur::hideDot()
+ {
+ char command[2] = {'w',0};
+ char buf[2];
+ afficheur.write(command,2,buf, 2);
+ }
\ No newline at end of file
