SlideShare a Scribd company logo
A Sample E-Textiles Project
LED
LED
(parallel)
RGB
LED
Battery
Vibration
Motor
Metallic
Patch
Sensor
LilyPad Arduino
Components of the Codeable Circuit
• This circuit is codeable, which means that you can control whether or not
these components are activated or not, using inputs and outputs.
• Outputs – the LEDs, the RGB light, the buzzer.
– You can make these different components (called ‘actuators’) turn on
and off and different rates, patterns, etc.
– *Note – To make these controllable/codeable (not always on), at least
one side (usually the + end) needs to be attached to a numbered or A-
pin; the other end can be attached to + or – pin
• Inputs – metallic patches
– You can take a reading of electrical current or conductivity (generally).
If you touch both then you ‘close the circuit’
– *Note - these need to be attached to A-pins (and the – pin) for taking
readings.
E-Textiles
Circuitry Rules
_
+
Rules for Connecting Components
This LED is always on because it’s connected to the + and – pin.
_
+
Rules for Connecting Components
This LED can be programmed/controlled
because you can code pin 5 (polarity).
_
+
Rules for Connecting Components
This LED can be programmed/controlled
because you code pin A5 (polarity).
You can also connect the LED to any other
numbered or lettered pin if you want to control it
(though note that only numbered pins can execute
‘analogWrite’ for behaviors such as fade).
Rules for Connecting Components
This is also possible. Both pin 5
AND pin 6 would need to be
programmed.
_
+
_
+
Rules for Connecting Components
A Parallel Circuit – both LEDs function in the same way
(by coding pin 5).
_
+
_
+
Rules for Connecting Components
Also a Parallel Circuit – both LEDs function in the
same way *by programming pin 5)
_
+
_
+
Rules for Connecting Components
Not a parallel circuit. These LEDs
function separately (coding pin 5 or
pin 6) even though they have a
shared ground (-).
_
+
Rules for Connecting Components
In order to attach the metallic patches, you need to connect one patch to the –
pin and the other patch to one of the A-pins. You can tell the A-pin to take a
‘reading’ of electrical current (generally).
Basically, when you touch both of these, you ‘close the circuit’ (because your
body is conductive and can carry current) and then the A-pin can be told to read
this, and do something as a result.
Rules for Connecting Components
The patch connected to the – pin
can also be attached to other
components to act as a ground.
The patches and LEDs act in the
same way.
_
+
Programming E-Textiles
This is a basic blink program
int bird = 5;
void setup() {
pinMode(bird, OUTPUT);
}
void loop() {
digitalWrite(bird, HIGH);
delay(1000);
digitalWrite(bird, LOW);
delay(1000);
}
This section is for naming variables.
Here, we are calling pin 5 “bird” so
we don’t always have to write 5 in
the below section. Or if we can
quickly change the pin # (if you
resew it) without having to change
each place below.
This is a basic blink program
int bird = 5;
void setup() {
pinMode(bird, OUTPUT);
}
void loop() {
digitalWrite(bird, HIGH);
delay(1000);
digitalWrite(bird, LOW);
delay(1000);
}
This is the setup section, where you
write up the conditions that we
want to exist throughout the
program, even when it’s going
through different behaviors. Here,
we setup the pin named bird to be
an output for electricity (an
actuator).
This is a basic blink program
int bird = 5;
void setup() {
pinMode(bird, OUTPUT);
}
void loop() {
digitalWrite(bird, HIGH);
delay(1000);
digitalWrite(bird, LOW);
delay(1000);
}
This is the loop section, or the
‘action’ of the program. Basically,
what this code says is:
Turn on pin 5 (voltage high)
Wait 1000 milliseconds
Turn off pin 5 (voltage low)
Wait 1000 milliseconds
This is a basic blink program
int bird = 5;
void setup() {
pinMode(bird, OUTPUT);
}
void loop() {
digitalWrite(bird, HIGH);
delay(1000);
digitalWrite(bird, LOW);
delay(1000);
}
Basic human sensor program
int sensorValue; //a placeholder for the function below
int MetalPatch = A3; //if your metallic patch is attached to pin A5 and the
other one is attached to the - pin
void setup() {
Serial.begin(9600); //gets touch sensor ready to read value - analog
digitalWrite(MetalPatch, HIGH); //start circuit for human sensing circuit
pinMode(MetalPatch, INPUT); //sets A3 as an input of electricity, for reading
}
void loop() {
sensorValue = analogRead(MetalPatch); //read values from light sensor
Serial.println(sensorValue); //show values in serial monitor window
delay(300); //delay time determines how often the Lilypad will read the
sensor
} Everything to the right of // is a comment and doesn’t get compiled as part of the
code. The way this code works is that you need to upload it to your board, then
press the magnifying glass icon in the upper right corner of your Arduino window.
This will open the serial monitor window, which will show you readings based on the
electrical flow
Basic conditional program w/ human sensor
int sensorValue;
int MetalPatch = A3;
Int bird = 5;
void setup() {
Serial.begin(9600);
digitalWrite(MetalPatch, HIGH);
pinMode(MetalPatch, INPUT);
pinMode(bird, OUTPUT);
}
void loop() {
sensorValue = analogRead(MetalPatch);
Serial.println(sensorValue);
delay(300);
if (sensorValue>1000) {
digitalWrite(bird, LOW); }
else {
digitalWrite(bird, HIGH); }
}
This program includes a conditional statement, which
is indicated by the if/then statement in the loop.
Basically it’s saying that: if the sensor has a reading
over 1000 (usually indicating an open circuit, no one is
touching) then turn the LED bird off, otherwise (when
someone is touching) turn the LED bird on.
You can create more complex conditionals by adding
more conditions like ranges (see below for example)
if (sensorValue>300) {
digitalWrite(led1, HIGH);
digitalWrite(led2, LOW);
}
else if (sensorValue<=299 && sensorValue>10) {
digitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
}
Else {
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
}
More resources
• Explore the Examples section of Arduino
(under File > Examples)
• Look at Sew Electric.org
• Look around Instructables
E-Textiles
Sewing Rules
Tips for E-Textiles Sewing
• Stitch components onto fabric three times for the
best conductivity.
• Remember that this thread is metallic and can
easily cause short circuits if they touch (due to
frayed thread, messy knots, etc.) To help secure
these, you can use regular masking tape or felt
for insulation, or clear nail polish.
• Remember to keep your – and + lines separate
(otherwise, you’ll cause a short circuit)
• Look online or to your friends or classmates for
basic hand sewing techniques (threading needle,
tying knots, basic running stitch)
https://www.youtube.com/watch?v=u8_jsUgsWyo&t=159s
https://www.youtube.com/watch?v=G6QHeNoqe9U&t=121s
https://forum.arduino.cc/index.php?board=13.0
http://www.geekmomprojects.com/led-matrix-shirt/#
https://www.sparkfun.com/tutorials/312
https://learn.sparkfun.com/tutorials/light-up-plush
https://learn.sparkfun.com/tutorials/tags/lilypad?page=all
https://learn.sparkfun.com/tutorials/marquee-party-bag
https://learn.sparkfun.com/tutorials/light-up-pennant-with-e-textiles

