diff --git a/PortalATtiny.ino b/PortalATtiny.ino index 575d622..4dd7364 100644 --- a/PortalATtiny.ino +++ b/PortalATtiny.ino @@ -1,6 +1,5 @@ #include -/* Change LEDS to the number of your leds */ #define LEDS 43 #define PIN 3 diff --git a/README.md b/README.md new file mode 100644 index 0000000..80e8ab2 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# PortalATtiny +Create a portal from Valve's video game with an oval mirror and a NeoPixel led strip. + +## Hardware +You need the following hardware: + +- Microcontroller (Arduino Nano/ESP01s/Digispark ATtiny etc.) +- 5V power supply (for the NeoPixel) +- RGB LED strip WS2812B (5V, GND and Din pin) +- optional: 470 ohm resistor to protect the microcrontroller +- optional: 1000 µF capacitor to stabilize +- optional: 3.3V Step Down Module if 5V is too much for your controller (like the ESP01s) + +### Setup +Connect the hardware: +- Power pins (+5V and GND) of the led strip with +5V and GND of your power supply. +- Din pin of the led strip with a digital pin of your microcontroller (optionally via the resistor) +- The microcontroller's 5V/3.3V/VIN and GND with the power supply (or the Step Down Module) +- (Put the capacitor to 5V and GND of the power supply)ŵ + +## Firmware +Open the ino file inside the [Arduino IDE](https://www.arduino.cc/en/software). Before you flash the code install the library `Adafruit NeoPixel by Adafruit` and do the following configurations: + +### Number of leds +Change LEDS to the number of your leds. + +```cpp +#define LEDS 43 +``` + +### Led color +Per default the color for the orange portal is used. For the blue portal change it as follows: + +```cpp +#define RED 0 +#define GREEN 0 +#define BLUE 255 +``` + +### Pin +Per default pin 3 is used to control the NeoPixel. Change it if you use another one: + +```cpp +#define PIN 3 +```