WS2812

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

WS2812

#1 Post by Ger » 23 Nov 2015, 14:01

I am trying to create a version with WS2812 support.
I use the following library https://github.com/JoDaNl/esp8266_ws2812_i2s
I get errors, with the example i have no errors.
Anyone an idea what i am doing wrong?

Arduino: 1.6.5 (Windows 7), Board:"Generic ESP8266 Module, Serial, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS)"

In file included from ESPEasy.ino:64:0:
C:\Program Files (x86)\Arduino\libraries\WS2812_i2s/ws2812_i2s.h:10:1: error: expected unqualified-id before 'extern'
extern "C"
^
C:\Program Files (x86)\Arduino\libraries\WS2812_i2s/ws2812_i2s.h:10:1: error: expected constructor, destructor, or type conversion before 'extern'
In file included from c:\users\ger\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\new:40:0,
from c:\users\ger\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\ext\new_allocator.h:33,
from c:\users\ger\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\xtensa-lx106-elf\bits\c++allocator.h:33,
from c:\users\ger\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\allocator.h:46,
from c:\users\ger\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\memory:63,
from C:\Users\Ger\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-1084-ga39ce29\libraries\ESP8266WiFi\src/WiFiClient.h:28,
from C:\Users\Ger\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-1084-ga39ce29\libraries\ESP8266WiFi\src/ESP8266WiFi.h:32,
from ESPEasy.ino:161:
c:\users\ger\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\exception:35:37: error: expected declaration before end of line
#pragma GCC visibility push(default)
^
Fout bij compileren.

Dit rapport zou meer informatie hebben met
"Tijdens de compilatie uitgebreide uitvoer weergeven"
ingeschakeld in Bestand > Voorkeuren.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#2 Post by Deennoo » 02 Feb 2016, 11:56

there a really good sketch easy to understand and easy to build here :

http://pance.mk/index.php/wifi-light-wi ... uino-code/

It make run all the pixel to the same color, webinterface controled and well documented.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: WS2812

#3 Post by tozett » 02 Feb 2016, 15:37

another (old) example
but a lot of cool effect-routines in the arduino-source !!! ;)

http://funkboxing.com/wordpress/?p=2154
http://funkboxing.com/wordpress/wp-cont ... 1_POST.ino

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: WS2812

#4 Post by Ger » 04 Feb 2016, 13:22

At the moment I use two projects with esp8266 arduino code using ws2812.
A ntp clock with ws2812 see website http://www.thelightclock.com/ github https://github.com/chrismelba/thelightclockwifi .
A hue bridge using ws2812 thanks to Deennoo github https://github.com/sticilface/Esp8266-Hue.
At home I use a couple of WS2812 led strips for lightning as described in the following post http://www.esp8266.nu/forum/viewtopic.php?f=6&t=198.
I would like to have a web interface to configure it, at the moment I am thinking of expanding the hue bridge to 300 lights and maybe building a web interface to configure the lights.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#5 Post by Deennoo » 04 Feb 2016, 14:32

On my side i'm looking for a way to drive all the led strip as a single bulb with huebridge sketch
Do you have an idea Ger?

Still for Ger, i start the same project as you need and get some cool résult :

https://github.com/deennoo/ESP8266-ws2812b

Use master sketch and have fun

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: WS2812

#6 Post by Ger » 04 Feb 2016, 15:31

@Deennoo I think my original problem was a problem with a wrong library
I think you can use groups to use it as one bulb I am using Hueremote on a Ipad.
Do you know if you can control hue with sketches?

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#7 Post by Deennoo » 04 Feb 2016, 16:37

i can't of course will try this app (offical one who i use doesn't allow more than 6 bulb/group, because of firmware bad reconizion i think).

does this group is well reconize by domoticz ?

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: WS2812

#8 Post by Ger » 04 Feb 2016, 23:22

