home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
HTPC Projects
Hardware
Ambient Lighting System
WS2812B
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Quarter" data-source="post: 1126108" data-attributes="member: 105349"><p>[CODE=C++]// AtmoduinoV2 by NevCairiel, based on RickDB Atmoduino V1</p><p>#include <FastLED.h></p><p>// Set the number of leds in the strip.</p><p>#define NUM_LEDS 188</p><p>// type of the LED controller</p><p>#define LED_TYPE WS2812B</p><p>// data and clock pins</p><p>#define DATA_PIN 10</p><p></p><p>CRGB leds[NUM_LEDS];</p><p>void setup(){</p><p> Serial.begin(115200);</p><p> FastLED.addLeds<LED_TYPE, DATA_PIN>(leds, NUM_LEDS);</p><p>}</p><p>int readByte(){</p><p> while (Serial.available() == 0){ /* wait for data */</p><p> }</p><p> return Serial.read();</p><p>}</p><p></p><p>void loop() {</p><p> if(readByte() == 0xD7){</p><p> if(readByte() == 0xEE){</p><p> if(readByte() == 0x23){</p><p> int channels = readByte();</p><p> for(int dot = 0; dot < channels; dot++){</p><p> leds[dot].g = readByte();</p><p> leds[dot].r = readByte();</p><p> leds[dot].b = readByte();</p><p> }</p><p> FastLED.show();</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p><p></p><p></p><p>Yes I can use it, it's the only one I can use without any problems. I doesn't have anyway to set the baud rate which was why I couldn't find it. When I try to use Atmoduino i just can't get it working.</p></blockquote><p></p>
[QUOTE="Quarter, post: 1126108, member: 105349"] [CODE=C++]// AtmoduinoV2 by NevCairiel, based on RickDB Atmoduino V1 #include <FastLED.h> // Set the number of leds in the strip. #define NUM_LEDS 188 // type of the LED controller #define LED_TYPE WS2812B // data and clock pins #define DATA_PIN 10 CRGB leds[NUM_LEDS]; void setup(){ Serial.begin(115200); FastLED.addLeds<LED_TYPE, DATA_PIN>(leds, NUM_LEDS); } int readByte(){ while (Serial.available() == 0){ /* wait for data */ } return Serial.read(); } void loop() { if(readByte() == 0xD7){ if(readByte() == 0xEE){ if(readByte() == 0x23){ int channels = readByte(); for(int dot = 0; dot < channels; dot++){ leds[dot].g = readByte(); leds[dot].r = readByte(); leds[dot].b = readByte(); } FastLED.show(); } } } }[/CODE] Yes I can use it, it's the only one I can use without any problems. I doesn't have anyway to set the baud rate which was why I couldn't find it. When I try to use Atmoduino i just can't get it working. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
HTPC Projects
Hardware
Ambient Lighting System
WS2812B
Contact us
RSS
Top
Bottom