forked from xfjx/TonUINO
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Tonuino.ino
51 lines (40 loc) · 1.62 KB
/
Tonuino.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "src/tonuino.hpp"
#include "src/settings.hpp"
#include "src/mp3.hpp"
#include "src/buttons.hpp"
#include "src/logger.hpp"
#include "src/constants.hpp"
/*
_____ _____ _____ _____ _____
|_ _|___ ___| | | | | | |
| | | . | | | |- -| | | | | |
|_| |___|_|_|_____|_____|_|___|_____|
TonUINO Version 3.0
created by Thorsten Voß and licensed under GNU/GPL.
refactored by Boerge1
Information and contribution at https://tonuino.de.
*/
void setup() {
Serial.begin(115200); // Es gibt ein paar Debug Ausgaben über die serielle Schnittstelle
// Wert für randomSeed() erzeugen durch das mehrfache Sammeln von rauschenden LSBs eines offenen Analogeingangs
uint32_t ADC_LSB = 0;
uint32_t ADCSeed = 0;
for (uint8_t i = 0; i < 128; i++) {
ADC_LSB = analogRead(openAnalogPin) & 0x1;
ADCSeed ^= ADC_LSB << (i % 32);
}
randomSeed(ADCSeed); // Zufallsgenerator initialisieren
// Dieser Hinweis darf nicht entfernt werden
LOG(init_log, s_debug, F(" _____ _____ _____ _____ _____"));
LOG(init_log, s_debug, F("|_ _|___ ___| | | | | | |"));
LOG(init_log, s_debug, F(" | | | . | | | |- -| | | | | |"));
LOG(init_log, s_debug, F(" |_| |___|_|_|_____|_____|_|___|_____|\n"));
LOG(init_log, s_info , F("TonUINO Version 3.0"));
LOG(init_log, s_info , F("created by Thorsten Voß and licensed under GNU/GPL."));
LOG(init_log, s_info , F("refactored by Boerge1."));
LOG(init_log, s_debug, F("Information and contribution at https://tonuino.de.\n"));
Tonuino::getTonuino().setup();
}
void loop() {
Tonuino::getTonuino().loop();
}