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

Image Helper Functions + Example #9

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

c0de-fox
Copy link
Contributor

@c0de-fox c0de-fox commented Jul 6, 2018

Taking some inspiration from the examples, here is a collection of functions that (as of right now) provide the following:

  • showPxl - Plain and simple, takes an image array (I call them Pixols) and shows it for a set amount of time
  • notifyPopupPxl - A "toast notification"
  • notifyScrollPxl - A "scrolling notification" or vertical marquee
  • scanChangePxl - A "scanline" or per-pixel transition animation between two Pixols
  • randChangePxl - A transition animation between two Pixols that randomly changes pixels from the first image to the new image

@chunkysteveo
Copy link

Nice!

This scrolls an image up into view,
and back down out of view after the delay
This will switch the display from one image to
another, one pixel at a time. The speed can be controlled via
the `anitime` argument.
This will scroll an image up into view, pause briefly (dlytime),
and continue scrolling upwards. This also takes a `loop` argument
that dictates how many times it should scroll
Introduce "Pixol" term to describe the resulting array
from converting an image file
This can be useful for using the same icon with a different color
to indicate various states
A simple animation to "blink" an image
This allows the animation to happen very quickly without consuming
all the resources while waiting for an approiate random number
The scrolling animations appear to have broken
in the second stage, where the image is scrolling out of view.
@c0de-fox
Copy link
Contributor Author

Now based on the current master branch.

This adds a struct that can be used to globally interact with the LEDs. Currently it defines an active state and custom RGB values.

randChangePxl has been fixed and given a massive efficiency boost.

This entire example can be loaded into your pixo-pixel to see most of the visual aspects.

@c0de-fox c0de-fox changed the title [WIP] Image Helper Functions Image Helper Functions + Example Oct 30, 2018
@chunkysteveo
Copy link

A very cool addition to the PIXOPixel and it's helped me a lot in how the pixels can be mapped etc. Just a question - where do you generate the RGB array from an image, from? Have been looking online and can't find a good resource to create the array? There's a lot that create the HEX codes, but can't find the {R,G,B} style? thanks.

@chunkysteveo
Copy link

SORRY, i'm a dumbass!! Just remembered Sean said about a python script that converts images to the array... and there it is in the root of the repo, woops! Great PR for the project though, may be worth nudging @hodginsa / @IdleHandsProject to pull these into the master..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants