Some children do not want to sleep alone in their room, much less with the light off because they are still afraid of the dark. Given this, the idea of my project arises: an image projector lamp for children, the same one that will be activated by sound (specifically by applause) an easy and fun way of operating for a child.
That was my first idea, some things changed as I carried out the project: structure for the lamp, way of activating the light, among others.
Once the lamp is energized, every time the sound sensor detects a signal (at the suggestion of my girl every time you blow on the sensor) it will activate the light change and the way in which this light is emitted; In addition, the images and decorations that are placed on the lamp can be interchanged.
"Lamp to treat nyctophobia in children" is the name of my project. The purpose of this lamp is to help children who are afraid of the dark and find it difficult to sleep at night, providing them not only with light so that they are not completely in the dark, but also with images that make them feel safe and happy.
My daughter also went through the same thing and sometimes she doesn't want to sleep alone because she is afraid of the dark; that is why the idea of this project was born. To achieve the purpose of making her feel safe and happy, the images that would be shown should be related to her environment, what she likes and her family.
Here is a list of projects based on lamps made in Fab Academy:
For the body of the lamp (box for the lamp):
For lithophane and ornament (Image for free use):
For acrylic image:
For the electronic part:
Others:
Made during the week of input devices.
Made during the Wildcard Week.
I worked in INKSCAPE to get the outline of the photo I chose, there is no way for the program to generate the outline of the image by itself, you have to do the outline "manually".
I chose this little prince ornament (free to use), because it represents the first book my daughter read.
Para mi proyecto planeo usar la siguiente licencia: Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
This license allows others to redistribute, remix, adapt, and develop the material in any medium or format, but only for non-commercial purposes, and as long as attribution is granted to the creator. If people remix, adapt, or build upon the material, you must distribute their contributions under the same license as the original.
By clicking on this link, through a simple questionnaire, it tells you which license best suits your project.
/Olenka Od ar - Fab Academy 2023
//FAB-XIAO "Final Project"
//ARDUINO IDE
#include
int sensor = D2;
int val_sensor=0;
int conta=0;
int pulso_sal=0;
int Power = 11;
int PIN = D3;
#define NUMPIXELS 18
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(9600);
pinMode(sensor, INPUT);
pinMode(PIN, OUTPUT);
pixels.begin();
pinMode(Power,OUTPUT);
digitalWrite(Power, HIGH);}
void loop() {
while(true){
if(conta==0){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 0, 0));
pixels.setPixelColor(18, pixels.Color(0, 0, 0));
pixels.setPixelColor(17, pixels.Color(0, 0, 0));
pixels.setPixelColor(16, pixels.Color(0, 0, 0));
pixels.setPixelColor(15, pixels.Color(0, 0, 0));
pixels.setPixelColor(14, pixels.Color(0, 0, 0));
pixels.setPixelColor(13, pixels.Color(0, 0, 0));
pixels.setPixelColor(12, pixels.Color(0, 0, 0));
delay(100);}
if(conta==1){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(255, 255, 255));
pixels.setPixelColor(18, pixels.Color(255, 255, 255));
pixels.setPixelColor(17, pixels.Color(255, 255, 255));
pixels.setPixelColor(16, pixels.Color(255, 255, 255));
pixels.setPixelColor(15, pixels.Color(255, 255, 255));
pixels.setPixelColor(14, pixels.Color(255, 255, 255));
pixels.setPixelColor(13, pixels.Color(255, 255, 255));
pixels.setPixelColor(12, pixels.Color(255, 255, 255));
delay(100);}
if(conta==2){//azul
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(15, 25, 205));
pixels.setPixelColor(18, pixels.Color(15, 25, 205));
pixels.setPixelColor(17, pixels.Color(15, 25, 205));
pixels.setPixelColor(16, pixels.Color(15, 25, 205));
pixels.setPixelColor(15, pixels.Color(15, 25, 205));
pixels.setPixelColor(14, pixels.Color(15, 25, 205));
pixels.setPixelColor(13, pixels.Color(15, 25, 205));
pixels.setPixelColor(12, pixels.Color(15, 25, 205));
delay(200);}
if(conta==2){//azul
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(15, 25, 205));
pixels.setPixelColor(18, pixels.Color(15, 25, 205));
pixels.setPixelColor(17, pixels.Color(15, 25, 205));
pixels.setPixelColor(16, pixels.Color(15, 25, 205));
pixels.setPixelColor(15, pixels.Color(15, 25, 205));
pixels.setPixelColor(14, pixels.Color(15, 25, 205));
pixels.setPixelColor(13, pixels.Color(15, 25, 205));
pixels.setPixelColor(12, pixels.Color(15, 25, 205));
delay(200);}
if(conta==2){//azul
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(15, 25, 205));
pixels.setPixelColor(18, pixels.Color(15, 25, 205));
pixels.setPixelColor(17, pixels.Color(15, 25, 205));
pixels.setPixelColor(16, pixels.Color(15, 25, 205));
pixels.setPixelColor(15, pixels.Color(15, 25, 205));
pixels.setPixelColor(14, pixels.Color(15, 25, 205));
pixels.setPixelColor(13, pixels.Color(15, 25, 205));
pixels.setPixelColor(12, pixels.Color(15, 25, 205));
delay(200);}
if(conta==2){//azul
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(15, 25, 205));
pixels.setPixelColor(18, pixels.Color(15, 25, 205));
pixels.setPixelColor(17, pixels.Color(15, 25, 205));
pixels.setPixelColor(16, pixels.Color(15, 25, 205));
pixels.setPixelColor(15, pixels.Color(15, 25, 205));
pixels.setPixelColor(14, pixels.Color(15, 25, 205));
pixels.setPixelColor(13, pixels.Color(15, 25, 205));
pixels.setPixelColor(12, pixels.Color(15, 25, 205));
delay(200);}
if(conta==2){//rojo
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(255, 0, 0));
pixels.setPixelColor(18, pixels.Color(255, 0, 0));
pixels.setPixelColor(17, pixels.Color(255, 0, 0));
pixels.setPixelColor(16, pixels.Color(255, 0, 0));
pixels.setPixelColor(15, pixels.Color(255, 0, 0));
pixels.setPixelColor(14, pixels.Color(255, 0, 0));
pixels.setPixelColor(13, pixels.Color(255, 0, 0));
pixels.setPixelColor(12, pixels.Color(255, 0, 0));
delay(200);}
if(conta==2){//rojo
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(255, 0, 0));
pixels.setPixelColor(18, pixels.Color(255, 0, 0));
pixels.setPixelColor(17, pixels.Color(255, 0, 0));
pixels.setPixelColor(16, pixels.Color(255, 0, 0));
pixels.setPixelColor(15, pixels.Color(255, 0, 0));
pixels.setPixelColor(14, pixels.Color(255, 0, 0));
pixels.setPixelColor(13, pixels.Color(255, 0, 0));
pixels.setPixelColor(12, pixels.Color(255, 0, 0));
delay(200);}
if(conta==2){//rojo
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(255, 0, 0));
pixels.setPixelColor(18, pixels.Color(255, 0, 0));
pixels.setPixelColor(17, pixels.Color(255, 0, 0));
pixels.setPixelColor(16, pixels.Color(255, 0, 0));
pixels.setPixelColor(15, pixels.Color(255, 0, 0));
pixels.setPixelColor(14, pixels.Color(255, 0, 0));
pixels.setPixelColor(13, pixels.Color(255, 0, 0));
pixels.setPixelColor(12, pixels.Color(255, 0, 0));
delay(200);}
if(conta==2){//rojo
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(255, 0, 0));
pixels.setPixelColor(18, pixels.Color(255, 0, 0));
pixels.setPixelColor(17, pixels.Color(255, 0, 0));
pixels.setPixelColor(16, pixels.Color(255, 0, 0));
pixels.setPixelColor(15, pixels.Color(255, 0, 0));
pixels.setPixelColor(14, pixels.Color(255, 0, 0));
pixels.setPixelColor(13, pixels.Color(255, 0, 0));
pixels.setPixelColor(12, pixels.Color(255, 0, 0));
delay(200);}
if(conta==2){//fucsia
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(64, 0, 128));
pixels.setPixelColor(18, pixels.Color(64, 0, 128));
pixels.setPixelColor(17, pixels.Color(64, 0, 128));
pixels.setPixelColor(16, pixels.Color(64, 0, 128));
pixels.setPixelColor(15, pixels.Color(64, 0, 128));
pixels.setPixelColor(14, pixels.Color(64, 0, 128));
pixels.setPixelColor(13, pixels.Color(64, 0, 128));
pixels.setPixelColor(12, pixels.Color(64, 0, 128));
delay(200); }
if(conta==2){//fucsia
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(64, 0, 128));
pixels.setPixelColor(18, pixels.Color(64, 0, 128));
pixels.setPixelColor(17, pixels.Color(64, 0, 128));
pixels.setPixelColor(16, pixels.Color(64, 0, 128));
pixels.setPixelColor(15, pixels.Color(64, 0, 128));
pixels.setPixelColor(14, pixels.Color(64, 0, 128));
pixels.setPixelColor(13, pixels.Color(64, 0, 128));
pixels.setPixelColor(12, pixels.Color(64, 0, 128));
delay(200); }
if(conta==2){//fucsia
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(64, 0, 128));
pixels.setPixelColor(18, pixels.Color(64, 0, 128));
pixels.setPixelColor(17, pixels.Color(64, 0, 128));
pixels.setPixelColor(16, pixels.Color(64, 0, 128));
pixels.setPixelColor(15, pixels.Color(64, 0, 128));
pixels.setPixelColor(14, pixels.Color(64, 0, 128));
pixels.setPixelColor(13, pixels.Color(64, 0, 128));
pixels.setPixelColor(12, pixels.Color(64, 0, 128));
delay(200); }
if(conta==2){//fucsia
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(64, 0, 128));
pixels.setPixelColor(18, pixels.Color(64, 0, 128));
pixels.setPixelColor(17, pixels.Color(64, 0, 128));
pixels.setPixelColor(16, pixels.Color(64, 0, 128));
pixels.setPixelColor(15, pixels.Color(64, 0, 128));
pixels.setPixelColor(14, pixels.Color(64, 0, 128));
pixels.setPixelColor(13, pixels.Color(64, 0, 128));
pixels.setPixelColor(12, pixels.Color(64, 0, 128));
delay(200); }
if(conta==2){//verde
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 255, 0));
pixels.setPixelColor(18, pixels.Color(0, 255, 0));
pixels.setPixelColor(17, pixels.Color(0, 255, 0));
pixels.setPixelColor(16, pixels.Color(0, 255, 0));
pixels.setPixelColor(15, pixels.Color(0, 255, 0));
pixels.setPixelColor(14, pixels.Color(0, 255, 0));
pixels.setPixelColor(13, pixels.Color(0, 255, 0));
pixels.setPixelColor(12, pixels.Color(0, 255, 0));
delay(200);}
if(conta==2){//verde
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 255, 0));
pixels.setPixelColor(18, pixels.Color(0, 255, 0));
pixels.setPixelColor(17, pixels.Color(0, 255, 0));
pixels.setPixelColor(16, pixels.Color(0, 255, 0));
pixels.setPixelColor(15, pixels.Color(0, 255, 0));
pixels.setPixelColor(14, pixels.Color(0, 255, 0));
pixels.setPixelColor(13, pixels.Color(0, 255, 0));
pixels.setPixelColor(12, pixels.Color(0, 255, 0));
delay(200);}
if(conta==2){//verde
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 255, 0));
pixels.setPixelColor(18, pixels.Color(0, 255, 0));
pixels.setPixelColor(17, pixels.Color(0, 255, 0));
pixels.setPixelColor(16, pixels.Color(0, 255, 0));
pixels.setPixelColor(15, pixels.Color(0, 255, 0));
pixels.setPixelColor(14, pixels.Color(0, 255, 0));
pixels.setPixelColor(13, pixels.Color(0, 255, 0));
pixels.setPixelColor(12, pixels.Color(0, 255, 0));
delay(200);}
if(conta==2){//verde
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 255, 0));
pixels.setPixelColor(18, pixels.Color(0, 255, 0));
pixels.setPixelColor(17, pixels.Color(0, 255, 0));
pixels.setPixelColor(16, pixels.Color(0, 255, 0));
pixels.setPixelColor(15, pixels.Color(0, 255, 0));
pixels.setPixelColor(14, pixels.Color(0, 255, 0));
pixels.setPixelColor(13, pixels.Color(0, 255, 0));
pixels.setPixelColor(12, pixels.Color(0, 255, 0));
delay(200);}
if(conta==2){//turquesa
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 162, 232));
pixels.setPixelColor(18, pixels.Color(0, 162, 232));
pixels.setPixelColor(17, pixels.Color(0, 162, 232));
pixels.setPixelColor(16, pixels.Color(0, 162, 232));
pixels.setPixelColor(15, pixels.Color(0, 162, 232));
pixels.setPixelColor(14, pixels.Color(0, 162, 232));
pixels.setPixelColor(13, pixels.Color(0, 162, 232));
pixels.setPixelColor(12, pixels.Color(0, 162, 232));
delay(200); }
if(conta==2){//turquesa
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 162, 232));
pixels.setPixelColor(18, pixels.Color(0, 162, 232));
pixels.setPixelColor(17, pixels.Color(0, 162, 232));
pixels.setPixelColor(16, pixels.Color(0, 162, 232));
pixels.setPixelColor(15, pixels.Color(0, 162, 232));
pixels.setPixelColor(14, pixels.Color(0, 162, 232));
pixels.setPixelColor(13, pixels.Color(0, 162, 232));
pixels.setPixelColor(12, pixels.Color(0, 162, 232));
delay(200); }
if(conta==2){//turquesa
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 162, 232));
pixels.setPixelColor(18, pixels.Color(0, 162, 232));
pixels.setPixelColor(17, pixels.Color(0, 162, 232));
pixels.setPixelColor(16, pixels.Color(0, 162, 232));
pixels.setPixelColor(15, pixels.Color(0, 162, 232));
pixels.setPixelColor(14, pixels.Color(0, 162, 232));
pixels.setPixelColor(13, pixels.Color(0, 162, 232));
pixels.setPixelColor(12, pixels.Color(0, 162, 232));
delay(200); }
if(conta==2){//turquesa
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 162, 232));
pixels.setPixelColor(18, pixels.Color(0, 162, 232));
pixels.setPixelColor(17, pixels.Color(0, 162, 232));
pixels.setPixelColor(16, pixels.Color(0, 162, 232));
pixels.setPixelColor(15, pixels.Color(0, 162, 232));
pixels.setPixelColor(14, pixels.Color(0, 162, 232));
pixels.setPixelColor(13, pixels.Color(0, 162, 232));
pixels.setPixelColor(12, pixels.Color(0, 162, 232));
delay(200); }
if(conta==3){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(255, 0, 128));
pixels.setPixelColor(18, pixels.Color(255, 0, 128));
pixels.setPixelColor(17, pixels.Color(255, 0, 128));
pixels.setPixelColor(16, pixels.Color(255, 0, 128));
pixels.setPixelColor(15, pixels.Color(255, 0, 128));
pixels.setPixelColor(14, pixels.Color(255, 0, 128));
pixels.setPixelColor(13, pixels.Color(255, 0, 128));
pixels.setPixelColor(12, pixels.Color(255, 0, 128));
delay(100);}
if(conta==4){//naranja oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(149, 60, 0));
pixels.setPixelColor(18, pixels.Color(149, 60, 0));
pixels.setPixelColor(17, pixels.Color(149, 60, 0));
pixels.setPixelColor(16, pixels.Color(149, 60, 0));
pixels.setPixelColor(15, pixels.Color(149, 60, 0));
pixels.setPixelColor(14, pixels.Color(149, 60, 0));
pixels.setPixelColor(13, pixels.Color(149, 60, 0));
pixels.setPixelColor(12, pixels.Color(149, 60, 0));
delay(200); }
if(conta==4){//naranja oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(149, 60, 0));
pixels.setPixelColor(18, pixels.Color(149, 60, 0));
pixels.setPixelColor(17, pixels.Color(149, 60, 0));
pixels.setPixelColor(16, pixels.Color(149, 60, 0));
pixels.setPixelColor(15, pixels.Color(149, 60, 0));
pixels.setPixelColor(14, pixels.Color(149, 60, 0));
pixels.setPixelColor(13, pixels.Color(149, 60, 0));
pixels.setPixelColor(12, pixels.Color(149, 60, 0));
delay(200); }
if(conta==4){//naranja oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(149, 60, 0));
pixels.setPixelColor(18, pixels.Color(149, 60, 0));
pixels.setPixelColor(17, pixels.Color(149, 60, 0));
pixels.setPixelColor(16, pixels.Color(149, 60, 0));
pixels.setPixelColor(15, pixels.Color(149, 60, 0));
pixels.setPixelColor(14, pixels.Color(149, 60, 0));
pixels.setPixelColor(13, pixels.Color(149, 60, 0));
pixels.setPixelColor(12, pixels.Color(149, 60, 0));
delay(200); }
if(conta==4){//naranja oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(149, 60, 0));
pixels.setPixelColor(18, pixels.Color(149, 60, 0));
pixels.setPixelColor(17, pixels.Color(149, 60, 0));
pixels.setPixelColor(16, pixels.Color(149, 60, 0));
pixels.setPixelColor(15, pixels.Color(149, 60, 0));
pixels.setPixelColor(14, pixels.Color(149, 60, 0));
pixels.setPixelColor(13, pixels.Color(149, 60, 0));
pixels.setPixelColor(12, pixels.Color(149, 60, 0));
delay(200); }
if(conta==4){//naranja oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(149, 60, 0));
pixels.setPixelColor(18, pixels.Color(149, 60, 0));
pixels.setPixelColor(17, pixels.Color(149, 60, 0));
pixels.setPixelColor(16, pixels.Color(149, 60, 0));
pixels.setPixelColor(15, pixels.Color(149, 60, 0));
pixels.setPixelColor(14, pixels.Color(149, 60, 0));
pixels.setPixelColor(13, pixels.Color(149, 60, 0));
pixels.setPixelColor(12, pixels.Color(149, 60, 0));
delay(200); }
if(conta==4){//naranja muy oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(74, 30, 0));
pixels.setPixelColor(18, pixels.Color(74, 30, 0));
pixels.setPixelColor(17, pixels.Color(74, 30, 0));
pixels.setPixelColor(16, pixels.Color(74, 30, 0));
pixels.setPixelColor(15, pixels.Color(74, 30, 0));
pixels.setPixelColor(14, pixels.Color(74, 30, 0));
pixels.setPixelColor(13, pixels.Color(74, 30, 0));
pixels.setPixelColor(12, pixels.Color(74, 30, 0));
delay(200); }
if(conta==4){//naranja muy oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(74, 30, 0));
pixels.setPixelColor(18, pixels.Color(74, 30, 0));
pixels.setPixelColor(17, pixels.Color(74, 30, 0));
pixels.setPixelColor(16, pixels.Color(74, 30, 0));
pixels.setPixelColor(15, pixels.Color(74, 30, 0));
pixels.setPixelColor(14, pixels.Color(74, 30, 0));
pixels.setPixelColor(13, pixels.Color(74, 30, 0));
pixels.setPixelColor(12, pixels.Color(74, 30, 0));
delay(200); }
if(conta==4){//naranja muy oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(74, 30, 0));
pixels.setPixelColor(18, pixels.Color(74, 30, 0));
pixels.setPixelColor(17, pixels.Color(74, 30, 0));
pixels.setPixelColor(16, pixels.Color(74, 30, 0));
pixels.setPixelColor(15, pixels.Color(74, 30, 0));
pixels.setPixelColor(14, pixels.Color(74, 30, 0));
pixels.setPixelColor(13, pixels.Color(74, 30, 0));
pixels.setPixelColor(12, pixels.Color(74, 30, 0));
delay(200); }
if(conta==4){//naranja muy oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(74, 30, 0));
pixels.setPixelColor(18, pixels.Color(74, 30, 0));
pixels.setPixelColor(17, pixels.Color(74, 30, 0));
pixels.setPixelColor(16, pixels.Color(74, 30, 0));
pixels.setPixelColor(15, pixels.Color(74, 30, 0));
pixels.setPixelColor(14, pixels.Color(74, 30, 0));
pixels.setPixelColor(13, pixels.Color(74, 30, 0));
pixels.setPixelColor(12, pixels.Color(74, 30, 0));
delay(200); }
if(conta==4){//naranja muy oscuro
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(74, 30, 0));
pixels.setPixelColor(18, pixels.Color(74, 30, 0));
pixels.setPixelColor(17, pixels.Color(74, 30, 0));
pixels.setPixelColor(16, pixels.Color(74, 30, 0));
pixels.setPixelColor(15, pixels.Color(74, 30, 0));
pixels.setPixelColor(14, pixels.Color(74, 30, 0));
pixels.setPixelColor(13, pixels.Color(74, 30, 0));
pixels.setPixelColor(12, pixels.Color(74, 30, 0));
delay(200); }
if(conta==4){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 0, 0));
pixels.setPixelColor(18, pixels.Color(0, 0, 0));
pixels.setPixelColor(17, pixels.Color(0, 0, 0));
pixels.setPixelColor(16, pixels.Color(0, 0, 0));
pixels.setPixelColor(15, pixels.Color(0, 0, 0));
pixels.setPixelColor(14, pixels.Color(0, 0, 0));
pixels.setPixelColor(13, pixels.Color(0, 0, 0));
pixels.setPixelColor(12, pixels.Color(0, 0, 0));
delay(100);}
if(conta==4){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 0, 0));
pixels.setPixelColor(18, pixels.Color(0, 0, 0));
pixels.setPixelColor(17, pixels.Color(0, 0, 0));
pixels.setPixelColor(16, pixels.Color(0, 0, 0));
pixels.setPixelColor(15, pixels.Color(0, 0, 0));
pixels.setPixelColor(14, pixels.Color(0, 0, 0));
pixels.setPixelColor(13, pixels.Color(0, 0, 0));
pixels.setPixelColor(12, pixels.Color(0, 0, 0));
delay(100);}
if(conta==4){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 0, 0));
pixels.setPixelColor(18, pixels.Color(0, 0, 0));
pixels.setPixelColor(17, pixels.Color(0, 0, 0));
pixels.setPixelColor(16, pixels.Color(0, 0, 0));
pixels.setPixelColor(15, pixels.Color(0, 0, 0));
pixels.setPixelColor(14, pixels.Color(0, 0, 0));
pixels.setPixelColor(13, pixels.Color(0, 0, 0));
pixels.setPixelColor(12, pixels.Color(0, 0, 0));
delay(100);}
if(conta==4){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 0, 0));
pixels.setPixelColor(18, pixels.Color(0, 0, 0));
pixels.setPixelColor(17, pixels.Color(0, 0, 0));
pixels.setPixelColor(16, pixels.Color(0, 0, 0));
pixels.setPixelColor(15, pixels.Color(0, 0, 0));
pixels.setPixelColor(14, pixels.Color(0, 0, 0));
pixels.setPixelColor(13, pixels.Color(0, 0, 0));
pixels.setPixelColor(12, pixels.Color(0, 0, 0));
delay(100);}
if(conta==4){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(19, pixels.Color(0, 0, 0));
pixels.setPixelColor(18, pixels.Color(0, 0, 0));
pixels.setPixelColor(17, pixels.Color(0, 0, 0));
pixels.setPixelColor(16, pixels.Color(0, 0, 0));
pixels.setPixelColor(15, pixels.Color(0, 0, 0));
pixels.setPixelColor(14, pixels.Color(0, 0, 0));
pixels.setPixelColor(13, pixels.Color(0, 0, 0));
pixels.setPixelColor(12, pixels.Color(0, 0, 0));
delay(100);}
if(conta==5){
pregunta_sensor();
pixels.show();
pixels.clear();
pixels.setPixelColor(9, pixels.Color(255, 0, 0));
pixels.setPixelColor(8, pixels.Color(0, 255, 0));
pixels.setPixelColor(7, pixels.Color(0, 0, 255));
pixels.setPixelColor(6, pixels.Color(255, 140, 0));
pixels.setPixelColor(5, pixels.Color(153, 0, 153));
pixels.setPixelColor(4, pixels.Color(255,255, 0));
pixels.setPixelColor(3, pixels.Color(255, 0, 127));
pixels.setPixelColor(2, pixels.Color(0, 255, 255));
delay(100);}
if(conta==6){
delay(100);} }}
void pregunta_sensor(){
val_sensor=digitalRead(sensor); //read pin status
if(val_sensor==HIGH)pulso_sal=1;
if(val_sensor==LOW&&pulso_sal==1){
pulso_sal=0;
conta=conta+1;}
if(conta>=6)conta=0;
Serial.print(conta); }
Laser
3d print
Programming
created with
Website Builder Software .