Skip to content

Commit 57abee8

Browse files
committed
Adapt Introduction example to avr8js template
1 parent 6b62fc4 commit 57abee8

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

00_Einfuehrung.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ narrator: Deutsch Female
99
import: https://raw.githubusercontent.com/liascript-templates/plantUML/master/README.md
1010
https://raw.githubusercontent.com/LiaTemplates/NetSwarm-Simulator/master/README.md
1111
https://raw.githubusercontent.com/liaTemplates/DigiSim/master/README.md
12+
https://github.com/LiaTemplates/AVR8js/main/README.md#10
1213
1314
-->
1415

@@ -24,26 +25,36 @@ Die interaktive Form ist unter diesem [Link](https://liascript.github.io/course/
2425

2526
---------------------------------------------------------------------
2627

27-
```c HelloWorld.c
28+
<div>
29+
<span id="simulation-time"></span>
30+
</div>
31+
```cpp avrlibc.cpp
32+
// preprocessor definition
33+
#define F_CPU 16000000UL
2834
#define ANSWER_TO_LIFE 42
2935

30-
void setup() {
36+
#include <avr/io.h>
37+
#include <util/delay.h>
38+
39+
int main (void) {
3140
Serial.begin(9600);
32-
Serial.println("Herzlich willkommen");
3341

3442
volatile byte a;
3543

3644
asm ("ldi %0, %1\n\t"
3745
: "=r" (a)
3846
: "M" (ANSWER_TO_LIFE));
3947

40-
Serial.print("Antwort auf alle Fragen ist:");
48+
Serial.print("Antwort auf die Frage, warum ich an dieser Vorlesung teilnehme: ");
4149
Serial.println(a);
42-
}
4350

44-
void loop() {
51+
while(1) {
52+
_delay_ms(1000);
53+
}
54+
return 0;
4555
}
4656
```
57+
@AVR8js.sketch
4758
4859
4960
## Zielstellung

0 commit comments

Comments
 (0)