Skip to content

Commit dbb1633

Browse files
Progress
1 parent b418639 commit dbb1633

33 files changed

+5832
-28
lines changed

activities/20240518_slutpresentation/first/README.md

+20-18
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,29 @@ Tider är bara riklinjer, ofta slutar vi tidigare.
1919

2020
## Presentationsschema
2121

22-
Vem |Ålder |Vad
23-
----------------------|-------------|----------------
22+
Vem |Ålder |Vad
23+
-------------------------------|-------------|----------------
24+
[READY] Angela |9 |Blender: Tropiska frukter
25+
[READY] Dahlia |9 |Blender: Damu
26+
[READY] Emil |9 |Arduino: Mood Cue
27+
[READY] Daniel M |10 |Arduino: Cirkel (Processing + Arduino)
28+
[READY] David H |10 |Blender: Airpods
29+
[READY] Isaac + Felipe + Pablo |11 |Processing: Halcony Infyniti
30+
[READY] Felipe |11 |Processing: Confetti
31+
[READY] Rees |11 |Blender: Smileykub
32+
[READY] Alejandro |12 |Blender: Råttkrokodil
33+
[READY] Daniel H |12 |Blender: The Real Sea
34+
35+
- Föraldrarvårdslag: Alex, David L, Dennis, Giovanni
36+
- På semester: -
37+
38+
Vem |Ålder |Vad
39+
-------------------------------|-------------|----------------
40+
[ABSENT] Christian |? |Anden
2441
[ABSENT] Alfred |? |Arduino: Vårmus
25-
[READY] Daniel M |10 |Arduino: Cirkel (Processing + Arduino)
26-
[]David L |? |Arduino: B125
27-
[! Need code] Emil |9 |Arduino: Mood Cue
28-
[READY] Alejandro |12 |Råttkrokodil
29-
[READY] Angela |9 |Tropiska frukter
30-
[] Daniel H |? |The Real Sea
31-
[READY] David H |10 |Airpods
3242
[ABSENT] Erik |? |Mjolnir
33-
[READY] Dahlia |9 |Blender: Damu
34-
[READY] Isaac + Felipe + Pablo|11 |Processing: Halcony Infyniti
35-
[READY] Felipe |11 |Processing: Confetti
3643
[ABSENT] Teo |? |iPhone 720
37-
[ABSENT]Vide |? |Toy collection
38-
[] Rees |11 |Smileykub
39-
[ABSENT] Christian |? |Anden
40-
41-
- Föraldrarlag: Alex, Dennis, Giovanni
42-
- På semester: -
44+
[ABSENT]Vide |? |Toy collection
4345

4446
## Notes from previous times
4547

Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <servo.h>
2+
servo myservo;
3+
int const potpin = AO;
4+
int potval;
5+
int angel;
6+
void setup() {
7+
myServo.attach(9);
8+
Serial.begin(9600);
9+
}
10+
void loop() {
11+
potval = analogRead(potpin);
12+
serial.prin("potval: ");
13+
14+
15+
16+
void loop()
17+
// put your main code here, to run repeatedly:
18+
19+
}
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
class Bullet {
2+
float x, y, xv, yv;
3+
boolean running = false;
4+
5+
Bullet(float x, float y, float d, float v) {
6+
this.x = x;
7+
this.y = y;
8+
this.xv = v * cos(d);
9+
this.yv = v * sin(d);
10+
running = true;
11+
}
12+
Bullet(float x, float y, float d, float v, boolean r) {
13+
this.x = x;
14+
this.y = y;
15+
this.xv = v * cos(d);
16+
this.yv = v * sin(d);
17+
running = r;
18+
}
19+
20+
void display() {
21+
MainGraphic.stroke(#B47600);
22+
MainGraphic.strokeWeight(3);
23+
MainGraphic.line(x - entities.camX, y - entities.camY, x-xv - entities.camX, y-yv - entities.camY);
24+
25+
x += xv;
26+
y += yv;
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
3+
class Button {
4+
float x, y, w, h;
5+
int state;
6+
String label;
7+
8+
Button(float x, float y, float w, float h, String label) {
9+
this.x = x;
10+
this.y = y;
11+
this.w = w;
12+
this.h = h;
13+
this.label = label;
14+
}
15+
16+
boolean isPressed() {
17+
if(mousePressed && mouseButton == LEFT && mouseX > x && mouseY > y && mouseX < x + w && mouseY < y + h) return true;
18+
19+
return false;
20+
}
21+
22+
void display() {
23+
fill(255 - int(mousePressed && mouseButton == LEFT && mouseX > x && mouseY > y && mouseX < x + w && mouseY < y + h) * 100);
24+
stroke(0);
25+
rect(x, y, w, h);
26+
textAlign(LEFT, TOP);
27+
textSize(32);
28+
fill(0);
29+
text(label, x + 1, y + 2);
30+
if(isPressed() && state == 1) state = 2;
31+
if(isPressed() && state == 0) state = 1;
32+
if(state == 3) state = 0;
33+
if(!isPressed() && (state == 1 || state == 2)) state = 3;
34+
}
35+
}

0 commit comments

Comments
 (0)