Both sides previous revision Previous revision Next revision | Previous revision | ||
fabricademy2017:classes:wearables1 [2017/10/27 11:02] staff |
fabricademy2017:classes:wearables1 [2017/10/27 19:04] staff |
||
---|---|---|---|
Line 133: | Line 133: | ||
//MAKE SOUND:\\ | //MAKE SOUND:\\ | ||
if(sensorValue < 900){ noiseFrequency = map(sensorValue, 0, 1023, 100, 10000); noise (speakerPin, noiseFrequency); } //FADE LED: ledBrightness = map(sensorValue, 0, 1023, 0, 255); analogWrite(ledPin, ledBrightness); } // MAKE SOUND ON THE ATTINY WITHOUT THE SOUND LIBRARY: void noise (unsigned char noisePin, int frequencyInHertz) { long delayAmount = (long)(1000000 / frequencyInHertz); digitalWrite(noisePin, HIGH); delayMicroseconds(delayAmount); digitalWrite(noisePin, LOW); delayMicroseconds(delayAmount); } —- // | if(sensorValue < 900){ noiseFrequency = map(sensorValue, 0, 1023, 100, 10000); noise (speakerPin, noiseFrequency); } //FADE LED: ledBrightness = map(sensorValue, 0, 1023, 0, 255); analogWrite(ledPin, ledBrightness); } // MAKE SOUND ON THE ATTINY WITHOUT THE SOUND LIBRARY: void noise (unsigned char noisePin, int frequencyInHertz) { long delayAmount = (long)(1000000 / frequencyInHertz); digitalWrite(noisePin, HIGH); delayMicroseconds(delayAmount); digitalWrite(noisePin, LOW); delayMicroseconds(delayAmount); } —- // | ||
+ | |||
+ | {{:fabricademy2017:classes:37642075700_1659bc4772_o.jpg?nolink&1484x900}} | ||
//[[https://github.com/plusea/CODE/blob/master/WORKSHOP CODE/Fabricademy/ATtiny-code-example/ATtiny-code-example.ino|Arduino source code//]]// | //[[https://github.com/plusea/CODE/blob/master/WORKSHOP CODE/Fabricademy/ATtiny-code-example/ATtiny-code-example.ino|Arduino source code//]]// | ||
Line 139: | Line 141: | ||
[[http://www.kobakant.at/DIY/?p=3996|DIY Attiny Programming Shield tutorial]] | [[http://www.kobakant.at/DIY/?p=3996|DIY Attiny Programming Shield tutorial]] | ||
+ | |||
+ | [[http://www.kobakant.at/DIY/?p=4008|Attiny soft sensor and coil speaker]] | ||
+ | |||
+ | You also do the tutorial of Liza Stark with the Attiny embroidery [[https://docs.google.com/presentation/d/1k_HYp0BhfDrRzLhMN1LGxlXilQ5xBrHL25VfTiE1wRg/edit?usp=sharing|here ]] | ||
**//===== MATERIALS AND TOOLS ===== // ** | **//===== MATERIALS AND TOOLS ===== // ** |