Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 13:07]
anamaria.martinlopez
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 14:13]
anamaria.martinlopez
Line 1: Line 1:
 +====== Spring ======
  
 Spring is the season of the year that I like the most, in the future I want to do something related to all the seasons of the year and a makeup on the skin with a touch of light seems good to start with. Spring is the season of the year that I like the most, in the future I want to do something related to all the seasons of the year and a makeup on the skin with a touch of light seems good to start with.
Line 124: Line 124:
 {{youtube>​QxW9m-iwgsg?​medium}} {{youtube>​QxW9m-iwgsg?​medium}}
  
-====== ​Spring ​======+====== ​Change color ======
  
-Spring is the season of the year that I like the most, in the future I want to do something related to all the seasons ​of the year and a makeup on the skin with a touch of light seems good to start with.+\\ 
 +You can change color and brightness neopixeles ​in the programming. The neopixeles are RGB with which you can assign different colors or leave them all one color.\\ 
 +To change ​the brightness you have to change in this part of the code:
  
-{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​flores.jpg?​nolink&​760x570 ​ |flores.jpg}}+{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​jjj.jpg?​nolink&​618x125 ​ |jjj.jpg}}
  
-====== ​  ​======+To change color you have to change this part of the code.
  
-----+In parentheses you have to put the number of led and color, try different tones, I found this page on the internet and tried to change them, it's very fun.
  
