Jump to content

Why don't you use an RTOS instead of Arduino?

Most people here reading the Hobby Electronics category have some sort of knowledge of Arduino or other environments (e.g. MicroPython) for MCU programming/development.

 

What are your reasons for choosing Arduino over a real thread operating system (RTOS) like Zephyr, FreeRTOS, RT-Thread or MBed?

 

People never go out of business.

Link to comment
Share on other sites

Link to post
Share on other sites

I'm assuming you're talking about the software environment only, and not the actual Arduino microcontroller.  

 

If you NEED a true real-time solution, you aren't using an Arduino.  If you don't need something specific, the Arduino software environment is stupid-easy to learn and implement.  

 

The best description of Arduino use I've heard is that you can get better, you can even get cheaper in some cases, but the amount of effort you need to put in to make the alternatives work the same just don't make sense unless you need specific functionality (like actual real-time processing).  An arduino is a known, inexpensive, quantifiable entity when you're working on projects with unknown risks. 

CPU: Ryzen 5 5600X  | Motherboard: ASROCK B450 pro4 | RAM: 2x16GB  | GPU: MSI NVIDIA RTX 2060 | Cooler: Noctua NH-U9S | SSD: Samsung 980 Evo 1T 

Link to comment
Share on other sites

Link to post
Share on other sites

59 minutes ago, LapsedMemory said:

If you NEED a true real-time solution, you aren't using an Arduino. 

Disagree with this. To provide an example:

Two LEDs blinking at a different speed and pattern. With an RTOS run two processes/task and be done. Arduino either program it using two hardware timer and IRQ or include a software timer library.

 

59 minutes ago, LapsedMemory said:

but the amount of effort you need to put in to make the alternatives work

TL;DR The entry barrier is to high?

 

Did you personally tried switching (once or multiple times) from Arduino to an RTOS and gave up in the process/returned to Arduino?

 

 

People never go out of business.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, FlyingPotato_is_taken said:

Disagree with this. To provide an example:

Two LEDs blinking at a different speed and pattern. With an RTOS run two processes/task and be done. Arduino either program it using two hardware timer and IRQ or include a software timer library.

You haven't disproven my point.  2 blinking lights are not an application where a true real-time solution is required.  It's not even an application where parallel processing is required.  It provides a simpler program, certainly, but it's not required.  

 

Also, your example is giving the impression that you seem to equate parallel processing with real-time processing.  The two are completely different concepts. 

 

Also, a true real-time operating system can take longer to run single-thread code due to the overhead it needs to maintain to respond to new data in real-time.  

 

1 hour ago, FlyingPotato_is_taken said:

TL;DR The entry barrier is to high?

 

Did you personally tried switching (once or multiple times) from Arduino to an RTOS and gave up in the process/returned to Arduino?

For my qualifications, I've spent 24 years programming everything from Motorolla HC11s, Arduinos, FPGAs, HMIs, PCs, and several industrial motion controllers and PLCs.  

 

What I mean when I say the barrier to entry is too high, it is purely a comparative statement.  For $20 I can get an Arduino Nano with a full dev environment that I can just wire to power and IO, grab a few pre-built software packages and be on my way actually working on my project.  For simple projects, even if the programming is a bit more complicated, it's hard to beat that design-to-prototype return on investment. 

 

What hardware are you putting RTOS on? How long are you spending integrating that hardware?  

CPU: Ryzen 5 5600X  | Motherboard: ASROCK B450 pro4 | RAM: 2x16GB  | GPU: MSI NVIDIA RTX 2060 | Cooler: Noctua NH-U9S | SSD: Samsung 980 Evo 1T 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, LapsedMemory said:

2 blinking lights are not an application where a true real-time solution is required [...]  It provides a simpler program, certainly, but it's not required.  

RTOS are for more than just real time solution. The point it is makes development simpler and faster in my opinion but yet it is for a lot of people not a tool they take advantage of.

15 years ago you had to pay significant money for the resources "wasted" by the RTOS-overhead. These days even a 8 cent MCU has enough resources to run a lightweight RTOS. A "full" version can run on chips as low as $0.25.

 

1 hour ago, LapsedMemory said:

What hardware are you putting RTOS on? How long are you spending integrating that hardware?  

RT-Thread is click and run on a decent selection of MCUs so writing a board definition/BSP isn't an issue. Similar somebody has likely already written the BSP for Zephyr for a particular devboard or MCU.

 

$20 devboard? Get an STM32F103 Nucleo.

My personal favourite is the HMI Board RA6M3 as it has everything a quick and dirty project might need on board.

 

1 hour ago, LapsedMemory said:

grab a few pre-built software packages and be on my way actually working on my project.

Similar repositories exists for those projects. e.g. https://packages.rt-thread.org/en/index.html

There is also RT-duino that is supposed to be some sort of combability layer to Arduino: https://github.com/RTduino/docs

People never go out of business.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×