Interactive window
From base48
Banik pičo
Designer's page - a few more words about technologies used in the HBO window
Hardware necessary
Item | Qnt. | HBO solution * | our solution | Est. price (czk) | note |
---|---|---|---|---|---|
fans | 8 | [Air King industrial grade fans] | [[ | PC ones]] | ||
range sensors | 8 | [Sharp] | [[ | same]] | ||
control board | 1 | [[ | Arduino Duemilanove]] | [[ | custom ATmega8 brd]] | ||
power switching board | 1 | [| National Control Devices relay board] | [[ | custom MOSFET board]] | ||
snow | [[ | paper]] | [[ | to be discussed]] | |||
walls | [[ | LED projection]] | [[ | none yet]] |
/* based on link
Illustration
int vetrak = 9;
int adc_senzor = 0;
float senzor = 0.0;
int pwm = 0;
int eliminace_okoli = 30; // random sracky se senzoru
float minimal_pwm = 160; // pro kazdy vetrak jiny!
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
adc_senzor = analogRead(A0);
//senzor da max 3.2V, tzn prepocitat na plnej rozsah.
// 5/3.2 = 1.5635
// 3.2V pode datasheetu, coz neni zas tak uplne pravdal. Proto to je jen 1.30
if (adc_senzor*1.30 > 1023) {
senzor = 1023;
Serial.println("preteceni u senzor");
} else {
senzor = adc_senzor*1.30;
}
pwm = senzor/4; // ADC je do 1024, ale PWM jen do 256
if (pwm < eliminace_okoli) {
pwm = 0; // pri takto nizkych hodnotach povazujeme ze pred vylohou nikdo nestoji
}
if (pwm > 254) {
Serial.println("preteceni u pwm"); // kdyby neco, tak nic
}
//analogWrite(9, pwm);
/*
zjsiteni kolik potrebuje vetrak na roztoceni
for (int i=0; i <= 250; i=i+10){
Serial.println(i);
analogWrite(9, i);
delay(1000);
}
*/
// Serial.println(pwm);
//delay(1000);
analogWrite(9, pwm);
}