jgarff / rpi_ws281x

Userspace Raspberry Pi PWM library for WS281X LEDs
BSD 2-Clause "Simplified" License
1.77k stars 622 forks source link

Java wrapper class for this lib #205

Closed konsultaner closed 6 years ago

konsultaner commented 7 years ago

Hey! Thank you for your great work! I currently try to build my own wordclock using the NaoPixels. I wrote a Java-Wrapper for your library. Maybe you want to link my project with the hint of an existing Java Wrapper.

jgarff commented 7 years ago

Awesome! Thanks. That's great. One question however as I'm wondering why you needed to use the gpio_alt.c code. I believe with the right defines, this should be taken care of by the ws281x library itself. Maybe I'm missing something.

konsultaner commented 7 years ago

@jgarff Oh, I didn't know that. I followed the instructions from the adafriut website, where they described how to bring audio to the Pi Zero. I did not go into detail with the ws281x lib at this point.

marcuscraske commented 6 years ago

I've managed to do this using swig: https://github.com/limpygnome/build-tv/tree/master/libs/neopixel-ws281x-lib

mattjlewis commented 6 years ago

FYI another Java Wrapper (using JNI): https://github.com/mattjlewis/diozero/tree/master/diozero-ws281x-java

mbelling commented 6 years ago

I was looking for a java wrapper for this and came across this issue. I looked at the solutions proposed here and liked the SWIG approach. That solution however was embedded in a larger project, so I decided to take that concept and create my own standalone library based on it. I also used some code to load in the generated .so file, as well as a convenience bash script to build that .so file remotely. The source for my library can be found here: https://github.com/mbelling/rpi-ws281x-java.

I also pubished an initial version to maven central, so build tools like maven and gradle can pull it in: http://search.maven.org/#artifactdetails%7Ccom.github.mbelling%7Crpi-ws281x-java%7C1.0.0%7Cpom

Gadgetoid commented 6 years ago

@mbelling since you seem to have the most recent and standalone Java wrapper, would you care to bring it under the rpi-ws281x umbrella to draw more attention and, hopefully, ongoing contributions to it?

See: https://github.com/jgarff/rpi_ws281x/issues/267

It would live under here: https://github.com/rpi-ws281x

hackerjimbo commented 6 years ago

I've also got a Java wrapper for the library. Sounds like we should swap notes and consolidate! Check out https://github.com/hackerjimbo/PiJava/tree/master/Jimbo/Devices/WS2811

On 19/04/18 11:20, Philip Howard wrote:

@mbelling https://github.com/mbelling since you seem to have the most recent and standalone Java wrapper, would you care to bring it under the |rpi-ws281x| umbrella to draw more attention and, hopefully, ongoing contributions to it?

See: #267 https://github.com/jgarff/rpi_ws281x/issues/267

It would live under here: https://github.com/rpi-ws281x

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jgarff/rpi_ws281x/issues/205#issuecomment-382685273, or mute the thread https://github.com/notifications/unsubscribe-auth/AGxky6v6n3kVWDfr1MGOXtcUcVKhBEDVks5tqGTzgaJpZM4OLVXQ.

mbelling commented 6 years ago

@Gadgetoid I'd be happy to. I have not moved a project before, so I'll probably need to read up on how I go about doing that. I'll see if I can get some time soon to push what changes I have locally at home and work on moving it over.

penfold42 commented 6 years ago

@gadgetoid https://github.com/rpi-ws281x/rpi-ws281x-java

Gadgetoid commented 6 years ago

I think all Java discussion should now move to the Java repository, so I'll close this Issue for the time being!