dotnet / iot

This repo includes .NET Core implementations for various IoT boards, chips, displays and PCBs.
MIT License
2.12k stars 574 forks source link

Add SSD1309 Device using non-traditional SPI #2316

Open AdamJSchofield opened 1 month ago

AdamJSchofield commented 1 month ago

Adds support for SSD1309 displays such as this one. Datasheet for the SSD1309 available here.

These transparent displays have many potential applications but the coolest is mini volumetric displays like this one (not my video).

Implementation Notes:

Sample Notes: Included is a sample simulation for falling sand. It looks pretty cool on the transparent OLED I tested with. My 4-core RaspberryPi Zero 2 was able to maintain 45 FPS without dropping frames. Rendering to a SkiaSharp bitmap is the bottleneck. Much faster speeds are possible with a large buffer or by using a 2D byte-array as the render state instead of drawing to a BitmapImage.

If desired, a PreRenderBitmap method could be added to the GraphicDisplay base class allowing for the Ssd1309Simulation class to be extended for many other displays.

Microsoft Reviewers: Open in CodeFlow
AdamJSchofield commented 1 month ago

@dotnet-policy-service agree

joperezr commented 1 month ago

@AdamJSchofield I noticed you marked this as work in progress and it is still a draft. Is this ready for review though? Is there anything we can do to help making it ready for review?

AdamJSchofield commented 1 month ago

@AdamJSchofield I noticed you marked this as work in progress and it is still a draft. Is this ready for review though? Is there anything we can do to help making it ready for review?

Hi! I have since got it working and am putting together a final draft of the PR with a working example in the samples project for RaspberryPi boards. I hit a small snag last night but I expect I'll be able to push that up and mark it ready for review in the next few days.

I'm also happy to close this PR/issue and open a new one when its actually ready if that helps you all stay organized. I jumped the gun a bit but I've since worked out most of the kinks. I may do that anyway since the nature of the PR will be more of a contribution with documentation and less of a cry for help 😆

joperezr commented 1 month ago

Great to hear you have got it working now! No need to close this PR, we just need to mark it ready for review once you are ready, and then we can jump and take a peek 😃

AdamJSchofield commented 3 weeks ago

Hi @joperezr @pgrawehr - I've marked this as ready for review. Let me know what you think!

Ellerbach commented 2 weeks ago

/azp run

azure-pipelines[bot] commented 2 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).