More Related Content

Similar to E textiles tutorial

Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
Vishnu
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
Ravikumar Tiwari
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
Tony Olsson.
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
Tony Olsson.
 
Programming with arduino
Programming with arduinoProgramming with arduino
Programming with arduino
Makers of India
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
Jayanthi Kannan MK
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5
Syed Mustafa
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
ssusere5db05
 
Arduino course
Arduino courseArduino course
Arduino course
Ahmed Shelbaya
 
Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote control
VilayatAli5
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
Jeni Shah
 
IoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorsIoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensors
saritasapkal
 
Electronz_Chapter_2.pptx
Electronz_Chapter_2.pptxElectronz_Chapter_2.pptx
Electronz_Chapter_2.pptx
Mokete5
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
sdcharle
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
mkarlin14
 
Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
SanthanaMari11
 
Basic arduino sketch example
Basic arduino sketch exampleBasic arduino sketch example
Basic arduino sketch example
mraziff2009
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for Beginners
Sarwan Singh
 

Similar to E textiles tutorial (20)

Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
 
Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 
publish manual
publish manualpublish manual
publish manual
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Programming with arduino
Programming with arduinoProgramming with arduino
Programming with arduino
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
Arduino course
Arduino courseArduino course
Arduino course
 
Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote control
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
 
IoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorsIoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensors
 
Electronz_Chapter_2.pptx
Electronz_Chapter_2.pptxElectronz_Chapter_2.pptx
Electronz_Chapter_2.pptx
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
 
Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
 
Basic arduino sketch example
Basic arduino sketch exampleBasic arduino sketch example
Basic arduino sketch example
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for Beginners
 

