aboutsummaryrefslogtreecommitdiff
path: root/sem4/embedded/emb_m4
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-06-07 23:40:14 +0200
committerJulian T <julian@jtle.dk>2020-06-07 23:40:14 +0200
commit6075c41624efa8260344dfd4b0c7fa563f4cfe5e (patch)
tree0ee0942543935c70ddd108f71562612cdd72daee /sem4/embedded/emb_m4
parent6cb9bec1e0241fe64afdad9a520f026a9c25ea91 (diff)
Added solutions for many of the first exercises
Diffstat (limited to 'sem4/embedded/emb_m4')
-rw-r--r--sem4/embedded/emb_m4/emb_m4.ino7
1 files changed, 4 insertions, 3 deletions
diff --git a/sem4/embedded/emb_m4/emb_m4.ino b/sem4/embedded/emb_m4/emb_m4.ino
index 179f2b6..7e5ff48 100644
--- a/sem4/embedded/emb_m4/emb_m4.ino
+++ b/sem4/embedded/emb_m4/emb_m4.ino
@@ -7,8 +7,9 @@ char stk2[STACK];
struct k_t *tsk1, *tsk2;
void f1() {
- for(;;) {
- Serial.println("Haha");
+ for(int i = 0;;i++) {
+ Serial.println(i);
+ k_sleep(400);
}
}
void f2() {
@@ -16,7 +17,7 @@ void f2() {
for(;;) {
digitalWrite(13, state);
state = !state;
- k_sleep(1000);
+ k_sleep(100);
}
}