Skip to content

Commit

Permalink
Improve docu and bring ESP32 pin switch (#4)
Browse files Browse the repository at this point in the history
* add animation and detail images

* Update README.md

* add pin switch for ESP32 based boards

Pin 8 for ESP32, Pin 1 for Digispark
  • Loading branch information
designer2k2 authored Nov 22, 2022
1 parent e660dbe commit b66e733
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ alt="DIY XMAS TREE" width="560" height="315" border="10" /></a>

1. Solder WS2812 led rings power and ground with magnet wire, tree shaped.
2. Solder every output with the input from the next ring.
3. Programm Digistump using Arduino IDE.
3. Programm Digispark using Arduino IDE.
4. Connect power and ground to Digispark.
5. Connect the first input to Digispark pin 1.
6. Connect Digispark to powersource.
Expand All @@ -32,5 +32,10 @@ It can be considered OSHW, i mean, how can you not recreate this easily?
1. Use more LED´s: [93 LED Ring´s](https://www.aliexpress.com/item/1-8-12-16-24-32-Bits-WS2812-5050-RGB-LED-Ring-Lamp-Light-with-Integrated/32662512396.html?ws_ab_test=searchweb0_0,searchweb201602_4_10065_10068_10084_10083_10080_10082_10081_10060_10061_10062_10056_10055_10037_10054_10059_10032_9912_10099_10078_10079_10077_426_10103_10073_10102_10096_10052_10050_10051-10050_9912,searchweb201603_6&btsid=882d21ad-2098-4702-ae11-bcffaf4105a9) The code needs to be changed to reflect the 93 WS1812!
2. Or even more! [241 LED Ring's](https://www.aliexpress.com/item/Addressable-WS2812B-pixel-Ring-1-8-12-16-24-32-40-48-60-93-241-LEDs/32809169128.html?spm=a2g0x.10010108.1000001.8.595e2b2dKDTtbE&isOrigTitle=true) The code needs to be adopted for this one also.

Online simulation on Wokwi: https://wokwi.com/projects/348695052670730836

Made an example on Wokwi : https://wokwi.com/projects/348695052670730836
<img src='img/xmas-tree-animation.gif'>

It is also possible to use a QT PY or similar ESP32-S2 or ESP32-C3 based boards:

<img src='img/digispark-attiny85.jpg'> <img src='img/qtpy-esp32s2.jpg'>
Binary file added img/digispark-attiny85.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/qtpy-esp32s2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/xmas-tree-animation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions xmas-tree.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@

#include <Adafruit_NeoPixel.h> //needed for the WS2812

#if defined(ESP32)
#pragma message "ESP32 based board, Pin 8"
#define PIN 8 //Pin 8, A3 is DATA In on the bottom Ring
#else
#pragma message "AVR based board, Pin 1"
#define PIN 1 //Pin 1 is DATA In on the bottom Ring
#endif

#define BRIGHTNESS 40 // brightness reduced (about 180mA max, 100mA average)
#define SIZEOFARRAY(X) sizeof(X) / sizeof(X[0])

Expand Down

0 comments on commit b66e733

Please sign in to comment.