Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • academany/fabacademy/2022/labs/barcelona/students/eduard-almasque
1 result
Show changes
Commits on Source (2)
# Preparation Week
# Day 1 - LinkMenu Fabrikas @ VilniusTech
# Day 2 - EMP Recycling Plant
# Day 3 - Project Work
# Day 4 - Finishing Touches
# Day 5 - Awards Ceremony
docs/Makeademy_2023/EN-Funded-by-the-EU-POS.png

66.6 KiB

# Makeademy Disclaimer
This disclaimer must be included verbatim in all publications related to Makeademy 2023
## Legal Disclaimer
[Makeademy 2023](https://makeademy.eu/) is funded by the European Union. Views
and opinions expressed are however those of the author(s) only and do not
necessarily reflect those of the European Union or the European Education
and Culture Executive Agency (EACEA). Neither the European Union nor EACEA can
be held responsible for them.
Makeademy is funded by the ***Erasmus+ Programme*** of European Union.
Project Number: 2021-1-LT01-KA220-HED-000032213
![EN-Funded-by-the-EU-POS.png](EN-Funded-by-the-EU-POS.png)
\ No newline at end of file
#include <AccelStepper.h>;
#define STEPPER_SPEED 150
#define STEPPER_MAX_SPEED 1000
AccelStepper stepper(1, 2, 3); // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5
//(::driver-mode enabled, step, dir)
const int trigPin = 6; // TRIG pin
const int echoPin = 5; // ECHO pin
const int redLed = 13;
const int greenLed = 12;
const int ENABLE_PIN = 8;
const int threshold_distance = 20;
float duration_us, distance_cm;
bool hand_detected = false;
void setup() {
Serial.begin(9600);
enable_io_pins();
enable_stepper_motors();
}
void enable_io_pins() {
pinMode(trigPin, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(redLed, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(ENABLE_PIN, OUTPUT);
}
void enable_stepper_motors() {
stepper.setMaxSpeed(STEPPER_MAX_SPEED);
stepper.setSpeed(STEPPER_SPEED);
digitalWrite(ENABLE_PIN, HIGH); //HIGH = disable
}
int hands_distance() {
if(!hand_detected){
digitalWrite(trigPin, HIGH);
delay(100);
digitalWrite(trigPin, LOW);
}else{
digitalWrite(trigPin, HIGH);
digitalWrite(redLed, HIGH);
delay(100);
digitalWrite(trigPin, LOW);
digitalWrite(redLed, LOW);
}
// measure duration of pulse from ECHO pin
duration_us = pulseIn(echoPin, HIGH);
distance_cm = 0.017 * duration_us;
return distance_cm;
}
void loop(){
int distance_cm = hands_distance();
// print the value to Serial Monitor
Serial.println(distance_cm);
if (distance_cm > 0 && distance_cm < threshold_distance) {
green_led();
dispense_sanitiser();
delay(5000);
red_led();
} else {
red_led();
}
delay(100);
}
void dispense_sanitiser(){
digitalWrite(ENABLE_PIN, LOW); // LOW = enable
int duration = 300;
for (int i = 0; i < duration; i++) {
stepper.runSpeed();
delay(10);
}
digitalWrite(ENABLE_PIN, HIGH); //HIGH = disable
}
void red_led(){
digitalWrite(greenLed, LOW);
digitalWrite(redLed, HIGH);
}
void green_led(){
digitalWrite(redLed, LOW);
digitalWrite(greenLed, HIGH);
}
# Home
This page is a Work in progress...
Please bear with me while I update this from my hotel
docs/fabacademy2022.png

277 KiB

<link href="style.css" rel="stylesheet">
# Home
## 2022 - [FabAcademy](FabAcademy_2022)
🇪🇸 Barcelona
<div class="container">
<div class="row">
<div class="col-sm-3">
<a href="FabAcademy_2022"><img src="fabacademy2022.png"
width="95%" style="border: white 1px solid"/></a>
</div>
<div class="col-sm-6">
<p>Fab Academy is an intensive five-month program that teaches students
to envision, design and prototype projects using digital fabrication tools and
machines. It is a multi-disciplinary and hands-on learning experience that
empowers students to learn-by-doing and inspires them to make stuff locally
to become active participants in sustainable cities and communities.</p>
<p>The <a href="https://fabacademy.org/">Fab Academy</a>
teaches principles and applications of digital
fabrication. It was developed to teach hands-on skills in fab labs, which
began as an outreach project from <a href="https://www.media.mit.
edu/graduate-program/center-for-bits-and-atoms/">MIT's Center for Bits and
Atoms</a>, and has
grown into a global network of more than 500 labs.
Fab Academy instruction is based on MIT’s popular rapid-prototyping course
<a href="https://fab.cba.mit.edu/classes/MAS.863/">How To Make (almost) Anything</a>,
both taught by Prof. <a href="https://en.wikipedia.org/wiki/Neil_Gershenfeld">Neil Gershenfeld</a>.
</p>
</div>
</div>
</div>
## 2023 - [Makeademy 2023 Hackathon](Makeademy_2023)
🇱🇹 Vilnius
<div class="container">
<div class="row">
<div class="col-sm-3">
<a href="Makeademy_2023"><img src="makeademy.png"
width="95%" style="border: white 1px solid"/></a>
</div>
<div class="col-sm-6">
<p>The MAKEADEMY project wants to innovate existing engineering
study courses by developing a flexible, modular learning program centered on
the Conceive, Design, Implement, Operate approach.</p>
<p>MAKEADEMY programme provides students with the skills to address
current and future professional and global challenges.</p>
<p><a href="https://makeademy.eu/">Makeademy 2023</a> is funded by
the European Union.</p>
<p>Project Number: 2021-1-LT01-KA220-HED-000032213</p>
</div>
</div>
</div>
\ No newline at end of file
docs/makeademy.png

68.3 KiB

# Replace the text below to customize your site
site_name: "Fab Academy 2022 - Edu Almasqué"
site_name: "Edu Almasqué"
site_description: "Fab Academy documentation site for Edu Almasqué"
site_author: "Edu Almasqué"
copyright: "Copyright 2022 Edu Almasqué - Creative Commons Attribution Non Commercial"
copyright: "Copyright 2022-2023 Edu Almasqué - Creative Commons Attribution Non
Commercial"
repo_url: https://gitlab.fabcloud.org/academany/fabacademy/2022/labs/barcelona/students/eduard-almasque
site_url: https://fabacademy.org/2022/labs/barcelona/students/eduard-almasque/
......