More from University of Washington

Johnny final pitch
Johnny final pitch Johnny final pitch
Johnny final pitch
University of Washington
 
Kids vr johnny
Kids vr johnnyKids vr johnny
VR Research
VR ResearchVR Research
AR Educational Game Design
AR Educational Game DesignAR Educational Game Design
AR Educational Game Design
University of Washington
 
Blended Learning
Blended LearningBlended Learning
Blended Learning
University of Washington
 
What is your dream
What is your dream What is your dream
What is your dream
University of Washington
 
Kind TV
Kind TVKind TV
VR education
VR education VR education
Finding the orange guy
Finding the orange guyFinding the orange guy
Finding the orange guy
University of Washington
 

More from University of Washington (9)

Johnny final pitch
Johnny final pitch Johnny final pitch
Johnny final pitch
 
Kids vr johnny
Kids vr johnnyKids vr johnny
Kids vr johnny
 
VR Research
VR ResearchVR Research
VR Research
 
AR Educational Game Design
AR Educational Game DesignAR Educational Game Design
AR Educational Game Design
 
Blended Learning
Blended LearningBlended Learning
Blended Learning
 
What is your dream
What is your dream What is your dream
What is your dream
 
Kind TV
Kind TVKind TV
Kind TV
 
VR education
VR education VR education
VR education
 
Finding the orange guy
Finding the orange guyFinding the orange guy
Finding the orange guy
 

Recently uploaded

PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
PoojaSaini954651
 
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptxUNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
GOWSIKRAJA PALANISAMY
 
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
kecekev
 
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
fabianavillanib
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Mansi Shah
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
pmgdscunsri
 
Can AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI preludeCan AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI prelude
Alan Dix
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
jyz59f4j
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
asuzyq
 
Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
ameli25062005
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
boryssutkowski
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
7sd8fier
 
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
Febless Hernane
 
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
gpffo76j
 
Design-Thinking-eBook for Public Service Delivery
Design-Thinking-eBook for Public Service DeliveryDesign-Thinking-eBook for Public Service Delivery
Design-Thinking-eBook for Public Service Delivery
farhanaslam79
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
n0tivyq
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
ameli25062005
 

Recently uploaded (20)

PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
 
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptxUNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
 
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
 
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
 
Can AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI preludeCan AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI prelude
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
 
Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
 
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
 
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
 
Design-Thinking-eBook for Public Service Delivery
Design-Thinking-eBook for Public Service DeliveryDesign-Thinking-eBook for Public Service Delivery
Design-Thinking-eBook for Public Service Delivery
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
 