I don't see the HUE groups in Domoticz, I can create groups in Domoticz but the led color is individual configured at a led basis, not the group.
What I don't understand is why you would use WS2812 led's if you want them always all the same color I would use a 'normal' 12V RGB or RGBW strip.
They are cheaper and with the WS2812 strip if you use a long strip (5m) and full brightness the end of the strip will be less bright because it is 5V based and not 12V based I think. ;)

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#9 Post by Deennoo » 05 Feb 2016, 07:12

On my side :

Dont want ans cant't put long led strip.

I already got some ws2801 and now ws2812b juste want to recycle them (fedup buying again and again).

Easy to powerup : only 5v and my max pixel number will be 30 pcs.
My wemos who provid 5v direct from USB can accepte them easily

Got 1 wemos + 15 pixels who run my sketch with 5v 750ma /230 adapter and all is OK since 3 days now.

By the way ESP Easy isn't a light project...

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: WS2812

#10 Post by tozett » 06 Feb 2016, 23:04

just for the ws2812 lover, i surfed over this,
maybe an inspiration to bring here over? :mrgreen:

http://forkineye.com/espixelstick/
Last edited by tozett on 07 Feb 2016, 20:48, edited 1 time in total.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#11 Post by Deennoo » 07 Feb 2016, 18:11

Nice ! Thx

wutu
Normal user
Posts: 35
Joined: 05 Feb 2016, 07:33

Re: WS2812

#12 Post by wutu » 14 Feb 2016, 10:04

tozett wrote:just for the ws2812 lover, i surfed over this,
maybe an inspiration to bring here over? :mrgreen:

http://forkineye.com/espixelstick/

I tested this on Christmas. DMX is not appropriate for wireless.
Better to me whether it controls already prepared animations in esp8266. With editable parameters.
Like here: https://github.com/sticilface/ESP8266-wifi

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: WS2812

#13 Post by tozett » 14 Feb 2016, 10:16

cool, cool , i will consider get it working soon ..
:mrgreen:

edit: managed to compile it, had to remove one argument from a neopixel-call.
found this screenshots: https://github.com/sticilface/ESP8266-wifi/wiki
waiting for time to flash ...

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: WS2812

#14 Post by tozett » 14 Feb 2016, 17:56

i fiddled with this,
but:
:cry:
seems far away from stable...
can only use pin TXD1 in the uart-driven neopixel lib, which means GPIO2 on my ESP12,
when the LED strip (8) is connected from power-on, it does not boot...
needed some reboot to connect to my wifi
webinterface somehow slow in comparison to ESPeasy

+ shows signal strengh of wifi lans,
+ ws2812 was on, for onetime (than esp crashed)
+ effects are in the source
+ presets are in the source
+ "MQTT commands control mostly everything."

...little bit more stable would be good, integration to ESPeasy would be great (but maybe better to run on an arduino-mini with extender...)

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#15 Post by Deennoo » 14 Feb 2016, 20:11

Again thx for source will try it too !

Milight API ils quite easy to understand, but for a newbie on arduino sketch programming...not so easy to add.

But will try.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#16 Post by Deennoo » 14 Feb 2016, 21:28

60 min later i'm back, and please to say that Sticilface made a great job !

Of course that a bit slower on running effect, but impressive, it made all that i plan to do....and i will take 3 years to made it...

Actually i run it on a Wemos mini d1 + 15 pixel direct plug on it (5v gnd and data) and usb3 powered, and it works very nice

I saw that it's waiting for some UDP order, will try to investigate on.

edit : UDP : looks can be works on milight protocole, color looks reverted, can turn on but not turn off, and controlling only 1 pixel, this sketch is a bomb for me

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: WS2812

#17 Post by tozett » 19 Feb 2016, 20:13


Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#18 Post by Deennoo » 21 Feb 2016, 10:03

Hum....no
PI Zéro + wifi dongle + sd card + led board.....to much marerial for my project

wutu
Normal user
Posts: 35
Joined: 05 Feb 2016, 07:33

Re: WS2812