-First I start to assemble the circuit and check the programming.+[[http://​ralcolores.mrket.net/​index.php?​index=HEX_DOWN|http://​ralcolores.mrket.net/​index.php?​index=HEX_DOWN]]
  
-This week, we worked with Gemma v2 and 4 neopixel.+{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​colores.jpg?​nolink&​407x277 ​ |colores.jpg}}I remind you that to upload the programming to Gemma you have to press the button on the board, while the red gemma light flashes you have to load the code.\\ 
 +In delay you can change the speed you want between led and led.\\ 
 +Finally you decide when you want to turn them off and how, in my case I have put it like this:
  
-If you have Windows, download these drivers:+{{  ​:fabricademy2017:​students:​anamaria.martinlopez:​week_12:​captura33.jpg?​nolink&​345x318 ​ |captura33.jpg}}
  
-[[https://​github.com/​adafruit/​Adafruit_Windows_Drivers/​releases/​download/​2.0.0.0/​adafruit_drivers_2.0.0.0.exe|https://​github.com/​adafruit/​Adafruit_Windows_Drivers/​releases/​download/​2.0.0.0/​adafruit_drivers_2.0.0.0.exe]]+{{youtube>​vC7GrdxOMDg?​medium}}
  
-Then, open Arduino and configure the board:+====== Colores======
  
-{{  ​:fabricademy2017:​students:​anamaria.martinlopez:​week_12:​captura5.jpg?​nolink&​538x266 ​ |captura5.jpg}}+White244,244,244
  
-Thenselect **USBtinyISP** from the **Tools→Programmer** sub-menu+Pink: 234,137,154
  
-{{  ​:fabricademy2017:​students:​anamaria.martinlopez:​week_12:​captura6.jpg?​nolink&​510x271 ​ |captura6.jpg}}+Green0.250.0
  
-After installing the Arduino IDE with support for Adafruit'​s boards you can load a simple blinking LED example to test uploading to Gemma works as expected. Open the Arduino IDE and replace the sketch code with the following blink code:+Blue034,113,179
  
-====== Blink Gemma: ======+----
  
-1. /*\\ +include <​Adafruit_NeoPixel.h>​
-2. Blink\\ +
-3. Turns on an LED on for one second, then off for one second, repeatedly.\\ +
-4.\\ +
-5. This example code is in the public domain.\\ +
-6.\\ +
-7. To upload to your or Trinket:​\\ +
-8. 1) Select the proper board from the Tools→Board Menu (Arduino Gemma if\\ +
-9. teal, Adafruit Gemma if black)\\ +
-10. 2) Select the uploader from the Tools→Programmer ("​Arduino Gemma" if teal,\\ +
-11. "​USBtinyISP"​ if black Gemma)\\ +
-12. 3) Plug in the Gemma into USB, make sure you see the green LED lit\\ +
-13. 4) For windows, make sure you install the right Gemma drivers\\ +
-14. 5) Press the button on the Gemma/​Trinket - verify you see\\ +
-15. the red LED pulse. This means it is ready to receive data\\ +
-16. 6) Click the upload button above within 10 seconds\\ +
-17. */\\ +
-18.\\ +
-19. int led = 1; // blink '​digital'​ pin 1 - AKA the built in red LED\\ +
-20.\\ +
-21. //the setup routine runs once when you press reset:\\ +
-22. void setup() {\\ +
-23. // initialize the digital pin as an output.\\ +
-24. pinMode(led,​ OUTPUT);​\\ +
-25.\\ +
-26. }\\ +
-27.\\ +
-28. //the loop routine runs over and over again forever:​\\ +
-29. void loop() {\\ +
-30. digitalWrite(led,​ HIGH);\\ +
-31. delay(1000);​\\ +
-32. digitalWrite(led,​ LOW);\\ +
-33. delay(1000);​\\ +
-If the blink works correctly, load the program for our neopixels. +
- +
-====== Code: ====== +
- +
-#include <​Adafruit_NeoPixel.h>​+
  
 \\ \\
Line 198: Line 165:
 //​IMPORTANT:​ Avoid connecting on a live circuit. . .// \\ //​IMPORTANT:​ Avoid connecting on a live circuit. . .// \\
 if you must, connect GND first.\\ if you must, connect GND first.\\
-Adafruit_NeoPixel strip = Adafruit_NeoPixel( NUM_LEDS, PIN) ;\\+Adafruit_NeoPixel strip = Adafruit_NeoPixel( NUM_LEDS, PIN) ; 
 + 
 +\\
 void setup() {\\ void setup() {\\
 strip. begin();\\ strip. begin();\\
-strip. setBrightness(100);​ // 100/255 brightness ( about 40%)\\ +strip. setBrightness(100);​ // 100/255 brightness ( about 40%) //brillo de 0 a 255\\ 
-strip. show(); //​Initialize all pixels to ' off'​\\ +strip. show(); // Initialize all pixels to ' off'​\\ 
-}\\ +} void loop( ) {\\ 
-void loop( ) {\\ +delay (500);\\ 
-forint j=0; j<256; j ++{\\ +strip. setPixelColor(0,244,​244,​244)//primer led\\
-for( int i=0i<​NUM_LEDS;​ i++) {\\ +
-strip. setPixelColor( ​iWheel ;\\ +
-}\\+
 strip.show();​\\ strip.show();​\\
-delay(20);\\ +delay (500);\\ 
-}\\ +strip. setPixelColor(1,​234,​137,​154);​ //segundo led\\ 
-}\\ +strip.show();​\\ 
-//Input a value 0 to 255 to get a color value.// \\ +delay (500);\\ 
-The colours are a transition r - g - b - back to r.\\ +stripsetPixelColor(2,​0,​250,​0); ​//tercer led\\ 
-uint32_t Wheelbyte WheelPos{\\ +strip.show();\\ 
-ifWheelPos < 85{\\ +delay (500);\\ 
-return ​strip. ​Color(WheelPos * 3, 255 - WheelPos * 30);\\ +strip. ​setPixelColor(3,034,113,179); // cuarto led\\ 
-} else if(WheelPos < 170{\\ +strip.show();\\ 
-WheelPos -= 85;\\ +delay (500); strip. ​setPixelColor(3,0,0,0); //primer led\\ 
-return ​strip. ​Color(255 - WheelPos * 3, 0, WheelPos * 3);\\ +strip.show();​\\ 
-} else {\\ +delay (500);\\ 
-WheelPos -= 170;\\ +strip. ​setPixelColor(2,0,0,0); //segundo led\\ 
-return ​strip. ​Color(0, WheelPos * 3255 - WheelPos * 3);\\ +strip.show();​\\ 
-}\\ +delay (500);\\ 
-+stripsetPixelColor(1,0,0,0); //tercer led\\ 
- +strip.show();\\ 
-Then, sew the circuit this way. +delay (500);\\ 
- +stripsetPixelColor(0,0,0,0); // cuarto led\\ 
-====== Circuit: ====== +strip.show();\\ 
- +delay (500);\\ 
-{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​img_1984.jpg?​nolink&​800x600 ​ |img_1984.jpg}} +strip.show(); ​//
- +
-{{youtube>​3_2M5tK2f8M?​medium}} +
- +
-I try to stick it on the skin and start the makeup processmy friend Silvia helps me since I alone have difficulties and I tell her what my idea is. +
- +
-{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​img_2005_2_.jpg?​nolink&​658x598 ​ |img_2005_2_.jpg}} +
- +
-We use latex because the idea is to turn my arm into a branch with flowers and moss and so that it is well attached seems a good option. +
- +
-{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​77.jpg?​nolink&​800x1067 ​ |77.jpg}} +
- +
-{{:​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​5.jpg?​nolink&​600x450|5.jpg}}{{:​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​3.jpg?​nolink&​600x450|3.jpg}} +
- +
-{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​15.jpg?​nolink&​600x450 ​ |15.jpg}} +
- +
-{{youtube>​QxW9m-iwgsg?​medium}} +
- +
-====== Change color ====== +
- +
-\\ +
-You can change color and brightness neopixeles in the programming. The neopixeles are RGB with which you can assign different colors or leave them all one color.\\ +
-To change the brightness you have to change in this part of the code: +
- +
-{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​jjj.jpg?​nolink&​618x125 ​ }} +
- +
-To change color you have to change this part of the code. +
- +
-In parentheses you have to put the number of led and colortry different tonesI found this page on the internet and tried to change themit's very fun. +
- +
-[[http://ralcolores.mrket.net/​index.php?​index=HEX_DOWN|http://​ralcolores.mrket.net/​index.php?​index=HEX_DOWN]] +
- +
-{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​colores.jpg?​nolink&​407x277 ​ }}I remind you that to upload the programming to Gemma you have to press the button on the board, while the red gemma light flashes you have to load the code.\\ +
-In delay you can change the speed you want between led and led.\\ +
-Finally you decide when you want to turn them off and how, in my case I have put it like this: +
- +
-{{  :​fabricademy2017:​students:​anamaria.martinlopez:​week_12:​captura33.jpg?​nolink&​345x318 ​ }} +
-{{youtube>​vC7GrdxOMDg?​medium}}+