Avatar for George

George

Member since Jul 2018 • Last active Dec 2018
  • 3 conversations
  • 36 comments

Most recent activity

    • 58 comments
    • 804 views
  • in Interfacing
    Avatar for George

    May I ask what the thought is, not using SPI? Are we still attempting to solve why is the first Neo green here?

    Yes, I am trying to solve this issue and another one at the same time: the second line of Neopixels is connected to a pin with no hardware SPI on it. Running a data line from the end of one line of LEDs to the beginning of another one feels terrible. This is why I am trying to workaround hardware SPI usage.

    What we've got now: The LEDs are not damaged, even the first one (which is always green when controlled by Espruino). When I poke a wire from Arduino to Neopixel's data line everything works perfectly. But Arduino is 5v.

    @Gordon, could you please tell me where can I find the code for the F405? I couldn't find it in Espruino sources. Is it outside of Neopixel lib or even deprecated?

  • Avatar for George

    Hi, I am supporting Espruino on Patreon, but I don't have patreon sign under my avatar as others do. Is this because of different emails here and on Patreon? How accounts are being matched?

  • in Interfacing
    Avatar for George

    The LEDs are fine. I connected data line to Arduino and launched Adafruit's Neopixel demo sketch. Everything works beautifully.

    I don't think SPI is the only way to run Neopixels with STM32. Basically, SPI is sending 4x more data at 4x more speed to mimic the LED's protocol. Does Espruino allow controlling a pin with a CPU directly with tiny timings, like: "set HIGH to the pin, wait for 450 nanoseconds, set LOW etc.." or it is a too low-level task?

  • in Interfacing
    Avatar for George

    Yay! We are getting somewhere, guys!)

    But there is an issue with the first LED. Its green part always turns on no matter what color I set it to. When I reset the board all LEDs turn off, but when I turn them off manually by sending zeros, first always stays green. In the picture, I made a red to green gradient, you can see that first color is wrong.

    @Gordon, the clock is fine, the problem was with the Neopixels soldered upside down. There was a misleading dot in the corner of every LED's footprint. I matched it with the notch of each LED but turned out that dot indicated power pin. When I replaced all the LEDs (they all burnt), the af_opendrain method worked. I just need to figure out the first LED's issue.

  • in Interfacing
    Avatar for George

    It indicates the number of shots done. That's why I'm making 10-digit nixie display :D

  • in Interfacing
    Avatar for George

    How can I check the clock settings?

    Looks like I damaged one pin on my STM32 which was responsible for the Neopixel control. Now I'm left with the B6 pin, which is still alive but does not have SPI. Can I implement Neopixels protocol without the lib, using only CPU and hardcoded timings? I know that vanilla STM32 can do it. Is it possible on Espruino?

    I ordered new STM32's and I just want to localize the problem while they are being delivered.

  • in Interfacing
    Avatar for George

    @Gordon, could you please clarify one moment for me? Espruino Neopixel API reference says the following:

    If I remove my transistor, connect STM32's pin directly to Neopixels's data and add a pull-up resistor to 5V there, then set this pin to af_opendrain mode and run
    require("neopixel").write(B5, [255, 255, 255]);
    It should work, right?

    I have tried this and it didn't work. I begin to suspect that I accidentally burned the LEDs...

  • in Interfacing
    Avatar for George

    @allObjects, yeah, the fix @MaBe posted is really interesting, but not suitable in my case.

    I am using IN-18 tubes made in USSR. I was lucky enough to find them on some weird site (like craigslist but Russian). They are not that common, but still possible to find. They were sold for 25$ each, so I bought all the lamps that guy had! My treasure. This box was sealed in 1981.




Actions