Autore: jeremy ardley Data: To: dng Oggetto: [DNG] Fwd: Information request (maybe OT - - - dunno)
Personal reply that should have gone to list.
A couple of additional comments at end
On Fri, May 12, 2023 at 5:47 PM jeremy ardley via Dng
<dng@???> wrote: >
> On 13/5/23 03:43, o1bigtenor via Dng wrote:
>
> Greetings
>
> (Is this OT - - - - dunno - - - that's why the goofy label!)
>
> I am in the beginning throes of an embedded system (SoC, and/or
> microcontroller) design.
>
> Have been reading somewhat on the use of RTOS vs and OS (thinking
> perhaps FreeRTOS and Devuan). My initial problem is a weighing 'cell'
> where I'm weighing liquids being deposited in a 'jar'.
> (A second would be items deposited (and then removed in stages) from a
> 4 wheel cart.)
>
> You only need to use RTOS etc when you are doing actions that require repeatable millisecond timings across multiple threads of execution and with hardware interrupts.
Hmmmmmm - - - - (so I understand) does this mean that if I'm using
something driving servos or motors and (I think anyway) timings in the
range of 10ths
of a second with maybe the occasional foray down to 100ths of same
that an actual RTOS isn't really necessary? > Even then RTOS etc aren't absolutely required. For instance ArduPilot in the original form doesn't have any form of RTOS and instead relies on a cooperative apartment threaded model where each function advertises how long it will take to run and a scheduler function calls each in turn based on time slots.
Now this is fascinating - - - - very useful information.
(The mountain of things to learn just got bigger!!!!!!!!!!!!! - - - LOL) > For most use cases its easier to go the really simple route and use Arduino, or the slightly more complex route with a full Linux SOC using Raspberry Pi OS or Armbian or even Devuan.
Haven't seen many threads related to 'arm' systems but with a quick
look I see that it is a separate 'community' - - - - will need to look
into some more !!!! (Thanks!!) > The only issue is Arduino is reliable with multiple I2C devices while the Linux derived systems can have minor problems where an I2C interface is done in software. Conversely Arduino requires a lot of effort on communication protocols of any complexity.
>
> An option can be to use an Arduino for low level control under command of a Linux based SOC board.
That's the plan at the moment.
Just trying to use the microcontroller to its maximum first - - - - grin!!!
(Flogging the mule to get max output - - - - LOL)
Thanking you for your time and suggestions!!!!!!!!
----------------
The other prospective technology is ESP32 which can use the Arduino IDE
and libraries. It has a built in WiFi capability so external command and
control is easy. Plus it's dirt cheap!
With your application I'd suggest using an Arduino or ESP32 and write a
series of functions to deal with each device or interface on a round
robin basis. Then have a mainline that just loops over each function at
maximum speed. If you choose peripheral devices that use I2C, or
one-wire, or SPI you will find plenty of libraries code already written.
Literally, once you have bought the parts you can have an app running in
an afternoon