Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Conversation

@pelikhan
Copy link
Member

@pelikhan pelikhan commented Jul 22, 2023

Support for driving programmable LEDs.

  • monkey patching client to support a pixel buffer
  • automatically fallback on simulator support for longer strips
  • jacdac-docs support
  • LedDisplay support: LED as an image
  • TODO: @mmoskal native driver for LEDs
  • fix verification issue with samples?
  • documentation, samples

The jacdac-docs is already deployed and the mainled.ts works in the simulator.

@pelikhan pelikhan requested a review from mmoskal July 22, 2023 10:37
@pelikhan pelikhan merged commit 19d603b into main Jul 23, 2023
@pelikhan pelikhan deleted the ledserver branch July 23, 2023 17:03
* @param startColor
* @param endColor
*/
export function fillGradient(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these fills and rainbows should be methods on the PixelBuffer, otherwise they are rather hard to discover

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to avoid to turn pixelbuffer into a monster

* Create a color buffer that allows you to manipulate a range of pixels
* @param numPixels number of pixels
*/
export function pixelBuffer(numPixels: number) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this probably should be PixelBuffer.alloc() to follow Buffer.alloc()

if (this._gamma) correctGamma(r, this._gamma)
b = r
}
// TODO: render b to hardware
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmoskal this is the part missing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants