LED.h & Umwandeln.h

Dependencies:   m3pi_ng mbed

Committer:
spolak
Date:
Wed Jan 11 09:43:00 2017 +0000
Revision:
0:d453d7554981
Klassen zum Blinken und Umwandeln vom Text

Who changed what in which revision?

UserRevisionLine numberNew contents of line
spolak 0:d453d7554981 1 #include "mbed.h"
spolak 0:d453d7554981 2 #include "m3pi_ng.h"
spolak 0:d453d7554981 3 //#include "Umwandeln.h"
spolak 0:d453d7554981 4 #include "LED.h"
spolak 0:d453d7554981 5 m3pi pi;
spolak 0:d453d7554981 6
spolak 0:d453d7554981 7
spolak 0:d453d7554981 8 int main()
spolak 0:d453d7554981 9 {
spolak 0:d453d7554981 10 //umwandeln A;
spolak 0:d453d7554981 11 LED B;
spolak 0:d453d7554981 12 pi.sensor_auto_calibrate();
spolak 0:d453d7554981 13 int sensors[5]={};
spolak 0:d453d7554981 14 while (1){
spolak 0:d453d7554981 15 pi.calibrated_sensor(sensors);
spolak 0:d453d7554981 16 if ((sensors[0]>400) && (sensors[4]>400))
spolak 0:d453d7554981 17 B.Blau_Blinken(2,0.2);
spolak 0:d453d7554981 18 }
spolak 0:d453d7554981 19 }
spolak 0:d453d7554981 20 //0=weiß 1000=schwarz
spolak 0:d453d7554981 21 /*
spolak 0:d453d7554981 22 int main()
spolak 0:d453d7554981 23 {
spolak 0:d453d7554981 24
spolak 0:d453d7554981 25 umwandeln A;
spolak 0:d453d7554981 26 pi.sensor_auto_calibrate();
spolak 0:d453d7554981 27 int sensors[5]={};
spolak 0:d453d7554981 28
spolak 0:d453d7554981 29
spolak 0:d453d7554981 30 while (1)
spolak 0:d453d7554981 31 {
spolak 0:d453d7554981 32 pi.calibrated_sensor(sensors);
spolak 0:d453d7554981 33 pi.printf(A.int_umwandeln(sensors[0]));
spolak 0:d453d7554981 34 wait(0.1);
spolak 0:d453d7554981 35 pi.cls();
spolak 0:d453d7554981 36 }
spolak 0:d453d7554981 37
spolak 0:d453d7554981 38 }
spolak 0:d453d7554981 39 */