element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
RoadTest Forum mbed road test - first impressions/what next?
  • Blogs
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 13 replies
  • Answers 2 answers
  • Subscribers 2568 subscribers
  • Views 1439 views
  • Users 0 members are here
  • RoadTest
  • mbed
Related

mbed road test - first impressions/what next?

romilly
romilly over 15 years ago

I was lucky enough to be selected for an mbed road test, and the mbed package arrived yesterday.

 

I'd read Riccardo Tinivella's excellent mbed review. Like him I found the product very easy to get going. The website suggests that you can get started in 60 seconds, and that's exactly how long it took me.

 

I use two PCs - a laptop running Windows 7 64-bit on an AMD processor, and a Linux workstation. Both systems drive the mbed happily. The combination of web-based development and filesystem-based programming is a stroke of genius. It completely bypasses the USB driver problems I've hit with other development products on my Windows machine.

 

The first project I had in mind for the mbed was a poor man's oscilloscope/logic analyser to help me debug the I2C boards I am working on at the moment. I needed something which would let me visualise the digital signals on the I2C bus, and if possible plot some analogue data as well.

 

It turned out to be really easy to implement. There's a lot of sample code on the mbed website. It's well organised, and it's easy to search. After a few minutes I was able to write formatted data to the mbed file system, including  digital and analogue inputs. I wrote the data out in csv format, and then displayed the results on my PC.

 

This is a (very simple) example of the sort of prototyping for which the mbed was created. I'm seriously impressed by mbed's ease of use and range of available libraries. I expect to use the mbed a lot for future projects.

 

For my main review, I'm proposing to port some code I wrote for the arduino using the I2c bus. It's a homebrew version of the microwriter keyboard, and drives an LCD display and an EPROM memory. From what I've seen so far, it looks as if the porting will be very straightforward.

 

Riccardo has already covered many of the questions people might have about the mbed. Is there anything you would like me to investigate for my review?

  • Sign in to reply
  • Cancel
