Skip to content

Commit

Permalink
Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed May 11, 2024
1 parent b418639 commit dbb1633
Show file tree
Hide file tree
Showing 33 changed files with 5,832 additions and 28 deletions.
38 changes: 20 additions & 18 deletions activities/20240518_slutpresentation/first/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,29 @@ Tider är bara riklinjer, ofta slutar vi tidigare.

## Presentationsschema

Vem |Ålder |Vad
----------------------|-------------|----------------
Vem |Ålder |Vad
-------------------------------|-------------|----------------
[READY] Angela |9 |Blender: Tropiska frukter
[READY] Dahlia |9 |Blender: Damu
[READY] Emil |9 |Arduino: Mood Cue
[READY] Daniel M |10 |Arduino: Cirkel (Processing + Arduino)
[READY] David H |10 |Blender: Airpods
[READY] Isaac + Felipe + Pablo |11 |Processing: Halcony Infyniti
[READY] Felipe |11 |Processing: Confetti
[READY] Rees |11 |Blender: Smileykub
[READY] Alejandro |12 |Blender: Råttkrokodil
[READY] Daniel H |12 |Blender: The Real Sea

- Föraldrarvårdslag: Alex, David L, Dennis, Giovanni
- På semester: -

Vem |Ålder |Vad
-------------------------------|-------------|----------------
[ABSENT] Christian |? |Anden
[ABSENT] Alfred |? |Arduino: Vårmus
[READY] Daniel M |10 |Arduino: Cirkel (Processing + Arduino)
[]David L |? |Arduino: B125
[! Need code] Emil |9 |Arduino: Mood Cue
[READY] Alejandro |12 |Råttkrokodil
[READY] Angela |9 |Tropiska frukter
[] Daniel H |? |The Real Sea
[READY] David H |10 |Airpods
[ABSENT] Erik |? |Mjolnir
[READY] Dahlia |9 |Blender: Damu
[READY] Isaac + Felipe + Pablo|11 |Processing: Halcony Infyniti
[READY] Felipe |11 |Processing: Confetti
[ABSENT] Teo |? |iPhone 720
[ABSENT]Vide |? |Toy collection
[] Rees |11 |Smileykub
[ABSENT] Christian |? |Anden

- Föraldrarlag: Alex, Dennis, Giovanni
- På semester: -
[ABSENT]Vide |? |Toy collection

## Notes from previous times

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <servo.h>
servo myservo;
int const potpin = AO;
int potval;
int angel;
void setup() {
myServo.attach(9);
Serial.begin(9600);
}
void loop() {
potval = analogRead(potpin);
serial.prin("potval: ");



void loop()
// put your main code here, to run repeatedly:

}
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions activities/20240518_slutpresentation/second/Dependent/Bullet.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class Bullet {
float x, y, xv, yv;
boolean running = false;

Bullet(float x, float y, float d, float v) {
this.x = x;
this.y = y;
this.xv = v * cos(d);
this.yv = v * sin(d);
running = true;
}
Bullet(float x, float y, float d, float v, boolean r) {
this.x = x;
this.y = y;
this.xv = v * cos(d);
this.yv = v * sin(d);
running = r;
}

void display() {
MainGraphic.stroke(#B47600);
MainGraphic.strokeWeight(3);
MainGraphic.line(x - entities.camX, y - entities.camY, x-xv - entities.camX, y-yv - entities.camY);

x += xv;
y += yv;
}
}
35 changes: 35 additions & 0 deletions activities/20240518_slutpresentation/second/Dependent/Button.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@


class Button {
float x, y, w, h;
int state;
String label;

Button(float x, float y, float w, float h, String label) {
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.label = label;
}

boolean isPressed() {
if(mousePressed && mouseButton == LEFT && mouseX > x && mouseY > y && mouseX < x + w && mouseY < y + h) return true;

return false;
}

void display() {
fill(255 - int(mousePressed && mouseButton == LEFT && mouseX > x && mouseY > y && mouseX < x + w && mouseY < y + h) * 100);
stroke(0);
rect(x, y, w, h);
textAlign(LEFT, TOP);
textSize(32);
fill(0);
text(label, x + 1, y + 2);
if(isPressed() && state == 1) state = 2;
if(isPressed() && state == 0) state = 1;
if(state == 3) state = 0;
if(!isPressed() && (state == 1 || state == 2)) state = 3;
}
}
Loading

0 comments on commit dbb1633

Please sign in to comment.