Arduino Nano vs. mbed LPC1768

I am a beginner. Which one should I buy? Is Arduino easier to program?

Arduino Nano:

Microcontroller: Atmel ATmega328 Operating Voltage (logic level) 5 V Input Voltage (recommended) 7-12 V Input Voltage (limits) 6-20 V Digital I/O Pins 14 (of which 6 provide PWM output) Analog Input Pins 8 DC Current per I/O Pin 40 mA Flash Memory: 32 KB of which 2 KB used by bootloader SRAM: 2 KB EEPROM: 1 KB Clock Speed: 16 MHz

mbed LPC1768 Development Board:

  • Convenient form-factor: 40-pin DIP, 0.1-inch pitch
  • Drag-and-drop programming, with the board represented as a USB drive
  • Best-in-class Cortex-M3 hardware: o 100 MHz ARM with 64 KB of SRAM, 512 KB of Flash o Ethernet, USB OTG o SPI, I2C, UART, CAN o GPIO, PWM, ADC, DAC
  • Easy-to-use online tools: o Web-based C/C++ programming environment o Uses the ARM RealView compile engine o API-driven development using libraries with intuitive interface

Very interesting is, that MBED has built-in Ethernet - for Arduino you have to buy the Ethernet Shield. We cant compare SRAM and FLASH MEMORY sizes - too different. Unfortunately I am not a C/C++ programmer, so I think this becomes fatal.

Prices from ( ): Arduino Nano: £34.00 mbed LPC1768: £39.00

  • So their price is almost the same..

There is one bad thing with MBED - it has On-line compiler, so when you don’t have an internet connection you can’t do anything … :-/

Unfortunately I am not a C/C++ programmer, so I think this becomes fatal.

The Arduino is programmed in C/C++, too.

Arduino has free IDE, and lots of open and free code here and everywhere.

The LPC1768 is new, and Cortex-M3 is ORDERS OF MAGNITUDE more complex, fewer libs, even fewer people who know how to debug, etc. Decent Cortex Compilers/IDE are very expensive $$$. Rowley Crossworks is like $1500 US for a commercial lic.

Sure they have a personal lic for $150, but you cannot make any money with it.

Choose Arduino, you will be happier.

Is Arduino easier to program?

you bet it is! the simplest and best choice for a beginner! you will be off with your first program even before you read through the getting started guide for anything else ;)

First off, any such decision hinges primarily on the question 'what do you want to do with it?'. So before you dive in you should probably figure that one out, people on this board will be better able to give you advice. You say you are a beginner, but does this mean that you have absolutely zero experience? Do you know c/c++? Do you have some electrotechnical experience? What is your background?

Also, this is an Arduino board to naturally you will get many pro-Arduino opinions. Allow me to Provide you with my $0.02, as a software engineer with moderate experience in embedded systems. Arduino's are great as a cheap, standard platform. I use my Arduino Mega for just about anything that needs quick wiring up to a computer (wiimote, GPS receiver, stuff like that). I also use it as a primary target for testing generic embedded software (JVM for instance), because it's just extremely convenient and it has a metric fuckton of easily accesible I/O pins, as well as a nice range of shields (LCD being the most useful for me). Arduino comes with an IDE that allows you to program it, but I never use it, so I can't comment on how well it works. It has its own language, which some people like I guess, and a ton of libraries to drive all the peripherals. I suggest you have a look at it before you commit to buy. Personally I just write all my stuff in C which works just as well.

Now, talking processing cores, if you can program in C/C++ you aren't fixed to any platform as you can just use whatever chip you like as long as there's a decent compiler for it. In terms of compiler support you'll probably want to go for either ARM or AVR, as both have excellent and mature GCC ports. MSP430 has great electrical characteristics (power consumption) but lacks coherent GCC support (trust me on this, we are in a world of pain here with these new msp430x chips, and older models only go up to ~48-60k program flash depending on RAM size). Some like PIC18, but they are mostly EE guys who don't have to program the f*ckers, as there is no decent, free compiler for it and the official one is a joke (inb4 shitstorm from PIC18 fans:P).

So assuming you go for either ARM or AVR, there's a whole range of boards you can play with. Here's some I like:



The futurlec stamp boards are nice for breadboarding, but may require external programmers, so make sure you get those too if you're ordering. The LPCExpresso boards are a combination of a JTAG and MCU board that you can separate by cutting the PCB (nice). The teensy boards are really cool as they are USB slave devices, so you can program them to act as a HID device (i.e. joystick, keyboard, mouse), mass storage, etc.

Finally, the programming part. As I said, if you know C/C++ you can just pick any of these boards depending on their characteristics (speed, memory sizes, I/O, etc). Prepare to download and wade through datasheets though, to figure out how to drive the I/O pins and whatnot. For AVR there's avrlib (although the download seems to be broken, I have a copy somewhere if you want it). Arduino makes all of this simple for you by wrapping it in easy-to-use libraries, which makes it easier to get something simple working quickly.

