Post topics, source code that relate to the Arduino Platform

User avatar
By kaoz3000
#17110 Hey,
now it works for me, with these easy steps:
    Install the official Arduino 1.6.4 from arduino.cc
    This has a new feature called "Board Manager"
    In the preferences put "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" into the "Additional Borads Manager URLs" (Discussed here: https://github.com/esp8266/Arduino/issues/13)
    Then add the ESP8266 under Tools > Boards > Boards Manager
    Choose the new Board
    The programmer "AVR ISP" worked for me.
User avatar
By paulwb
#17186
glynnsimon wrote:
paulwb wrote:I've been following this post since Sunday to see if the author came back to lend a hand. No dice, so I downloaded the lirary, installed it, and tried to compile myws2812test (Arduino 8266, OS X). Got this:


Hi paulwb, Not to indicate that this is the appropriate solution to your problem, but I'll let you know what worked for me.

I was having a similar (not sure if exactly the same but definitely included the _sbrk_r part) issue when compiling the examples using the IDE package for OS X.

I have ended up getting mine to work by:
1. getting the source for the IDE from github
2. Installing the JDK 8u45 (1.8) from Oracle - because it won't build with the JDK 1.6 on my version of OS X (Mavericks)
3. building the IDE
4. building the sample from the WS2812 - no _sbrk_r_ error.

Compiled, uploaded and ran fine for me after doing that. A long road to get there though ... :)
Regards



Thank you for those steps. I have managed to compile the 'myws2812test.ino'example!

I compiled the 8266 Arduino from source (download as zip from Github, compile according to the README) after installing the updated JDK you suggested. I *also* had to modify the library header file. Unfortunately I don't remember what exactly the process was, but the #include section of my Esp_WS2812.h now looks like this:

Code: Select all//#include <c_types.h>
#include <eagle_soc.h>
#include <osapi.h>
#include <stdlib.h>
//#include <ESP.h>
#include <Arduino.h>


As you can see, I had to comment out c_types.h and ESP.h. Anyway, thank you for the help! :)
User avatar
By paulwb
#17190
andrew melvin wrote:Hi,

Sorry i'd neglected to check back here in a while. Unfortunately i can't really help you. My experience with C, and Arduino is in the timeframe of 2 months. It looks like there are some things missed if you can't compile the demo. My advice would be to clone and build a more recent version of the arduino IDE. If you are using the first 1.6.1 release from git-hub, a huge amount has changed since that was first put up. A huge amount.

Also there is another lib, https://github.com/Makuna/NeoPixelBus.git

This lib, uses a different method of bit banging, namely cpu cycle counts, and it is also able to stop timer 14 interrupts, which makes it less flickery as the wifi stack can't interrupt things. I can't comment on it too much, as i've yet to attach it to any length of string. But I am working with it.

The downsides, are that it is not quite comparable with the arduino lib. Markus has removed the dim feature, and created an rgb object that handles the color. this means the demo functions from arduino don't quite work. i'm struggling round trying to adjust them and learn about it.

If you check the issues, he also showed me how to create the ws2812 object dynamically, which means that you can adjust the number of pixels after you have compiled. That advice will probably work with the adafruit lib too actually. This is great as now you can just deploy a set up and adjust the string length in a web page for example.

let me know how you get on.


Hi, thank you for your reply. I got it to work (see my previous post) using the 8266 Arduino source off Github (downloaded as a zip and compiled). During compilation it asked what version number to use so I gave it 1.6.1:

Code: Select all$ ant dist
Buildfile: /Users/durandal/Documents/Arduino/esp8266/Arduino8266 from source/Arduino-esp8266/build/build.xml

revision-check:
     [echo] Latest revision detected in shared/revision.txt is: 1.6.1
     [echo]                      Revision in BaseNoGui.java is: 1.6.1

dist:
    [input] Enter version number: [1.6.1]
1.6.1

revision-check:
     [echo] Latest revision detected in shared/revision.txt is: 1.6.1
     [echo]                      Revision in BaseNoGui.java is: 1.6.1

macosx-checkos:

subprojects-build:

compile:


After installing an updated JDK the compilation worked. I did have to modify the Esp_WS2812.h file, though, commenting out ESP.h and c_types.h (see my previous post) to avoid some compilation errors. Unfortunately I do not have a record of what these errors were since the output at the bottom of the Arduino window has since been erased.

I also checked out the alternative library you suggested, but did not give it more than a few attempts at fixing compilation errors. I may return to it later if this modified Adafruit library ends up being too constraining. Thank you for the help!
User avatar
By paulwb
#17191
kaoz3000 wrote:Hey,
now it works for me, with these easy steps:
    Install the official Arduino 1.6.4 from arduino.cc
    This has a new feature called "Board Manager"
    In the preferences put "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" into the "Additional Borads Manager URLs" (Discussed here: https://github.com/esp8266/Arduino/issues/13)
    Then add the ESP8266 under Tools > Boards > Boards Manager
    Choose the new Board
    The programmer "AVR ISP" worked for me.


Thank you for the suggestion! I'm afraid this did not work for me when I tried it. I did this last night in the middle of a blitz of activity to get something working, so unfortunately I don't remember exactly why it didn't work.