I imported Adafruit's NeoPixel code and ran their simple example that turned each LED green at half intensity. When it lit the roughly 200th light, the system rebooted. The panels drew so much power that the controller experienced a brown-out condition. I soldered the wires, so it took a few reboots before I got lucky, and it accepted a new program where the lights still showed green, but this time they were limited to less than 10% of their total power.
When I want to play with these addressable lights, I pull out an old function that assigns an RGB combination based on a number from 0-767. I created it to come up with pseudo-random colors. The problem with making random numbers for red, green, and blue is that many lights will have three similarly-sized numbers that look off-white. My code ensures that there are never more than two non-zero values. I added a new feature to set a maxBrightness variable to keep the eye-searing photons down, but it will reduce the resolution. I tested the algorithm out by continuously assigning new colors to each light. This way, I could ensure that all the lights worked and check which order they activated. When I installed the panels, they had some over-wide edges, and I wanted them adjacent, so I had to rotate them. In retrospect, that was not wise since I can't use the upper left corner as my origin for all the coordinates.
The rest of the posts for this project have been arranged by date.
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2021-12-09
When I want to play with these addressable lights, I pull out an old function that assigns an RGB combination based on a number from 0-767. I created it to come up with pseudo-random colors. The problem with making random numbers for red, green, and blue is that many lights will have three similarly-sized numbers that look off-white. My code ensures that there are never more than two non-zero values. I added a new feature to set a maxBrightness variable to keep the eye-searing photons down, but it will reduce the resolution. I tested the algorithm out by continuously assigning new colors to each light. This way, I could ensure that all the lights worked and check which order they activated. When I installed the panels, they had some over-wide edges, and I wanted them adjacent, so I had to rotate them. In retrospect, that was not wise since I can't use the upper left corner as my origin for all the coordinates.
The rest of the posts for this project have been arranged by date.
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2021-12-09
Comments
Post a Comment