K
K
katangawise2020-08-22 21:02:32
linux
katangawise, 2020-08-22 21:02:32

Is a .NET Core app working with sensors the right way?

How to properly implement the following architecture:

A computer with Ubuntu Desktop 18.04 on board
Loading a .NET Web API application (.NET Core 2-3 is not important)
The same application reads data from various sensors, controls a couple of servos, etc.

An example of architecture is shown in the figure:
5f415d933f292259609729.png

How to organize all this correctly?

My version is to start the timer when loading the application and do all this work with pieces of iron in the callback.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-08-22
@firedragon

I would just write to files and read from them.
ls /dev
and man for each device.

R
Roman, 2020-08-23
@yarosroman

Application is when colored paper is cut out with scissors and the pattern is assembled with glue.
I would break the application into 2 parts, the service that actually collects the data, and the webapi itself. Working with the equipment is unknown how time will go, and web requests have a time limit, of course it can be made large, but this is not it. And the interaction can also be done through sockets or through dbus.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question