#19 Post by wutu » 24 Feb 2016, 16:40

Looks like sticilface sleeps not. So hopefully something will.
https://github.com/sticilface/Melvanimate

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: WS2812

#20 Post by msev » 04 Mar 2016, 11:59


Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#21 Post by Deennoo » 04 Mar 2016, 21:55

Can be, to try

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: WS2812

#22 Post by msev » 15 Mar 2016, 09:54

Guys I think the best way would be to use the FastLED library, it supports esp8266 out of the box and has a big community online. And this library support different variety of leds so it would be cool to support multiple types at once.

See here under supported platforms: https://github.com/FastLED/FastLED

The G+ community: https://plus.google.com/communities/109 ... 4227823508

Also I think this FastLED library has some animations included.

I'd really like for this to be implemented :D

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: WS2812

#23 Post by tozett » 15 Mar 2016, 10:13

Is this really portable to esp8266?
There are critical Timings in the code...

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: WS2812

#24 Post by msev » 15 Mar 2016, 10:58

It says in the readme under Supported platforms: ESP8266 using the arduino board definitions from http://arduino.esp8266.com/stable/packa ... index.json

So it seems it supports ESP8266, also here a demo: https://www.youtube.com/watch?v=IGXInPlnvYc

And here: https://www.youtube.com/watch?v=3zQ8qC1KQgU

I don't know what the relation to ESP Easy firmware is, if it clashes somewhere, since I'm not a coder.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#25 Post by Deennoo » 15 Mar 2016, 16:04

Maybe ESPEasy have to simple reach the goal to be a Sensors FW and not a Lighting FW...

wutu
Normal user
Posts: 35
Joined: 05 Feb 2016, 07:33

Re: WS2812

#26 Post by wutu » 09 Apr 2016, 17:43

Sticilface nicely tuned https://github.com/sticilface/Melvanimate.
With MQTT and can be controlled via http://pixelinvaders.ch/?page_id=160
On Wemos D1mini works well. Use the library from Adafruit.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#27 Post by Deennoo » 10 Apr 2016, 06:26

wutu wrote:Use the library from Adafruit.
Try to get it but facing to a lib problem.

Can you try to be more explicit please ? (or share your working lib if you can)

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: WS2812

#28 Post by msev » 10 Apr 2016, 10:29

No no I think you need to use Neopixelbus library by Makuna on github. Sticilface uses that one not the original adafruit one.

wutu
Normal user
Posts: 35
Joined: 05 Feb 2016, 07:33

Re: WS2812

#29 Post by wutu » 10 Apr 2016, 19:38

msev: Course you're right, but it also uses https://github.com/adafruit/Adafruit-GFX-Library. That makes me a bit confounded.

Deennoo: I compiled with the Arduino IDE 1.6.8 and ESP8266 2.1.0, all other libraries in the last github version. If you prefer, write, I compile it for you. Just tell which devices.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#30 Post by Deennoo » 11 Apr 2016, 18:53

@Wutu, thnaks for your help, i appreciate this, but have to find a solution be my self, getting a .bin form someone help of course to reach final goal, but is not a goos solution to learn how it works.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: WS2812

#31 Post by Deennoo » 12 Apr 2016, 16:54

wutu wrote:msev: Course you're right, but it also uses https://github.com/adafruit/Adafruit-GFX-Library. That makes me a bit confounded.

Deennoo: I compiled with the Arduino IDE 1.6.8 and ESP8266 2.1.0, all other libraries in the last github version. If you prefer, write, I compile it for you. Just tell which devices.
Boring by searching lib again and again and again, no my problem is that i can't find FSBrowser.h....i manage to progress on compil using a neopixelbus animator version i get from 15/01/2016.

Please Wutu can you share your complied one ? does this version you get got spiffs files on ? or do i have to put them by my self ?


Edit : Finally I manage to compil and make it works.

Post Reply

Who is online

Users browsing this forum: No registered users and 85 guests