Author Topic: Life after mBed and the next step from Arduino  (Read 279 times)

0 Members and 1 Guest are viewing this topic.

Offline SteveThackeryTopic starter

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: gb
Life after mBed and the next step from Arduino
« on: September 03, 2024, 11:29:52 am »
I've developed loads of stuff - "contraptions" - in Arduino, but want to further extend my skill set and learn new stuff.

A few years ago I took the advice of Tim Wilmshurst, who was a colleague of mine and is the author of several books on microcontrollers, and he advised going to ARM mBed. I was never that impressed by the mBed world, for reasons which are probably irrelevant, but I did make one device using it (an audio flanger). Recently ARM announced end-of-life for mBed, which I think is a wise decision.

However, it was a valuable experience; mBed was much more "grown up" than Arduino, and probably more like a professional product, so the experience wasn't wasted.

So, like many people, I am asking myself, "Where next after Arduino?"  Yes, I realise this is a frequent question, but the answer changes as time goes by.

Like most people in my position I want an integrated development environment that lets me write, load and debug my code. I want my code to be able to talk directly to the hardware, but also work one layer up from that using a comprehensive set of libraries. I want to be able to write stand-alone programs, and also to write programs that run under a real-time OS such as FreeRTOS. I am up for learning the new skills and disciplines necessary.

Because I'm only an Arduino hacker I realise that the list I've just given is itself incomplete (the bootstrap problem: I don't know enough to know what I want). Feel free to add to it or tear it apart.

At the moment I only have eyes for the Pi Pico 2. This is because it seems to have a very professional and comprehensive infrastructure supporting it. The documentation is thorough and is in native English (not translated). Also, it's a British company so I like the idea of supporting them in my small way. Importantly, the Pico 2 platform is remarkably cheap and is probably more than powerful enough for any application I could think of.

So, is Pi Pico 2 the best Arduino++? What other platforms should a person wanting to graduate from Arduino consider?
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4226
  • Country: nl
Re: Life after mBed and the next step from Arduino
« Reply #1 on: September 03, 2024, 12:12:09 pm »
There are several choices to be made here.

1) What IDE suits me best?
Many have their own preference and mine is version 8.2 of Netbeans. It allows me to do what I want. Have not looked any further since, but maybe I should. A search for available IDE's can be done and will show things like Eclipse, Visual Studio, etc.

2) What is it that I want my hardware to do for me?
This is more of an issue. There are so many different MCU's to be found and also many and many different applications to be thought of.
For instance, do you need a display, and if so what kind of display. Do you need a wireless connection, and if so what type of wireless. Wifi, bluetooth, etc.

The new RPI Pico 2 sounds very nice, although somewhat unobtainable for cheap. Mostly sold out. But ask yourself what am I going to do with the two ARM cores and the two Risk-V cores. Often a single core is already sufficient for a certain job.

Moving on from Arduino could be seen as evaluating your needs and interests and do more real research than just looking at some how to youtube videos and copy what they made.

Or you can do as some of us do, buy every different MCU board you can find and play with them. I have all sorts of boards from STM32 based, ESP32 based, RPI Pico, AVR based, etc. Testing can initially be done with the Arduino IDE and framework, but after that it is basically bare metal what I do.

Read the datasheet and reference manual, look online to find some bare metal coding examples to learn from if needed, and go from there to write up your own system.

Using a real time OS can be handy at times, but there you also have to ask yourself if it is really needed. Often you can do without.

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10175
  • Country: nz
Re: Life after mBed and the next step from Arduino
« Reply #2 on: September 03, 2024, 12:36:10 pm »
I would recommend visual studio code.
Watch some youtube videos and set yourself up a project, maybe stm32 or something.
Get the debugging working
Get intellisence working

Some other things that are not all that interesting but are important to understand to some degree
- Understand enough so you can work with either makefiles or cmake.
- Understand enough about Linker scripts to get by
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4226
  • Country: nl
Re: Life after mBed and the next step from Arduino
« Reply #3 on: September 03, 2024, 03:06:12 pm »
...

- Understand enough about Linker scripts to get by

Yes that is a good point. For the more sophisticated MCU's that have memory scattered over the address range you need to know how to set these up in the linker script and how to use the ranges in your code.

As an example, for some actions you want to use the core coupled memory because it is faster. For this you have to tell the compiler and linker about the existence of this memory. In the linker script you define sections and in the code you use __attribute__((section("xxxxx"))) to assign something to the section in question. "xxxxx" needs to be replaced with the name of the section you gave it.

Offline SteveThackeryTopic starter

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: gb
Re: Life after mBed and the next step from Arduino
« Reply #4 on: September 03, 2024, 05:47:44 pm »
The new RPI Pico 2 sounds very nice, although somewhat unobtainable for cheap. Mostly sold out. But ask yourself what am I going to do with the two ARM cores and the two Risk-V cores. Often a single core is already sufficient for a certain job.

You raise a good point. It does kinda seem wasteful to use a device with two ARM cores for many hobby projects, although the unit price is so cheap it is more of a philosophical objection than a rational one.

There is an argument that more processing power often means more energy consumption, so a lower power device might be better for battery powered applications. On the other hand, power management is improving all the time, and the Pico 2 (for example) has better low power modes than the original.

Come to think of it, a basic Arduino Micro Pro has enough processing oomph for many of my projects from times past.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4226
  • Country: nl
Re: Life after mBed and the next step from Arduino
« Reply #5 on: September 03, 2024, 06:05:11 pm »
You raise a good point. It does kinda seem wasteful to use a device with two ARM cores for many hobby projects, although the unit price is so cheap it is more of a philosophical objection than a rational one.

True, and for what it is worth I was not considering price. I have 9 Pico boards in my stash with 2, 4 and 16MB of FLASH, which often is also a bit of a waste, so much FLASH space.  :)

But for audio synthesis both the extra core and a lot of memory for samples can be beneficial. Just bought a bunch of 16MB PSRAM chips for a project with a PCM1808 ADC and a PCM5102 DAC module to do some effects. For now just to play around a bit. No chiselled in stone ideas yet.

There is an argument that more processing power often means more energy consumption, so a lower power device might be better for battery powered applications. On the other hand, power management is improving all the time, and the Pico 2 (for example) has better low power modes than the original.

Also true but a lot of what I do is wall powered so not much of an issue. Did make a wireless remote control system but even running at 72MHz the consumption is somewhere in the range of 30mA. Can run quite some time on a bunch of batteries.

Come to think of it, a basic Arduino Micro Pro has enough processing oomph for many of my projects from times past.

Yep, the simple AVR based MCU's can do quite a bit. Even synthesis. The only drawback at the moment is the price being higher than a lot of the more powerful MCU's.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf