Prepare ESP8266 - TheAmadeus25/CounterStrike-GlobalOffensive-Ambilight-System GitHub Wiki
After that, let's adjust our board in Arduino IDE.
Setting | Select | Note |
---|---|---|
Board | NodeMCU 1.0 (ESP-12E Module) | Use your board. Not sure if it works on other, too |
Upload Speed | 512000 | 921600 unstable while upload. 115200 takes minutes |
CPU Frequency | 160 MHz | 80Mhz seems fast enough, too |
Flash Size | 4M (1M SPIFFS) | 4MB = 3MB for Flash + 1MB for Website |
Debug port | Disabled | ATM, I don't know how to use it on other RX/TX Port |
Debug Level | None | No Debug port equals No Debug Level |
lwIP Variant | v2 Higher Bandwidth | Srsl, I don't know what it does 💯% |
Erase Flash | Only Sketch | For the first flash select All Flash Content |
Port | IP of your ESP8266-XX | For the first use, select COM X of the ESP8266-XX |
Plug your board via the built-in USB port to your Computer and wait until the driver is installed. If you get an error something like no driver avaible, you need to download one from the Internet. Note! There are two kinds of driver for ESP8266 NodeMCU!
Chipsize near USB Port | Company | Clone | Driver |
---|---|---|---|
A big rectangular one | LoLin etc. | Yes | CH34X |
A little squar one | Silicon Labs | No | CP210X |
Left LoLin, right Silicon Labs. Photo Source
After plug-in, choose the port in Arduino IDE. If you're not sure which port you ESP8266 is taking for, just search/open on Windows "Device-Manager" and look for "...(COM & LPT)". They should something like "CP210X" or "CH34X" listed with port number.
In Arduino IDE go to Data → Examples → 01.Basics → Blink
Now upload this sourcecode to your ESP8266, wait a little and then a Blue LED should be flashing now. If yes, well... your Device is working.
Do the same step above with the sourcecode downloaded from this project. You need all file inside ESP8266_CSGO-Ambilight
❗ NOTE: If you rename "ESP8266_CSGO-Ambilight.ino", you need rename the folder, as well!
Arduino IDE don't care, which file you open by double-click. It open the hole project at once. Inside Arduino IDE, there are 8 Tabs opened.
Inside "A_Variable.h" you need to adjust some settings:
Sourcecode line | Change Variable... | ...to something |
---|---|---|
9 | const char* ssid = ...; |
SSID of your WiFi-/MiFi-Router |
10 | const char* password = ...; |
Password of your WiFi-/MiFi-Router |
11 | String IP = ...; |
IP of your Computer with Node.js running |
12 | String PORT = ...; |
PORT of your Computer with Node.js running |
(I'll make changes later)
Inside "A_Configuration.h" you need to adjust this:
Sourcecode line | Change Variable... | ...to something |
---|---|---|
12 | NUM_LEDS ... |
How many LEDs are in use |
13 | DATA_PIN ... |
Which data pin (DIN) is attached to board |
14 | CLOCK_PIN ... |
Same like data pin but for other LED's |
15 | BRIGHTNESS ... |
Max brightness |
❗ CLOCK_PIN ...;
is missing on WS2812B LED stripes.
❕ CLOCK_PIN ...;
and BRIGHTNESS ...;
are never tested, before. Maybe it's buggy.
Now, you can configure your light zones:
Sourcecode line | Change Variable... | ...to something |
---|---|---|
19-32 | ZONE_X_LOW ... |
Zone X starts at... |
19-32 | ZONE_X_HIGH ... |
Zone X ends at... |
❗ NOTE: Highest number is NUM_LEDS
minus 1!
You can change these number if you don't like it.
Last, you can press upload for uploading and you are ready.