![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Temperatur und Luffeuchtigkeit ueber I^2 einlesen und an der serielen Schnittstelle ausgeben
Diff: main.cpp
- Revision:
- 0:fd27a92aaa8c
- Child:
- 1:700f6e782bf9
diff -r 000000000000 -r fd27a92aaa8c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 21 11:34:46 2019 +0000 @@ -0,0 +1,41 @@ +#include "mbed.h" + + + + // D20,D19,D18,D17,... +BusOut lb(D2,D3,D6,D9,D11,D12,A6,D13); + + + +DigitalIn T1(A2), T2(A1); + + +void OneRunLightStep2(); + + +int main() + +{ int x; + x=T1.read; + while(1) + { + if (x=0) + + OneRunLightStep2(); + + + + } + +} + + +void OneRunLightStep2() +{ + if(lb==0) + lb=1; + else + lb=lb<<1; // Finster + wait_ms(500); +} +