For this project I took the CapSense project and combined it to make the muscle wire heat on and off. I used a lemon as a switch and once it hit a threshold the wire would go through the process of heating up and cooling off. In the end it ended up working and making the wire heat up to make the fabric say “hi”.
The one problem I ran into was that the while loop would only run once ans then just stay in there and not come back out. Not entirely sure on how to fix it but the project does work for one go around.
For my project I took the basic code for the program and added an LED to it. The program runs and waits for the total1 to become greater than 2000, once the threshold is met, the LED will light up for one second, then turn off. I tested a lemon, which maxed out at about 2300, and apple (300), and an avocado (1300).
For my analog sensor I decided to do a slider using the conductive yarn and a bolt to act as the slider portion to bright or dim a LED.
So my switch was made through many wires as well as aligater clips. The material I chose to use was lead from a lead pencil since it was easily accessible and i knew it would be conductive. My breadboard had a symetrical layout for organization.
*the LED on the left is off because the yellow wire is unplugged to show which was the switch. Other switch is opposite side turning on right LED.