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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
MEMS Sensors Evaluation Board
  • Products
  • Dev Tools
  • MEMS Sensors Evaluation Board
  • More
  • Cancel
MEMS Sensors Evaluation Board
Blog Using the XTRINSIC-SENSORS-EVK under Linux or Mac
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join MEMS Sensors Evaluation Board to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: parag0n
  • Date Created: 10 Sep 2014 9:38 PM Date Created
  • Views 722 views
  • Likes 0 likes
  • Comments 0 comments
Related
Recommended

Using the XTRINSIC-SENSORS-EVK under Linux or Mac

parag0n
parag0n
10 Sep 2014

A few months ago, Element14 sent me an XTRINSIC-SENSORS-EVKXTRINSIC-SENSORS-EVK kit to play with.  This is an MBED compatible evaluation board which includes an ARM processor, some new freescale sensors (MMA8491Q Accelerometer, MAG3110 Magnetometer and a MPL3115A2 pressure sensor), a capacitive touch panel, and an RGB LED. It is available from farnell for the bargain price of £19 including vat.

image

I plugged it into my main PC running Debian, but the MBED drive wouldn't show up so I couldn't use it.  I then tried it in my old macbook pro and had the same issue.  Then I decided to give up, and put it in a drawer somewhere.  I dug it out this evening to finally figure out what I was doing wrong, and have another go at getting it working.

 

After a bit of searching around, I couldn't find much information on the Sensors EVK itself, so I broke it down into its constituent parts, an XTRINSIC-SENSORS board that holds the sensors, and the Freescale FRDM-KL25Z microcontroller board, and googled the microcontroller board itself.

 

Victory!

 

After a bit of googling, I found this page, which has a section about how MBED have a new firmware out for the FRDM-KL25Z!

 

Its a pretty easy process to upgrade the bootloader, though you will have to hold your nose and borrow your grandma's windows computer to perform it!

  • Press and hold the button in between the two USB ports with both the USB ports unplugged
  • Plug a Mini USB cable into the USB port labelled SDA (its the one next to the little 10 pin connector
  • You should get a USB drive show up called BOOTLOADER.  For some reason this wont enumerate properly using Linux or Mac, which is why you have to use windows for this step
  • Let go of the USB port
  • Download the new bootloader file from http://mbed.org/media/uploads/sam_grove/20140530_k20dx128_kl25z_if_opensda.s19
  • Put the file onto the USB drive
  • Once it has finished copying, unplug it and plug it into your real computer
  • Hurrah, you now have a drive called MBED!

 

Your first program

 

Click the mbed.htm link on the MBED drive.  this will forward you on to the MBED online compiler (its pretty swish).  If you dont already have an account, you can register now.  If you do, just log in and the EVK will be linked to your account.

 

I modified the default 'Hello World' blink sketch to add a bit of test serial output to make accessing the sensors later on a bit easier:

#include "mbed.h"


DigitalOut myled(LED1);
Serial pc(USBTX, USBRX);


// Loop forever, flashing the red LED on for 2 seconds, off for 2 seconds
// send the string "Test" once per loop
int main() {
    while(1) {
        pc.printf("Test\r\n");
        myled = 1;
        wait(2);
        myled = 0;
        wait(2);
    }
}

 

On pretty much every MBED board with an onboard USB to serial adaptor, the pins USBTX and USBRX are configured to point to the serial port attached to it, which makes setting up serial very easy.  Paste the above code into mbed's code editor, save it somewhere, and press compile.  Assuming everything is configured right, you'll get a .bin file downloaded.  Drag this .bin file onto your MBED, then unplug and replug it if it doesnt reset itself.


Your board should reset, and the LED onboard will start flashing Blue and Pink.  I'm pretty sure the blue LED is on on purpose to show the sensor board is plugged in (as it only turns on when the sensor board is plugged in), but i'll check into that further later!

 

Now just open up your favourite serial terminal at 9600 baud and get your delicious text!

#> minicom -D /dev/ttyACM0 -b 9600
Port /dev/ttyACM0, 21:42:16

Press CTRL-A Z for help on special keys

Test
Test
  • Sign in to reply
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