-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware SPI not working #415
Comments
Try this. GPIO13 = MOSI ALSO ALSO : Make sure the GND going to your LED's share the GND going to the ESP.
|
I'll try SCK. I'm using the 74AHCT125 for level shifting. The sparkfun guide says 14 is spi clk. It may be an error in their documentation: https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/hardware-overview |
I think it is 14. I cant remember. I dont have it hooked up right now. I had it working using those constants though. edit: |
@iamthemadz did you use this constructor:
If you use the one in your example, it'll use those pins but bitbang instead of using the SPI library. |
Ah, no. I only tried the other constructor. |
I think this line in the CPP file of the Lib is your problem:
|
replace with: #ifdef ESP8266
SPI.setFrequency(8000000L);
#else
SPI.setClockDivider((F_CPU + 4000000L) / 8000000L); // 8-ish MHz on Due
#endif |
The above change seems to do something... but not what I expect. The lights turn on, but are extremely dim and after all the lights turn on, only the first LED changes colors (the others turn off). |
Check your power supply.. I had all kinds of problems with a 0.5A supply that I thought would be plenty enough for a couple of LEDs but it wasn't.. |
from Adafruit's site: "Estimate up to 60 milliamps peak for each pixel at full brightness white." |
Is fixed? |
There was no feedback for one month since the last two suggestions, so I On Thu, Jul 23, 2015, 23:55 Kevron Rees notifications@github.com wrote:
|
Thanks everyone for this advice. With the above SPI modification to the DotStar library, everything works great! It actually works fine without a level shifter, APA102s are fairly tolerant when it comes to signal voltage, it would seem (and the first LED shifts the voltage for subsequent ones). To recap, I connect CLK to pin 14 and DATA to pin 13, after applying the above patch to AdaFruit_DotStar. |
I'm using adafruits dotstar library with a dotstar strip. Using hardware SPI doesn't seem to work with their example: https://github.com/adafruit/Adafruit_DotStar/blob/master/examples/strandtest/strandtest.ino
To test, change example data/clock pins to 13 and 14. run. Bitbanging SPI should work. A simple volt meter on pin 13 will read 3.xx volts. To fail, change:
to
This will tell the library to use the SPI library instead of bitbanging. When probing via volt meter, no voltage is read. Lights do nothing.
The text was updated successfully, but these errors were encountered: