---- ====== WEEK 9 ====== ====== E- TEXTILES & WEARABLES II ====== Charlie´s and mine final project, is to make a portable crib that rocks the baby to sleep. For that rocking system, we need a motor, for me that´s kind of new, so I began trying with the basics so this week´s project serves as a first reach for the final project movement part. This week I decided to experiment with some soft circuits, by generating one of the many parts of my final project. I need to generate movement, so I'll use a DC motor, connected to a LilyPad Arduino. The circuit will be created from conductive threads. Here's the complete BOM: - 2 3.3 volts coin cell batteries - 1 LilyPad Arduino - 1 L298 module for Arduino (H-bridge) - 1 DC motor - 1 soft sensor (it's a variation of the stretch sensor I made during week 5) - 1 5 kOhm resistor - Conductive thread - Some jumpers - Copper coated Vinyl The idea is that the speed of the DC motor will change depending on how much pressure is being applied to the sensor. Here's the code: int in1 = 9; int in2 = 10; int enable = 11; int soft_sensor = A5; int Lectura; void setup() { Serial.begin(9600); pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); pinMode(enable, OUTPUT); pinMode(soft_sensor, INPUT); } void loop() { digitalWrite(in1,HIGH); digitalWrite(in2,LOW); //DC motor is constantly ON); Lectura = analogRead(soft_sensor); //Read soft_sensor Lectura = map(Lectura,0,1023,0,255); //Turn analog readings to PWM analogWrite(enable,Lectura); } I used the conductive thread to generate the ways connecting all the components. In general, I connected my circuits through the top face of the fabric, but when I had to connect two points through a way which would intersect another, I used the bottom face of the fabric. {{ :fabricademy2017:students:alexandra_roldan:9_e_textiles2:28cda529-5d2c-4875-8f99-cd567adbb7e5.jpg?nolink&500x333 |28cda529-5d2c-4875-8f99-cd567adbb7e5.jpg}} {{ :fabricademy2017:students:alexandra_roldan:week9:30069736_1553161331400243_1796886527_o.jpg?nolink&500x667 |30069736_1553161331400243_1796886527_o.jpg}} {{ :fabricademy2017:students:alexandra_roldan:9_e_textiles2:img_0200.jpg?nolink&500x667 |img_0200.jpg}} {{ :fabricademy2017:students:alexandra_roldan:9_e_textiles2:35226992_1621741097875599_7848312130754314240_n.png?nolink&525x493 }} In this link is a [[https://vimeo.com/274737645|video]] of one of the trials ----