Hot answers tagged

4

Never ever power a motor or anything, that needs that much power, through a digital output pin. The maximum rating is 40mA, though you should not draw more than 20mA continuously from it. Also there is an overall limit of 100mA over all digital pins together. If you are drawing more from the pins, first the voltage will drop immediately, since the pin cannot ...


2

Your strip has 2 LEDs with different color temperature directly besides at the same spot for every element of the strip. So the adjusting of the overall color temperature is done by changing the relative brightness of both LEDs. If the LED with the warmer light is brighter, the overall color temperature will also be warmer. Common Anode means, that V+ is the ...


1

If you connect one of these and you can see it light up with your naked eye then it is not an IR LED, it's a visible-light LED. It's also not an IR sensor. If you want to see IR, point a digital camera (like in your phone) at it and apply power. The sensors in digital cameras almost always detect some IR, so you can see a faint light on the screen. To test ...


1

we found some other code that helped us avoid the delay() functions. Now we are able to use the timestamp "Millis" to run our blinking lights AND have another if statement running the photocell & third LED. Making progress! Thanks for the suggestions! Here is the code and it works great to turn the LED on and off based on the photocell, and have the ...


1

The root of this behavior is that when the program runs delay() function - nothing else could run (digitalwrites, checks, conditions, etc.) until the delay() time is passed. The effective solution for this is avioding the delay() function, and getting the same results (without the side-effect) using timers (like millis()) or other ways. Googling "How to ...


1

Currently you are shifting in the button states and directly shifting them out again to the LEDs. Thus the state of the LEDs follows exactly the state of the buttons. As jsotola explained in the comments, you need to seperate what you get as input (buttons and serial) from what you set as output. For this you need 1 or more variables to hold the state of ...


1

Well, learning bit manipulations and using three uint16_t (as 9 bits won't fit into uint8_t) to store state for a whole cube is much better. Then you hust have to setup timer ISR and each time it fires just display one "floor". The multiplexing can be done even in loop, but it's usualy flickering as you can't do almost perfect timing as in the ISR. And for ...


Only top voted, non community-wiki answers of a minimum length are eligible