Parents
  • romilly
    0 romilly over 15 years ago

    The mbed serial libraries are really easy to use. mbed has four serial uart ports available; three are connected to mbed pins, and one is available through the usb connection to your pc.

     

    The pc connection is useful for debugging. There are instructions for setting it up on Windows, Linux and the Mac. My heart sank when I saw that Windows requires a driver install, as I am running Windows 7 on a 64-bit AMD proccessor. I've had lots of driver problems in the past.

     

    No problem with the mbed driver, though. It installed quite painlessly. My pc serial connection shows up as com6, and is working perfectly.

     

    I'm interested in displaying graphic data from the mbed, so I took a look at the cookbook section on interfacing with Python. I'm going to explore using Python to plot data from the mbed, and I wanted to check that it's easy for a Python program to read the data that the mbed sends over the pc connection.

     

    The cookbook explains how to set Python up for serial communication. Once you've installed the pyserial package, all you need is a short program on the mbed and a few lines of Python on the pc.

     

    #include "mbed.h"

     

    Serial pc(USBTX, USBRX); // tx, rx

     

    int main() {
        pc.printf("Hello World!\n");
    }

     

    is all you need on the mbed.

     

    On the pc, my mbed shows up on com6, so I need to tell Python to open port number 5 image

     

    >>> import serial
    >>> s = serial.Serial(5)
    >>> line = s.readline()
    >>> print line
    Hello World!

     

    >>> s.close()

     

    image

    The pc connection is very useful, but you may also want to interface  with other devices. A few weeks ago I purchased C328 (COMedia) JPEG  Color Camera with UART Interface. Shinichiro Nakamura has just posted an mbed library for the camera, and I couldn't resist trying it out.

     

    A couple of days ago I got an mbed breakout board. It has an Ethernet connector, and I've been experimenting with the mbed HTTPServer. I'll report on that next.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • romilly
    0 romilly over 15 years ago

    The mbed serial libraries are really easy to use. mbed has four serial uart ports available; three are connected to mbed pins, and one is available through the usb connection to your pc.

     

    The pc connection is useful for debugging. There are instructions for setting it up on Windows, Linux and the Mac. My heart sank when I saw that Windows requires a driver install, as I am running Windows 7 on a 64-bit AMD proccessor. I've had lots of driver problems in the past.

     

    No problem with the mbed driver, though. It installed quite painlessly. My pc serial connection shows up as com6, and is working perfectly.

     

    I'm interested in displaying graphic data from the mbed, so I took a look at the cookbook section on interfacing with Python. I'm going to explore using Python to plot data from the mbed, and I wanted to check that it's easy for a Python program to read the data that the mbed sends over the pc connection.

     

    The cookbook explains how to set Python up for serial communication. Once you've installed the pyserial package, all you need is a short program on the mbed and a few lines of Python on the pc.

     

    #include "mbed.h"

     

    Serial pc(USBTX, USBRX); // tx, rx

     

    int main() {
        pc.printf("Hello World!\n");
    }

     

    is all you need on the mbed.

     

    On the pc, my mbed shows up on com6, so I need to tell Python to open port number 5 image

     

    >>> import serial
    >>> s = serial.Serial(5)
    >>> line = s.readline()
    >>> print line
    Hello World!

     

    >>> s.close()

     

    image

    The pc connection is very useful, but you may also want to interface  with other devices. A few weeks ago I purchased C328 (COMedia) JPEG  Color Camera with UART Interface. Shinichiro Nakamura has just posted an mbed library for the camera, and I couldn't resist trying it out.

     

    A couple of days ago I got an mbed breakout board. It has an Ethernet connector, and I've been experimenting with the mbed HTTPServer. I'll report on that next.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • Jorge_Garcia
    0 Jorge_Garcia over 15 years ago in reply to romilly

    Hi Romily,

     

    Great Review on the Mbed.

     

    I'm gonna go a little off topic and ask if you know any good references for learning Python. I here a lot of engineers use it to make guis or perform calculations and I wanted to check it out.

     

    I'm a decent C programmer ( I use it for microcontrollers), and I thought it might be good to learn a second language.

     

    Keep up the awesome review and thanks.

     

    Best Regards,

    Jorge Garcia

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • romilly
    0 romilly over 15 years ago in reply to Jorge_Garcia

    Hi Joe,

     

    Thank for the feedback. I'm enjoying my experiments with the mbed, but I've been worried that I am posting too much. Good to know that you're getting value from the review.

     

    I learned Python from a mixture of sources. I bought Mark Lutz's book (Learning Python) early on. It's ok but not outstanding. I learned most by trying to do stuff, Googling when I got stuck and asking friends for help. On which note - feel free to ask me if you decide to learn and have any questions. I'm romilly(dot)cocking(at)gmail(dot)com.

     

    Python has a lot going for it - it's my favourite scripting language, and I've tried a few image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jorge_Garcia
    0 Jorge_Garcia over 15 years ago in reply to romilly

    Thanks Romily,

     

    I'll let you know if I hit any snags.image

     

    Best Regards,

    Jorge Garcia

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • romilly
    0 romilly over 15 years ago in reply to romilly

    image

    The mbed comes with ethernet support built-in. You'll need a magjack or equivalent to connect your mbed to a network.

     

    I used the mbed workshop breakout board from Cool Components, which has a magjack ethernet connector, along with USB ports and a micro SD memory card slot. Maybe Farnell should stock it!

     

    The mbed cookbook includes an implementation for an HTTP Server.

     

    The server can serve hard-coded content, which is useful for testing, but it can also handle rpc calls and serve files. If you combine the webserver with the mbed's ability to write files to its flash-based file system you can do neat stuff.

     

    To test this out, I wrote a simple graphic logic analyser. It waits for activity on the circuit under test and then captures samples every microsecond to memory. When it has enough samples, it writes out an svg file and starts up a web server to display the result.

    image

     

    On the right you can see it monitoring the I2C bus of an

    arduino driving an LCD display. The program is under 90 lines long.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • danteo
    0 danteo over 15 years ago in reply to romilly

    Great!!!

     

    The ideea and the solution too.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gbrettell
    0 gbrettell over 15 years ago in reply to romilly

    Very cool!

     

    Your code is well written, too.

     

    Thanks for the post.

     

    Gregory

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube