Skip to content
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

Update node-pixel to have multistrip support #15

Closed
ajfisher opened this issue May 24, 2015 · 7 comments
Closed

Update node-pixel to have multistrip support #15

ajfisher opened this issue May 24, 2015 · 7 comments
Assignees

Comments

@ajfisher
Copy link
Owner

Update the strip opts to pass in an id and then use this to designate which strip you want to talk to.

@ajfisher
Copy link
Owner Author

Process:

  • Move ws2812 lib to work with an array of max 8 strips.
  • Update protocol to determine which strip you're referencing
  • Test with simple defaults.
  • Update nodejs side with different protocol version with multiple pins.
  • Test ability to specify length on demand

@ajfisher
Copy link
Owner Author

Protocol changes in cd16d67

@ajfisher ajfisher changed the title Update pixel.js to have multistrip support Update node-pixel to have multistrip support Aug 15, 2015
@ajfisher
Copy link
Owner Author

Multiple strips are now supported under the custom firmata structure. Next step is to test backpack version of all of this as well which should mostly work the same way too.

There are several things to note:

  • Max Strips is limited to 8 strips with 128 pixels on each one.
  • Each strip is a unique AF instance.
  • Due to issues with interrupts etc when you call show on any strip it will actually call show on any strips that are currently active.

The last point is to avoid blocking conflicts but causes its own problems. I will resolve this with a rewrite of the way the AF library is working.

To Do now:

  • Test ability to trim length dynamically (will speed up the process)
  • Make changes work with backpack set up
  • Test in a range of scenarios
  • Current bug in Uno where it works fine on a Mega...

Current status is at 6eb4a3a

@ajfisher
Copy link
Owner Author

Documentation and tests now complete - need to test backpack set up and then will need to test.

@ajfisher
Copy link
Owner Author

Refactor underway to make a better API interface. Multipin will now be a single strip per arduino on firmata side or backpack. This will provide a common interface and will eliminate the timing issues faced under multipin when multiple strips are in play and firmata is managing multiple messages with conflicts.

Strip constructor will define either a single pin or a set of pin / length objects in an array which will then set up appropriately on the firmata or backpack side. You can then reference them using the strip.pixel() method either as the actual pixel value itself of a column-row reference.

More details will go in the doc once I have it working,

@ajfisher
Copy link
Owner Author

ajfisher commented Dec 5, 2015

Current update:

  • Refactor of the lib has been complete. The AF neopixel library is no more in nodepixel.
  • New interfaces so you can define multiple strips of varying lengths on the one strip object
  • Allowance for different colour types (GRB, BRG, RGB) for each strip attached to the object

TODO:

  • Update all of the documentation to reflect this new approach
  • Update pixel.js to throw a warning on large size pixel number creation
  • Do some efficiency mods
  • Create new examples with different strips.
  • Update existing examples to use new forms of defining the strips.

@ajfisher
Copy link
Owner Author

ajfisher commented Dec 8, 2015

All components complete on this thread so closing out and begin final tasks for dropping back into master.

@ajfisher ajfisher closed this as completed Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant