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

0 Members and 1 Guest are viewing this topic.

Offline ez24

  • Super Contributor
  • ***
  • Posts: 3092
  • Country: us
  • L.D.A.
Is mbed like Arduino ?
« on: December 03, 2016, 06:07:06 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 ?
YouTube and Website Electronic Resources ------>  http://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 2923
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Is mbed like Arduino ?
« Reply #1 on: December 03, 2016, 07:07:34 am »
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 03, 2016, 07:11:08 am by Jeroen3 »
 

Offline jnz

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

Offline janoc

  • Super Contributor
  • ***
  • Posts: 2511
  • Country: fr
Re: Is mbed like Arduino ?
« Reply #3 on: December 03, 2016, 08:24:42 am »
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: 433
Re: Is mbed like Arduino ?
« Reply #4 on: December 03, 2016, 08:55:01 am »
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: 4941
  • Country: us
Re: Is mbed like Arduino ?
« Reply #5 on: December 03, 2016, 12:17:17 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 ?

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 04, 2016, 04:11:28 am by rstofer »
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 2511
  • Country: fr
Re: Is mbed like Arduino ?
« Reply #6 on: December 03, 2016, 12:29:37 pm »
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: 4941
  • Country: us
Re: Is mbed like Arduino ?
« Reply #7 on: December 04, 2016, 04:24:54 am »
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: 24
  • Country: us
Re: Is mbed like Arduino ?
« Reply #8 on: December 04, 2016, 02:05:15 pm »
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: 2691
  • Country: us
Re: Is mbed like Arduino ?
« Reply #9 on: December 04, 2016, 03:00:43 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" ?  :-)
 ::)
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 2511
  • Country: fr
Re: Is mbed like Arduino ?
« Reply #10 on: December 05, 2016, 01:19:17 am »
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: 2511
  • Country: fr
Re: Is mbed like Arduino ?
« Reply #11 on: December 05, 2016, 01:23:29 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" ?  :-)
 ::)

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 14, 2016, 03:01:44 am »
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
 

Offline Jeroen3

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

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6004
  • Country: us
Re: Is mbed like Arduino ?
« Reply #14 on: December 14, 2016, 04:19:40 am »
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.
Drain the swamp.
 

Offline boost240

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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf