Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

AvaloniaUI can also utilize framebuffer to run on Raspberry PI, see https://docs.avaloniaui.net/docs/guides/platforms/rpi/runnin...


Wow, I would have never discovered this and I work full time with .NET, and have experience with Avalonia! It's just that I normally don't look for Pi-related stuff there, rather heading to Python as a clear de facto Pi language and libraries. Really cool to see this kind of niche being carved out by .NET and Avalonia! Too bad it's generally easier to get I/O boards to work out of the box on Python, with high level drivers and libraries often already written. .NET of course also has its way to interface but you'll likely end up doing it on a lower level due to the lack of drivers. There _are_ drivers but not as many and it's more likely to end up with more generic GPIO pin reading/writing libraries.


Well, there are a lot of efforts to make C# / .NET suitable for raspberry projects.

NativeAOT is on the way, so that you can compile small binaries without any dependencies.

If that does not work, you can compile your project as "ReadyToRun" with "Trimming", which will treeshake all unneeded runtime stuff and prepare an acceptable small binary.

One way to overcome the problem with missing drivers is to setup a python API (e.g. Flask) and triggering things through the Avalonia UI. Or you could wrap a binary execution via CliWrap, an excellent library for .NET to run external processes.

I once wrote a little eventhub[1] to run on the Raspberry PI, it is just an experiment but worked ok.

There is also .NET IoT[2], which exactly targets these platforms.

1: https://github.com/sandreas/eventhub/tree/main/eventhub

2: https://dotnet.microsoft.com/en-us/apps/iot


I've replaced an industrial windows workstation with PI + Avalonia in a factory. Way more compact, you don't have to care about Windows anymore. Is the PI industrial grade? No, but we have a spare PI ready, and SSD with preinstalled OS. So you can fix everything in a matter of minutes.

Although I had to rewrite the software, because the original was WinForms, it was a pretty simple application.


I’ve used this in production. It’s great.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: