Tipkalo pali LED-icu koja ispisuje S.O.S. u Morse-ovom codu
Dependents: MorseCODE-MarkoJuric
Diff: MorseWrite.h
- Revision:
- 0:40962a766bc2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MorseWrite.h Fri May 07 11:49:46 2021 +0000 @@ -0,0 +1,20 @@ +#ifndef MBED_MORSEWRITE_H +#define MBED_MORSEWRITE_H + +#include "mbed.h" + +class MorseWrite { +public: + MorseWrite(PinName pin); + void write(int message, short n); + +private: + DigitalOut _pin; + const short dotDuration = 1; + const short dashDuration = 3; + const short newLetterDuration = 3; + const short spaceDuration = 7; + const float duration = 0.3; +}; + +#endif \ No newline at end of file