My advice to the absolute n00b, assuming he/she wants to learn about embedded systems, is to get an Arduino. Use the Arduino IDE just to get your feet wet, try a couple of simple things like hooking up a potentiometer to a servo, and then quickly move on to programming in C/C++. An Arduino Mega is 24 pounds these days on ebay ( If form factor is an issue, get a pro or teensy.

A big thanks to Inopia and all you people who answered me!

I have read a book about C-language for beginners and made some examples. I definitely choose Arduino. BTW: I have done java programs for VELLEMAN K8055. This board cant be programmed but it allowes access to external devices. I recently made a web interface to it.

Having played with both Arduino and the mbed LPC1768, I think this is an absolute tie.

  • The Arduino libraries are more mature but the GUI isn't great; the mbed libraries currently already make programming of quite a number of functions as easy as Arduino and the online environment is quite reasonable, being more like an IDE and closer to the IDE;s people may eventually move to as they progress.

  • Arduino environment can be used for programming off line; for mbed it is not very difficult to set up an off-line ARM toolchain but you then do miss the libraries until someone figures out how to still link them in (the .o and .h files are available in the svn).

  • Some Arduino's need additional interfaces or have the clonky big USB connector mbed has the mini USB interface integrated

  • Arduino environment integrates the compile and serial upload steps; mbed shows up as a USB drive so you just drag and drop your compiled .bin file onto the mbed and restart it

  • Some Arduino's brings out more general IO lines; mbed brings out more serial options included CAN, 2x I2C, 2x SPI, 3x serial, and USB, while still having a reasonable number of general IO / PWM lines. Quite a number of these serial lines can also be used for general IO if not used for serial.

  • mbed support forum is still small but quite responsive.

I think the choice between the two really comes down to what the longer term goal is.

If the goal is just learning a bit of programming and hardware interfacing, then cost and number of generaly IO lines may be the deciding factor. Remember to factor in possible additional interfaces needed for some Arduino boards.

If the longer term goal is a complex project which requires higher throughput or number crunching or for which you definitely want the USB, Ethernet or CAN bus capabilities, or otherwise know you will end up in an ARM environment, go for the mbed but consider also playing around with an offline compiler toolchain and thus properly learning to work with GNU C/C++.

Personally I like the mbed better and expect it will give Arduino a big challenge once the environment has matured a bit more, but I'm ending up with both as I will be using the Arduino Mini Pro's for hardware interfacing / abstraction / port expansion reading various sensors and controling ESCs, servos, and camera functions. I will be communicating with those intelligent peripheral groups over serial lines using the mbed for the coordination and number crunching. The programming environments are close enough to not make that a big deal.

Very interesting is, that MBED has built-in Ethernet

Well, sort of. It has an ethernet MAC and PHY; it's missing some magnetics that may or may not be absolutely necessary. Getting more "real" requires adding a asort of daughter board that will tanks the price up a bit.

As I now have both, I can probably give a good answer.

The Arduino is the better device for hobby, fun and beginner projects. The dev environment is more mature, offline and quicker to get up an running.

I have an mbed simply because I needed some serious number crunching in a project. If Arduino made an ARM board I would have got that and been happy to keep using the Arduino dev environment, using my existing source code.

Also this:

I have compiled a few programs for the LPC1768 and find all of them much larger than comparible Arduino programs.

For example a program that reads a BMP085 is 24K.

A program that synchronizes the real time clock with an NTP source is 80K.

I was attracted by the numerous interfaces specifically almost built in ethernet, real time clock, CAN, etc.

Any one have comparisons?

Increased size is a bit irrelevant since memory is also increased (64 KB of SRAM, 512 KB of Flash !!) I wouldn't expect that the mbed development environment even tries to optimize program size; I bet they don't have the equivalent of the garbage-collecting of unused functions that arduino uses to good effect.

Westfw - I agree.

I was trying to find out if increased code size nullified speed advantage.

I like the transformer isolation of the ethernet jack.

The mbed is completely uninteresting as long as it is tied to that proprietary web site compiler thing. No way. Don't get your code locked to someone else's web site!

Why would you say the mbed is tied to the on-line compiler?

GCC is freely available and supports the ARM Cortex-M3 core. Eclipse provides a decent IDE for GCC.

If the "bootloader" is a simulation of a USB storage device then loading code seems pretty easy. It sounds mostly like an exercise in setting up the linker script and perhaps formatting the binary such that the ARM will recognize and load it into FLASH for execution.

I guess if you have to have the peripheral libraries then you are tied.


GCC with mbed along with CMSIS peripheral library.