Author Topic: Is mbed like Arduino ?  (Read 6717 times)

0 Members and 1 Guest are viewing this topic.

Offline ez24Topic starter

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Is mbed like Arduino ?
« on: December 02, 2016, 07:07:06 pm »
This is from a topic I posted on a mbed course:

Quote
I was under the impression it (mbed) was a lot like Arduino where it's a nice idea and great for tinkering, but a really bad idea to use to launch real products with (so far as hidden functions and inefficiencies).

I do not know anything about mbed but I keep think of trying to learn something about MCUs using mbed.  I know it is a good idea because of the online IDE and compiler but is this true about mbed ?
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4068
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Is mbed like Arduino ?
« Reply #1 on: December 02, 2016, 08:07:34 pm »
Mbed provides the same api for several platforms. And serves you advanced stuff like filesystems and internet.
It had an IDE in web browser, which downloads an .bin for mass-storage bootloader.

It's comparable to Arduino, except mbed is only for 32 but ARM while Arduino covers more platforms.
Mostly AVR 8 bit though, which is fairly limited in what is can do without much optimizing.

When you're advancing you can download your projects into an local ide, such as keil or others.
And they open sourced the library, but this is rather high level abstraction code which is hard to follow.

So yes, it provides the same beginners level. But is more versatile to grow with.
« Last Edit: December 02, 2016, 08:11:08 pm by Jeroen3 »
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Is mbed like Arduino ?
« Reply #2 on: December 02, 2016, 09:06:19 pm »
Ah, so I was pretty much exactly right. That was my quote from the other thread. I win! ;)
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Is mbed like Arduino ?
« Reply #3 on: December 02, 2016, 09:24:42 pm »
Ah, so I was pretty much exactly right. That was my quote from the other thread. I win! ;)

Um, now that you have satisfied your ego you can start to actually use mBed and you will discover that the actual experience is very far from an Arduino :)

Especially when documentation, community and support are concerned. Also the complexity is an order of magnitude higher, IMO, once you go beyond blinking a LED or servicing a button. That doesn't mean it is bad, only that there is much less handholding and safety net compared to the Arduino tools and libraries while you are dealing with much more complex hardware compared to the typical 8bit Arduinos.*

So saying it is the same kind of thing is a tad oversimplified - like comparing a regular train and a Shinkansen. Well, both are trains ...


* Yeah, I know that there are also the 32bit ones and what not, but they "dumbed down" to the 8bit level complexity by abstractions and pretty much nobody uses them, because they are so expensive.
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Is mbed like Arduino ?
« Reply #4 on: December 02, 2016, 09:55:01 pm »
Um, now that you have satisfied your ego you can start to actually use mBed and you will discover that the actual experience is very far from an Arduino :)

Ugh. That's not going to be nearly as fun :\

I signed up for the week of webinars covering mbed. We'll see. I think it's going to be too high level for how I like to code, but I'm curious if it would be at all possible to take components like file system or USB or Bluetooth and modular add them to my non-entirely-mbed projects.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Is mbed like Arduino ?
« Reply #5 on: December 03, 2016, 01:17:17 am »
This is from a topic I posted on a mbed course:

Quote
I was under the impression it (mbed) was a lot like Arduino where it's a nice idea and great for tinkering, but a really bad idea to use to launch real products with (so far as hidden functions and inefficiencies).

I do not know anything about mbed but I keep think of trying to learn something about MCUs using mbed.  I know it is a good idea because of the online IDE and compiler but is this true about mbed ?

Any time you use a library, you have to wonder 'who wrote this thing?' and 'did they have any idea how it should be done?'.  Some libraries are better than others.

The online IDE works well.  You can, if you wish, rip the entire project to your local machine (including libraries) and use any other enviroment that supports the language (based on GCC) and the device.  I have done it with Rowley Crossworks and everything worked fine.

You really don't want to write your own network stack if you can avoid it.  The mbed stack is based on the very well establish lwIP stack.  The only thing the mbed folks did was add the device driver.  It is plug-and-play but you have to use it in a super-loop.  Examples abound!

The original mbed, the only one I have used, is a 96MHz LPC1768 32bit ARM with Ethernet and USB capability.  It has 512k of Flash and 32k of RAM plus another 2 banks of 16k of RAM.
https://developer.mbed.org/platforms/mbed-LPC1768/

The average Arduino is a 16 MHz 8 bit AVR with no Ethernet or USB.  It has 32k Flash and 2k RAM (ETA: Arduino UNO)

In concept,both systems hold your hands, if you need it.  You can use their libraries if you wish or you can deal directly with the hardware.

There is a downside to losing some of the mbed IO ports due to a lack of pins in the 'stamp' arrangement.  If you did a bare board, you could have all of the pins but you would lose the bootloader feature.

Performance wise, there is no comparison between the Arduino (think Yugo) and the mbed (think Ferrari).  But when I want something down and dirty, the Arduino is laying on my bench.  Go figure...

« Last Edit: December 03, 2016, 05:11:28 pm by rstofer »
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Is mbed like Arduino ?
« Reply #6 on: December 03, 2016, 01:29:37 am »
Ugh. That's not going to be nearly as fun :\

I signed up for the week of webinars covering mbed. We'll see. I think it's going to be too high level for how I like to code, but I'm curious if it would be at all possible to take components like file system or USB or Bluetooth and modular add them to my non-entirely-mbed projects.