E textiles tutorial

  • 3. Components of the Codeable Circuit • This circuit is codeable, which means that you can control whether or not these components are activated or not, using inputs and outputs. • Outputs – the LEDs, the RGB light, the buzzer. – You can make these different components (called ‘actuators’) turn on and off and different rates, patterns, etc. – *Note – To make these controllable/codeable (not always on), at least one side (usually the + end) needs to be attached to a numbered or A- pin; the other end can be attached to + or – pin • Inputs – metallic patches – You can take a reading of electrical current or conductivity (generally). If you touch both then you ‘close the circuit’ – *Note - these need to be attached to A-pins (and the – pin) for taking readings.
  • 5. _ + Rules for Connecting Components This LED is always on because it’s connected to the + and – pin.
  • 6. _ + Rules for Connecting Components This LED can be programmed/controlled because you can code pin 5 (polarity).
  • 7. _ + Rules for Connecting Components This LED can be programmed/controlled because you code pin A5 (polarity). You can also connect the LED to any other numbered or lettered pin if you want to control it (though note that only numbered pins can execute ‘analogWrite’ for behaviors such as fade).
  • 8. Rules for Connecting Components This is also possible. Both pin 5 AND pin 6 would need to be programmed. _ +
  • 9. _ + Rules for Connecting Components A Parallel Circuit – both LEDs function in the same way (by coding pin 5). _ +
  • 10. _ + Rules for Connecting Components Also a Parallel Circuit – both LEDs function in the same way *by programming pin 5) _ +
  • 11. _ + Rules for Connecting Components Not a parallel circuit. These LEDs function separately (coding pin 5 or pin 6) even though they have a shared ground (-). _ +
  • 12. Rules for Connecting Components In order to attach the metallic patches, you need to connect one patch to the – pin and the other patch to one of the A-pins. You can tell the A-pin to take a ‘reading’ of electrical current (generally). Basically, when you touch both of these, you ‘close the circuit’ (because your body is conductive and can carry current) and then the A-pin can be told to read this, and do something as a result.
  • 13. Rules for Connecting Components The patch connected to the – pin can also be attached to other components to act as a ground. The patches and LEDs act in the same way. _ +
  • 15. This is a basic blink program int bird = 5; void setup() { pinMode(bird, OUTPUT); } void loop() { digitalWrite(bird, HIGH); delay(1000); digitalWrite(bird, LOW); delay(1000); } This section is for naming variables. Here, we are calling pin 5 “bird” so we don’t always have to write 5 in the below section. Or if we can quickly change the pin # (if you resew it) without having to change each place below.
  • 16. This is a basic blink program int bird = 5; void setup() { pinMode(bird, OUTPUT); } void loop() { digitalWrite(bird, HIGH); delay(1000); digitalWrite(bird, LOW); delay(1000); } This is the setup section, where you write up the conditions that we want to exist throughout the program, even when it’s going through different behaviors. Here, we setup the pin named bird to be an output for electricity (an actuator).
  • 17. This is a basic blink program int bird = 5; void setup() { pinMode(bird, OUTPUT); } void loop() { digitalWrite(bird, HIGH); delay(1000); digitalWrite(bird, LOW); delay(1000); } This is the loop section, or the ‘action’ of the program. Basically, what this code says is: Turn on pin 5 (voltage high) Wait 1000 milliseconds Turn off pin 5 (voltage low) Wait 1000 milliseconds
  • 18. This is a basic blink program int bird = 5; void setup() { pinMode(bird, OUTPUT); } void loop() { digitalWrite(bird, HIGH); delay(1000); digitalWrite(bird, LOW); delay(1000); }
  • 19. Basic human sensor program int sensorValue; //a placeholder for the function below int MetalPatch = A3; //if your metallic patch is attached to pin A5 and the other one is attached to the - pin void setup() { Serial.begin(9600); //gets touch sensor ready to read value - analog digitalWrite(MetalPatch, HIGH); //start circuit for human sensing circuit pinMode(MetalPatch, INPUT); //sets A3 as an input of electricity, for reading } void loop() { sensorValue = analogRead(MetalPatch); //read values from light sensor Serial.println(sensorValue); //show values in serial monitor window delay(300); //delay time determines how often the Lilypad will read the sensor } Everything to the right of // is a comment and doesn’t get compiled as part of the code. The way this code works is that you need to upload it to your board, then press the magnifying glass icon in the upper right corner of your Arduino window. This will open the serial monitor window, which will show you readings based on the electrical flow
  • 20. Basic conditional program w/ human sensor int sensorValue; int MetalPatch = A3; Int bird = 5; void setup() { Serial.begin(9600); digitalWrite(MetalPatch, HIGH); pinMode(MetalPatch, INPUT); pinMode(bird, OUTPUT); } void loop() { sensorValue = analogRead(MetalPatch); Serial.println(sensorValue); delay(300); if (sensorValue>1000) { digitalWrite(bird, LOW); } else { digitalWrite(bird, HIGH); } } This program includes a conditional statement, which is indicated by the if/then statement in the loop. Basically it’s saying that: if the sensor has a reading over 1000 (usually indicating an open circuit, no one is touching) then turn the LED bird off, otherwise (when someone is touching) turn the LED bird on. You can create more complex conditionals by adding more conditions like ranges (see below for example) if (sensorValue>300) { digitalWrite(led1, HIGH); digitalWrite(led2, LOW); } else if (sensorValue<=299 && sensorValue>10) { digitalWrite(led1, LOW); digitalWrite(led2, HIGH); } Else { digitalWrite(led1, LOW); digitalWrite(led2, LOW); }
  • 21. More resources • Explore the Examples section of Arduino (under File > Examples) • Look at Sew Electric.org • Look around Instructables
  • 23. Tips for E-Textiles Sewing • Stitch components onto fabric three times for the best conductivity. • Remember that this thread is metallic and can easily cause short circuits if they touch (due to frayed thread, messy knots, etc.) To help secure these, you can use regular masking tape or felt for insulation, or clear nail polish. • Remember to keep your – and + lines separate (otherwise, you’ll cause a short circuit) • Look online or to your friends or classmates for basic hand sewing techniques (threading needle, tying knots, basic running stitch)
  • 24.