Dezibot 4
Loading...
Searching...
No Matches
simpleMorse.ino
Go to the documentation of this file.
1#include "Dezibot.h"
2
3Dezibot dezibot = Dezibot();
4void setup() {
5 // put your setup code here, to run once:
6 dezibot.begin();
7}
8
9void loop() {
10 // put your main code here, to run repeatedly:
11 dezibot.display.print("Starte Nachricht!");
12 delay(2000);
13 dezibot.display.clear();
14
15 // T
16 longSignal(1);
17 pauseLetter();
18 // E
19 shortSignal(1);
20 pauseLetter();
21 // S
22 shortSignal(3);
23 pauseLetter();
24 // T
25 longSignal(1);
26 pauseLetter();
27
28 pauseWord();
29
30 //A
31 shortSignal(1);
32 longSignal(1);
33 pauseLetter();
34 //B
35 longSignal(1);
36 shortSignal(3);
37 pauseLetter();
38 //C
39 longSignal(1);
40 shortSignal(1);
41 longSignal(1);
42 shortSignal(1);
43
44 dezibot.display.print("Ende Nachricht!");
45 delay(2000);
46 dezibot.display.clear();
47}
48
49void shortSignal(int count){
50 for(int i=0; i < count; i++){
51 dezibot.motion.move();
52 delay(1000);
53 dezibot.motion.stop();
54 delay(1000);
55 }
56}
57
58void longSignal(int count){
59 for(int i=0; i < count; i++){
60 dezibot.motion.move();
61 delay(3000);
62 dezibot.motion.stop();
63 delay(1000);
64 }
65}
66
67void pauseLetter(){
68 delay(2000);
69}
70
71void pauseWord(){
72 delay(6000);
73}