Well, you will see. If you are not fluent in C and familiar with the hardware, you will probably struggle. mBed is higher level and papers over some nastiness of the underlying vendor libraries, but you pay for that by it implementing the lowest common denominator of functionality. So a lot of capabilities your chosen chip could do won't be accessible from mBed without getting  hands dirty and using the vendor libraries or poking registers directly.

Arduino is a lot more complete from this point of view, but that is mainly because the ATMegas are so simple MCUs with few peripherals. Any of the ARMs supported by mBed have 10x as many peripherals, registers and advanced functions and only minimum from that is exposed by the mBed libraries.

Re reusing the USB or network stacks - you can always use the vendor libraries, all that mBed does is a simplified wrapper over those. E.g. for STM32 they use ST's HAL libraries under the hood.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Is mbed like Arduino ?
« Reply #7 on: December 03, 2016, 05:24:54 pm »
Janoc has a point:  Where are you on the coding capability scale?  Embedded programming, at the chip level, is fairly complex work.  Mostly, it requires a LOT of reading.
I don't think you'll have a problem with the Webinars, it's not like they are graded.  Even if you are just beginning, you will be exposed to a lot of concepts.  You might not retain the details but at least you'll know there is a topic worth discussing.

If this is your very first attempt at embedded programming, I might recommend the Arduino simply because everything that can be done with the chip has been done.  Multiple times!  There are projects all over Google.

The mbed also has a lot of projects out in the ether and you can certainly use the demo code from the web site.  But things get a little more complicated when you want to work with the hardware directly.  My big mbed project started out with the requirement for interrupt driven SPI input.  There was no library code for handling the NVIC (interrupt controller) but I had previous ARM experience with the LPC2106 and LPC2148 so it wasn't a stretch.  I wanted to use the reserved RAM for input and output buffers.  That takes a little trick with the C compiler to specify a physical address for the beginning of the buffer.  But there's 32k of dedicated memory and I needed all the buffering I could get.  Although the solutions are trivial, getting there took a bit of effort.

I like the web based IDE for the mbed and I absolutely hate the Arduino IDE.  For the Arduino, I like using the free version of Microsoft Visual Studio (Community Edition) with the Arduino plug-in.
 

Offline EBRAddict

  • Contributor
  • Posts: 26
  • Country: us
Re: Is mbed like Arduino ?
« Reply #8 on: December 04, 2016, 03:05:15 am »
I like the concept of mbed but they could improve. Listing certified working peripherals on boards and screening libraries before promoting them in search results would be helpful.

For example the STM32 Nucleo board Ethernet ports are not supported by the mbed core library, yet they show Ethernet peripherals in the site documentation for the board.


 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: Is mbed like Arduino ?
« Reply #9 on: December 04, 2016, 04:00:43 am »
Quote
Listing certified working peripherals on boards and screening libraries before promoting them in search results would be helpful.
But ... THAT wouldn't be "Arduino-like" ?  :-)
 ::)
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Is mbed like Arduino ?
« Reply #10 on: December 04, 2016, 02:19:17 pm »
I like the web based IDE for the mbed and I absolutely hate the Arduino IDE.  For the Arduino, I like using the free version of Microsoft Visual Studio (Community Edition) with the Arduino plug-in.

The Arduino IDE is indeed terrible for anything beyond the very basic beginner stuff. The Platform.IO (http://platformio.org/ ) Atom-based IDE is much better not-only-Arduino editor if you don't want to go directly to Visual Studio. VS is quite overkill for Arduino, considering that you can't debug with it anyway and the editor isn't that great, in my opinion. VS also doesn't work on anything but Windows.

 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Is mbed like Arduino ?
« Reply #11 on: December 04, 2016, 02:23:29 pm »
Quote
Listing certified working peripherals on boards and screening libraries before promoting them in search results would be helpful.
But ... THAT wouldn't be "Arduino-like" ?  :-)
 ::)

No, but it would actually save you a ton of time.

This issue with many mBed boards having half-assed (at best) support is one of my largest pet peeves with mBed too. Many boards are certified as mBed compatible, but it means squat - it only guarantees that you will be able to blink a LED on it (sometimes not even that - e.g. when the mBed compiler hasn't been updated for the board before it has been released).

Usually you will find out that something isn't supported on your target board only when code doesn't compile or   doesn't work and you start digging through the forums.
 

Offline boost240

  • Newbie
  • Posts: 3
  • Country: ca
Re: Is mbed like Arduino ?
« Reply #12 on: December 13, 2016, 04:01:44 pm »
So basically, the mBed and Arduino platforms provide an API(premade libraries?) With functions that allow you to use the hardware without needing to know the nitty gritty details? So if I wanted to directly program to the bare metal with C I could? But I'd more or less be creating my own libraries functions to use the peripherals and such?  Thanks
 

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4068
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Is mbed like Arduino ?
« Reply #13 on: December 13, 2016, 05:09:40 pm »
Yes and yes.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Is mbed like Arduino ?
« Reply #14 on: December 13, 2016, 05:19:40 pm »
So basically, the mBed and Arduino platforms provide an API(premade libraries?) With functions that allow you to use the hardware without needing to know the nitty gritty details? So if I wanted to directly program to the bare metal with C I could? But I'd more or less be creating my own libraries functions to use the peripherals and such?  Thanks

Both mbed and arduino allow you to mix. Use libraries for some peripherals and your direct hardware access for others. I found this choice to be very handy on both eco systems.
 

Offline boost240

  • Newbie
  • Posts: 3
  • Country: ca
Re: Is mbed like Arduino ?
« Reply #15 on: December 14, 2016, 01:18:26 am »
Thank you, friends.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf