[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself

Search:


View post   

>> No.1772423 [View]
File: 1.64 MB, 480x270, Neopixelx8.gif [View same] [iqdb] [saucenao] [google]
1772423

I feel like I'm stupid or something but can't figure out what I'm doing wrong. Decided to dick around with some neopixels, writing some tests to become more familiar with the library. Starting simple, just doing some fade in/fade out, and I'm trying to do a smooth fade from 0 to 100 and then back to 0 again. For some reason, it looks "granular" (like if you increased the brightness by steps), so I made my code display the RGB value it's writing in the serial monitor. Looks fine, it's incrementing/decrementing by 1 each loop, great - but it's still granular, not smooth. Then I read the brightness value of the neopixel itself and the thing ALWAYS moves in steps of 5, despite the brightness being directly set (e.g. if I have a counter that's supposed to set the brightness 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15, the brightness it reads back is 0 0 0 0 0 5 5 5 5 5 10 10 10 10 10.

I'm just using strip.Color(r,g,b) to set it, what's going on here? Why is it stepping in steps of 5? I can't find anything on google about this.

>> No.1769562 [View]
File: 1.64 MB, 480x270, Neopixelx8.gif [View same] [iqdb] [saucenao] [google]
1769562

I want to power an Arduino Nano and some amount of Neopixels (around a meter or two) off of the same power supply (wall-pluggable USB, so 5V and somewhere around 2A). I can't think of any reason not to just fork the end and have 5V/GND running to the Neopixel strip as well as the Nano. I feel like I'm missing something - this seems too easy. Any thoughts? I know I'll have to be careful about the amount of neopixels to keep the power draw under what the USB socket/wall wart can provide.

Navigation
View posts[+24][+48][+96]