Create an IoT app on Raspberry Pi using ASP.net

Ed Jobe 0 Reputation points
2023-04-01T19:12:26.5+00:00

Can someone with experience point me in the right direction? I want to create an IoT device using a Pi with a small touchscreen for a UI. Apparently you can’t use net to create a form on the pi, so it seems my only option is a web form. I don’t have much experience with Linux and python but I know windows and C#. I don’t have a lot of resources for learning ASP so can you help me with the bare minimum of what I need to learn to complete my project? I’m looking to just use the web server only on the pi as a gui.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
543 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,128 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sander van de Velde 29,271 Reputation points MVP
    2023-04-02T05:34:12.85+00:00

    Hello

    if you have more knowledge about C# than about ASP.Net, check out Blazor.

    Blazor is a web framework for building web UI components (Razor components) that can be hosted in different ways. Razor components can run server-side in ASP.NET Core (Blazor Server)...

    The programming model is quite easy for a non-web developer. I built a full website without touching one line of JavaScript.

    Here is a primer about running Blazor on Linux using a container. It is hosted in Azure IoT Edge.

    It is based on server-side Blazor so you can fully interact with what is happening on the device.

    You can even access the GPIO on the RPi.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

  2. Bruce (SqlWork.com) 56,931 Reputation points
    2023-04-02T16:02:58.9566667+00:00

    If you create a web app on the pi, then typically you will not use the touch screen but rather an external browser. You could install a browser on the pi to access the website.

    otherwise you need a gui library with c# binding support. Here is one

    https://credibledev.com/linux-c-net-gui-app-using-avalonia-ui/

    0 comments No comments