Desk Lamp Display (with removable lens)

Desk Lamp Display (with removable lens)

prusaprinters

<p>&nbsp;This desk lamp is designed with WS2812b (neopixels <a href="https://www.amazon.com/BTF-LIGHTING-Flexible-Individually-Addressable-Non-waterproof/dp/B01CDTED80?ref_=ast_sto_dp&amp;th=1">https://www.amazon.com/BTF-LIGHTING-Flexible-Individually-Addressable-Non-waterproof/dp/B01CDTED80?ref_=ast_sto_dp&amp;th=1</a> ) any LED density will work, but you could use RGBs if you want.</p><p>&nbsp;I designed the bases to use ATTINY85s. <a href="https://www.amazon.com/AiTrip-Digispark-Kickstarter-Attiny85-Development/dp/B0836WXQQR/ref=sr_1_3?keywords=attiny&amp;qid=1666889547&amp;qu=eyJxc2MiOiI0LjY5IiwicXNhIjoiNC40NCIsInFzcCI6IjMuOTEifQ%3D%3D&amp;sr=8-3">https://www.amazon.com/AiTrip-Digispark-Kickstarter-Attiny85-Development/dp/B0836WXQQR/ref=sr_1_3?keywords=attiny&amp;qid=1666889547&amp;qu=eyJxc2MiOiI0LjY5IiwicXNhIjoiNC40NCIsInFzcCI6IjMuOTEifQ%3D%3D&amp;sr=8-3</a> (The base with a battery can fit either model of the Attiny85s)</p><p>&nbsp;The version with the battery uses any 3.7 lipo battery ( I used these <a href="https://www.amazon.com/URGENEX-Battery-Rechargeable-Quadcopter-Charger/dp/B08T9FB56F/ref=sr_1_7?crid=1439NHHC0MSIJ&amp;keywords=3.7+lipo&amp;qid=1666889722&amp;qu=eyJxc2MiOiI1LjA1IiwicXNhIjoiNC40MiIsInFzcCI6IjMuODcifQ%3D%3D&amp;sprefix=3.7+lipo%2Caps%2C129&amp;sr=8-7">https://www.amazon.com/URGENEX-Battery-Rechargeable-Quadcopter-Charger/dp/B08T9FB56F/ref=sr_1_7?crid=1439NHHC0MSIJ&amp;keywords=3.7+lipo&amp;qid=1666889722&amp;qu=eyJxc2MiOiI1LjA1IiwicXNhIjoiNC40MiIsInFzcCI6IjMuODcifQ%3D%3D&amp;sprefix=3.7+lipo%2Caps%2C129&amp;sr=8-7</a> ), and a lipo charger with battery protection <a href="https://www.amazon.com/CHENBO-Lithium-Battery-Charging-Protection/dp/B06XCXPY86/ref=sr_1_16?crid=29L2F0EYP4JKF&amp;keywords=3.7+lipo+charger+pcb&amp;qid=1666889873&amp;sprefix=3.7+lipo+charger+pcb%2Caps%2C108&amp;sr=8-16">https://www.amazon.com/CHENBO-Lithium-Battery-Charging-Protection/dp/B06XCXPY86/ref=sr_1_16?crid=29L2F0EYP4JKF&amp;keywords=3.7+lipo+charger+pcb&amp;qid=1666889873&amp;sprefix=3.7+lipo+charger+pcb%2Caps%2C108&amp;sr=8-16</a> (either type-c or micro-usb)</p><p>&nbsp;I made a stem for the model to print or you can use PTFE tube <a href="https://www.amazon.com/dp/B07B8KMNQN?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details">https://www.amazon.com/dp/B07B8KMNQN?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details</a> or metal tubing <a href="https://www.amazon.com/gp/product/B082FFG66G/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&amp;psc=1">https://www.amazon.com/gp/product/B082FFG66G/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&amp;psc=1</a> &nbsp;, just cut to desired length.</p><p>&nbsp;The power switch I used was <a href="https://www.amazon.com/dp/B07BJLC26K?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details">https://www.amazon.com/dp/B07BJLC26K?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details</a>&nbsp;</p><p>&nbsp;There are 2 models one that uses a 2 position switch ( for brightness) <a href="https://www.amazon.com/Cylewet-Vertical-Switch-Position-CYT1107/dp/B07FVM3XYR/ref=sr_1_8?crid=1945E5HYC3LU6&amp;keywords=2+position+switch&amp;qid=1667022695&amp;qu=eyJxc2MiOiI1LjQ4IiwicXNhIjoiNC43NiIsInFzcCI6IjQuMjgifQ%3D%3D&amp;s=industrial&amp;sprefix=2+position+switch%2Cindustrial%2C97&amp;sr=1-8">https://www.amazon.com/Cylewet-Vertical-Switch-Position-CYT1107/dp/B07FVM3XYR/ref=sr_1_8?crid=1945E5HYC3LU6&amp;keywords=2+position+switch&amp;qid=1667022695&amp;qu=eyJxc2MiOiI1LjQ4IiwicXNhIjoiNC43NiIsInFzcCI6IjQuMjgifQ%3D%3D&amp;s=industrial&amp;sprefix=2+position+switch%2Cindustrial%2C97&amp;sr=1-8</a> &nbsp; and a 3 position switch ( for brightness and pausing effect) <a href="https://www.amazon.com/dp/B07DNY27QB?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details">https://www.amazon.com/dp/B07DNY27QB?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details</a>&nbsp;</p><p><strong>OTHER STUFF NEEDED</strong></p><ol><li>Wire <a href="https://www.amazon.com/Fermerry-Silicone-Flexible-Electric-Stranded/dp/B089D13Y1N/ref=sr_1_12?crid=2GL0PBTNUTHCV&amp;keywords=24+awg&amp;qid=1666890541&amp;qu=eyJxc2MiOiI0Ljk0IiwicXNhIjoiNC41MiIsInFzcCI6IjQuMjEifQ%3D%3D&amp;s=industrial&amp;sprefix=24+awg%2Cindustrial%2C132&amp;sr=1-12">https://www.amazon.com/Fermerry-Silicone-Flexible-Electric-Stranded/dp/B089D13Y1N/ref=sr_1_12?crid=2GL0PBTNUTHCV&amp;keywords=24+awg&amp;qid=1666890541&amp;qu=eyJxc2MiOiI0Ljk0IiwicXNhIjoiNC41MiIsInFzcCI6IjQuMjEifQ%3D%3D&amp;s=industrial&amp;sprefix=24+awg%2Cindustrial%2C132&amp;sr=1-12</a>&nbsp;</li><li>Solder and solder gun <a href="https://www.amazon.com/gp/product/B09TZVSX96/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&amp;psc=1">https://www.amazon.com/gp/product/B09TZVSX96/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&amp;psc=1</a> (use a fume extractor for your safety <a href="https://www.amazon.com/dp/B08HYZYZZX?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details">https://www.amazon.com/dp/B08HYZYZZX?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details</a> )</li><li>300-600 Ohm resistor <a href="https://www.amazon.com/BOJACK-Values-Resistor-Resistors-Assortment/dp/B08FD1XVL6/ref=sr_1_7_sspa?crid=3YQRWAFV0KTT&amp;keywords=300+ohm+resistor&amp;qid=1666890744&amp;qu=eyJxc2MiOiIzLjI0IiwicXNhIjoiMy4yMiIsInFzcCI6IjMuMDcifQ%3D%3D&amp;sprefix=300+ohm+res%2Caps%2C104&amp;sr=8-7-spons&amp;psc=1">https://www.amazon.com/BOJACK-Values-Resistor-Resistors-Assortment/dp/B08FD1XVL6/ref=sr_1_7_sspa?crid=3YQRWAFV0KTT&amp;keywords=300+ohm+resistor&amp;qid=1666890744&amp;qu=eyJxc2MiOiIzLjI0IiwicXNhIjoiMy4yMiIsInFzcCI6IjMuMDcifQ%3D%3D&amp;sprefix=300+ohm+res%2Caps%2C104&amp;sr=8-7-spons&amp;psc=1</a>&nbsp;</li><li>Black and White filament (your preference) PLA will kinda melt if you leave it in your car FYI. <a href="https://www.amazon.com/gp/product/B07XG3RM58/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&amp;psc=1">https://www.amazon.com/gp/product/B07XG3RM58/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&amp;psc=1</a> (PLA) <a href="https://www.amazon.com/gp/product/B07PGYHYV8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&amp;psc=1">https://www.amazon.com/gp/product/B07PGYHYV8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&amp;psc=1</a> (PETG)</li><li>A computer to program using Arduino IDE <a href="https://www.amazon.com/Rendering-Modelling-Workstation-Threadripper-Bluetooth/dp/B08FDYNDNQ/ref=sr_1_1?keywords=super+computer&amp;qid=1666891121&amp;qu=eyJxc2MiOiI1Ljg0IiwicXNhIjoiNC4yOSIsInFzcCI6IjEuNTkifQ%3D%3D&amp;sr=8-1&amp;ufe=app_do%3Aamzn1.fos.4dd97f68-284f-40f5-a6f1-1e5b3de13370">https://www.amazon.com/Rendering-Modelling-Workstation-Threadripper-Bluetooth/dp/B08FDYNDNQ/ref=sr_1_1?keywords=super+computer&amp;qid=1666891121&amp;qu=eyJxc2MiOiI1Ljg0IiwicXNhIjoiNC4yOSIsInFzcCI6IjEuNTkifQ%3D%3D&amp;sr=8-1&amp;ufe=app_do%3Aamzn1.fos.4dd97f68-284f-40f5-a6f1-1e5b3de13370</a> ; )</li><li>Hot glue and hot glue gun <a href="https://www.amazon.com/Gorilla-8401509-Hot-Glue-Sticks/dp/B07K791YRP/ref=sr_1_5?crid=PPXK5B4B66GD&amp;keywords=hot+glue+gun&amp;qid=1666891243&amp;qu=eyJxc2MiOiI1LjM2IiwicXNhIjoiNS4wMSIsInFzcCI6IjQuNzQifQ%3D%3D&amp;sprefix=hot+glu%2Caps%2C115&amp;sr=8-5">https://www.amazon.com/Gorilla-8401509-Hot-Glue-Sticks/dp/B07K791YRP/ref=sr_1_5?crid=PPXK5B4B66GD&amp;keywords=hot+glue+gun&amp;qid=1666891243&amp;qu=eyJxc2MiOiI1LjM2IiwicXNhIjoiNS4wMSIsInFzcCI6IjQuNzQifQ%3D%3D&amp;sprefix=hot+glu%2Caps%2C115&amp;sr=8-5</a>&nbsp;</li><li>Micro USB cord to program and power ATTINY85 or battery charger ( Or Type-C if you go that route for the battery charger. The Attiny85 uses micro-usb.) <a href="https://www.amazon.com/gp/product/B09CMVMG6M/ref=ppx_yo_dt_b_search_asin_image?ie=UTF8&amp;psc=1">https://www.amazon.com/gp/product/B09CMVMG6M/ref=ppx_yo_dt_b_search_asin_image?ie=UTF8&amp;psc=1</a>&nbsp;</li><li>Super glue <a href="https://www.amazon.com/Gorilla-Super-Brush-Nozzle-Applicator/dp/B01LYO4R4I/ref=sr_1_5_mod_primary_sns?keywords=super+glue&amp;qid=1666896865&amp;qu=eyJxc2MiOiI0Ljk5IiwicXNhIjoiNC44MCIsInFzcCI6IjQuNjkifQ%3D%3D&amp;sbo=GLaw0Fx56FiNH%2FiZ%2B6XKiQ%3D%3D&amp;sprefix=super%2Caps%2C220&amp;sr=8-5">https://www.amazon.com/Gorilla-Super-Brush-Nozzle-Applicator/dp/B01LYO4R4I/ref=sr_1_5_mod_primary_sns?keywords=super+glue&amp;qid=1666896865&amp;qu=eyJxc2MiOiI0Ljk5IiwicXNhIjoiNC44MCIsInFzcCI6IjQuNjkifQ%3D%3D&amp;sbo=GLaw0Fx56FiNH%2FiZ%2B6XKiQ%3D%3D&amp;sprefix=super%2Caps%2C220&amp;sr=8-5</a>&nbsp;</li><li>3d Printer (Just buy them all)</li></ol><p><strong>HOW TO BUILD</strong></p><ol><li>Print desired design, with or without a battery Light Base Bottom and 2 or 3 position switch Light Base. Both the Light Case and Light Base will need support (on the build plate only).&nbsp;</li><li>Program Attiny85 (instructions and code further down)</li><li>Cut led strips so the pixels fit into cut out of the LED Plate. 2x- 41mm 2x-70mm 1x-87mm ( max width for the pixels, not the strip strip itself.<img src="https://media.printables.com/media/prints/303969/images/2653038_3f61acf9-4f5a-4aa8-9b89-8abecec920da/thumbs/cover/140x140/png/screenshot-2022-10-27-131358.webp" alt=""></li><li>Pre-solder the strip ends then hot glue them into the correct orientation as shown below. (follow the arrows)<img src="https://media.printables.com/media/prints/303969/images/2653063_9fbfa92c-5462-4fbf-9fd9-eae8bf2dcd44/thumbs/cover/140x140/jpg/20221027_122730.webp" alt=""></li><li>Cut and solder on wires. (Have fun, its the most difficult part, but it's not too bad. Just give yourself a long enough tail for soldering the Attiny85. It's easy to cut off some extra wire, it's a pain to try to add more wire to a too short wire )</li><li><img src="https://media.printables.com/media/prints/303969/images/2653061_f68eabf7-7412-4269-94e7-ba83d204cf6f/thumbs/cover/140x140/jpg/20221027_122657.webp" alt=""></li><li>Place LED Plate into the Light Case and hot glue all around the edge then (carefully without burning yourself) press down the LED Plate Cover.<img src="https://media.printables.com/media/prints/303969/images/2653170_c0cc8771-9761-4c20-943b-14434b15682a/thumbs/cover/140x140/jpg/20221027_140607.webp" alt=""><img src="https://media.printables.com/media/prints/303969/images/2653169_92aa4647-bbf5-4e8a-833c-ea49077618e4/thumbs/cover/140x140/jpg/20221027_140822.webp" alt=""></li><li>Thread the wire through your Light Case and Stem.</li><li>Super glue the Stem, PTFE tube, or steel tube to the Light Case. Set aside and let dry.</li><li>Pre-solder position switch (solder 300-500 ohm resistor to middle pin/s) and power switches, place in Light Base and hot glue to secure.<img src="https://media.printables.com/media/prints/303969/images/2653191_b82f710c-2c24-46f8-ab22-deac0302558c/thumbs/cover/140x140/jpg/16668983864162854240487377544169.webp" alt=""><img src="https://media.printables.com/media/prints/303969/images/2653060_8cf1d08f-211d-45bc-bd42-3177fc198a16/thumbs/cover/140x140/jpg/20221027_130542.webp" alt=""></li><li>Thread wires into Light Base and super glue the Stem in place.</li><li>Solder the LED data line (green or yellow in pics) to the resistor, then solder 2 wires to the other 2 switch pins. Solder those wires to pins 3 and 4 of the Attiny85.<img src="https://media.printables.com/media/prints/303969/images/2653279_382f4adf-dccf-4e86-bd89-ca4b8d810afc/thumbs/cover/140x140/jpg/16668996789921947625891941596677.webp" alt=""></li><li>Wire Power (see below)….</li><li>Hot glue wire connections (for stress relief and strength)</li><li>Snap on bottom, it only fits 1 way. (watch your fingers, It's easiest if you place the Light Base Bottom flat on a table and push the Light base on firmly)</li><li>Print and place in your favorite lens, snap on the Light Case Lid, power on and let you friends be jealous of your ingenuity.&nbsp;</li></ol><p><strong>WIRING POWER (with Battery)</strong></p><figure class="image image-style-align-right"><img src="https://media.printables.com/media/prints/303969/images/2653271_b53356f8-33e0-40a2-98ac-2b927d30a389/thumbs/cover/140x140/jpg/20221027_143827.webp" alt=""></figure><ol><li>Solder the LED power line (red or blue in pics) to a leg of the power switch</li><li>Solder A new wire on the same leg to the “5v” pin on the Attiny85</li><li>Solder the LED ground line (black or white in pics) to the “GND” pin on the Attiny85 (strip a nice length of wire, because you will have to solder another ground from the battery charger to it as well)</li><li>Solder new power and ground wires to the “OUT” pins of the battery charger. The power line gets soldered to the free leg of the power switch, and the ground gets soldered together with the LED's ground connection on the Attiny85's “GND” pin</li><li>Now for the battery, <strong>DO NOT CUT BOTH WIRES AT ONCE!!! </strong>Switch power switch off “o”</li><li>Cut and strip the battery's ground wire (black) then solder it to the “B-” of the battery charger</li><li>Cut and strip the battery's power wire (red) then solder it to the “B+” of the battery charger</li><li>Hot glue battery charger, battery, and Attiny85 into place.&nbsp;</li><li>Continue to step 13 of HOW TO BUILD</li></ol><p>&nbsp;<strong>WIRING POWER (without Battery)</strong></p><ol><li>Solder the LED power line (red or blue in pics) to a leg of the power switch</li><li>Solder A new wire on the same leg to the “5v” pin on the Attiny85</li><li>&nbsp;Solder the LED ground line (black or white in pics) to the “GND” pin on the Attiny85</li><li>Hot glue Attiny85 into place.&nbsp;</li><li>Continue to step 13 of HOW TO BUILD</li></ol><p>&nbsp;</p><p><strong>PROGRAMING THE ATTINY85</strong></p><p>You'll need to download Arduino IDE <a href="https://www.arduino.cc/en/software">https://www.arduino.cc/en/software</a> . Once you have it installed you'll need to add 2 libraries to the adruino IDE program. The Adafruit Neopixel Library and Digistump Library (http://digistump.com/package_digistump_index.json)</p><p>Here is my code I used, just edit the number of LEDs so it matches what you used. To program the Attiny85 make sure you have the 2 Arduino libraries. Simply add the code, chose board: Digispark (Default - 16.5mhz) and hit Upload <strong>WITHOUT</strong> having the Attiny85 plugged in. Plug in when prompted to.&nbsp;</p><figure class="media"><oembed url="https://www.youtube.com/watch?v=uLRa-9hHK_Y"></oembed></figure><figure class="media"><oembed url="https://www.youtube.com/watch?v=MmDBvgrYGZs"></oembed></figure><p>&nbsp;</p><p><code>#include &lt;Adafruit_NeoPixel.h&gt;</code><br><code>#ifdef __AVR__</code><br><code>#include &lt;avr/power.h&gt; // Required for 16 MHz Adafruit Trinket</code><br><code>#endif</code><br><code>#define LED_PIN &nbsp; &nbsp;3</code><br><code>#define LED_PIN2 &nbsp; &nbsp;4</code></p><p><code>// How many NeoPixels are attached to the Arduino?</code><br><code>#define LED_COUNT 45</code><br><code>#define LED_COUNT2 45</code></p><p><code>Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);</code><br><code>Adafruit_NeoPixel strip2(LED_COUNT2, LED_PIN2, NEO_GRB + NEO_KHZ800);</code></p><p><code>void setup() {</code><br><code>&nbsp;#if defined(__AVR_ATtiny85__) &amp;&amp; (F_CPU == 16000000)</code><br><code>&nbsp;clock_prescale_set(clock_div_1);</code><br><code>&nbsp;#endif</code><br><code>&nbsp;strip.begin();</code><br><code>&nbsp;strip.show(); // Initialize all pixels to 'off'</code><br><code>&nbsp;strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)</code><br><code>&nbsp;strip2.begin();</code><br><code>&nbsp;strip2.show(); // Initialize all pixels to 'off'</code><br><code>&nbsp;strip2.setBrightness(150); // Set BRIGHTNESS to about 1/5 (max = 255)</code><br><code>&nbsp;colorWipe(strip.Color(255, &nbsp; 255, &nbsp; 255), 100);</code><br><code>&nbsp;colorWipe(strip2.Color(255, &nbsp; 255, &nbsp; 255), 100);</code><br><code>&nbsp;}</code></p><p><code>void loop() {</code><br><code>&nbsp;colorWipe(strip.Color(255, &nbsp; 0, &nbsp; 0), 50); // Red</code><br><code>&nbsp;colorWipe(strip.Color(150, &nbsp; 150, &nbsp; 0), 50); //&nbsp;Yellow</code><br><code>&nbsp;colorWipe(strip.Color( &nbsp;0, 255, &nbsp; 0), 50); // Green</code><br><code>&nbsp;colorWipe(strip.Color( &nbsp;0, 150, &nbsp; 150), 50); //&nbsp;Cyan</code><br><code>&nbsp;colorWipe(strip.Color( &nbsp;0, &nbsp; 0, 255), 50); // Blue</code><br><code>&nbsp;colorWipe(strip.Color( &nbsp;150, &nbsp; 0, 150), 50); //&nbsp;Purle</code><br><code>&nbsp;rainbow(25);</code><br><code>&nbsp;rainbowCycle2(50);</code><br><code>&nbsp;rainbowCycle(30);&nbsp;</code><br><code>&nbsp;rainbowCycle3(2);</code><br><code>}</code></p><p><code>void colorWipe(uint32_t color, int wait) {</code><br><code>&nbsp;for(int i=0; i&lt;strip.numPixels(); i++) { // For each pixel in strip...</code><br><code>&nbsp; &nbsp;strip.setPixelColor(i, color); &nbsp; &nbsp; &nbsp; &nbsp; // &nbsp;Set pixel's color (in RAM)</code><br><code>&nbsp; &nbsp;strip2.setPixelColor(i, color); &nbsp; &nbsp; &nbsp; &nbsp; // &nbsp;Set pixel's color (in RAM)</code><br><code>&nbsp; &nbsp;strip.show(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// &nbsp;Update strip to match</code><br><code>&nbsp; &nbsp;strip2.show(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// &nbsp;Update strip to match</code><br><code>&nbsp; &nbsp;delay(wait); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // &nbsp;Pause for a moment</code><br><code>&nbsp;}</code><br><code>}</code></p><p><code>void rainbow(uint8_t wait) {</code><br><code>&nbsp;uint16_t i, j;</code></p><p><code>&nbsp;for(j=0; j&lt;256*5; j++) {</code><br><code>&nbsp; &nbsp;for(i=0; i&lt;strip.numPixels(); i++) {</code><br><code>&nbsp; &nbsp; &nbsp;strip.setPixelColor(i, Wheel((i+j) &amp; 255));</code><br><code>&nbsp; &nbsp; &nbsp;strip2.setPixelColor(i, Wheel((i+j) &amp; 255));</code><br><code>&nbsp; &nbsp;}</code><br><code>&nbsp; &nbsp;strip.show();</code><br><code>&nbsp; &nbsp;strip2.show();</code><br><code>&nbsp; &nbsp;delay(wait);</code><br><code>&nbsp;}</code><br><code>}</code></p><p><code>// Slightly different, this makes the rainbow equally distributed throughout</code><br><code>void rainbowCycle2(uint8_t wait) {</code><br><code>&nbsp;uint16_t i, j;</code></p><p><code>&nbsp;for(j=0; j&lt;256*5; j++) { // 5 cycles of all colors on wheel</code><br><code>&nbsp; &nbsp;for(i=0; i&lt; strip2.numPixels(); i++) {</code><br><code>&nbsp; &nbsp; &nbsp;strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()/4) + j) &amp; 255));</code><br><code>&nbsp; &nbsp; &nbsp;strip2.setPixelColor(i, Wheel(((i * 256 / strip2.numPixels()/4) + j) &amp; 255));</code><br><code>&nbsp; &nbsp;}</code><br><code>&nbsp; &nbsp;strip.show();</code><br><code>&nbsp; &nbsp;strip2.show();</code><br><code>&nbsp; &nbsp;delay(wait);</code><br><code>&nbsp;}</code><br><code>}</code></p><p><code>// Slightly different, this makes the rainbow equally distributed throughout</code><br><code>void rainbowCycle(uint8_t wait) {</code><br><code>&nbsp;uint16_t i, j;</code></p><p><code>&nbsp;for(j=0; j&lt;256*5; j++) { // 5 cycles of all colors on wheel</code><br><code>&nbsp; &nbsp;for(i=0; i&lt; strip.numPixels(); i++) {</code><br><code>&nbsp; &nbsp; &nbsp;strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) &amp; 255));</code><br><code>&nbsp; &nbsp; &nbsp;strip2.setPixelColor(i, Wheel(((i * 256 / strip2.numPixels()) + j) &amp; 255));</code><br><code>&nbsp; &nbsp;}</code><br><code>&nbsp; &nbsp;strip.show();</code><br><code>&nbsp; &nbsp;strip2.show();</code><br><code>&nbsp; &nbsp;delay(wait);</code><br><code>&nbsp;}</code><br><code>}</code></p><p><br><code>// Slightly different, this makes the rainbow equally distributed throughout</code><br><code>void rainbowCycle3(uint8_t wait) {</code><br><code>&nbsp;uint16_t i, j;</code></p><p><code>&nbsp;for(j=0; j&lt;256*25; j++) { // 30 cycles of all colors on wheel</code><br><code>&nbsp; &nbsp;for(i=0; i&lt; strip.numPixels(); i++) {</code><br><code>&nbsp; &nbsp; &nbsp;strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()/2) + j) &amp; 255));</code><br><code>&nbsp; &nbsp; &nbsp;strip2.setPixelColor(i, Wheel(((i * 256 / strip2.numPixels()/2) + j) &amp; 255));</code><br><code>&nbsp; &nbsp;}</code><br><code>&nbsp; &nbsp;strip.show();</code><br><code>&nbsp; &nbsp;strip2.show();</code><br><code>&nbsp; &nbsp;delay(wait);</code><br><code>&nbsp;}</code><br><code>}</code></p><p><code>// Input a value 0 to 255 to get a color value.</code><br><code>// The colours are a transition r - g - b - back to r.</code><br><code>uint32_t Wheel(byte WheelPos) {</code><br><code>&nbsp;WheelPos = 255 - WheelPos;</code><br><code>&nbsp;if(WheelPos &lt; 85) {</code><br><code>&nbsp; return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);</code><br><code>&nbsp;} else if(WheelPos &lt; 170) {</code><br><code>&nbsp; &nbsp;WheelPos -= 85;</code><br><code>&nbsp; return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);</code><br><code>&nbsp;} else {</code><br><code>&nbsp; WheelPos -= 170;</code><br><code>&nbsp; return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);</code><br><code>&nbsp;}</code><br><code>}</code></p><p>&nbsp;</p><p>I can make more lenses, just comment some ideas.</p>

Download Model from prusaprinters

With this file you will be able to print Desk Lamp Display (with removable lens) with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Desk Lamp Display (with removable lens).