FRDM-STBC-AGM01: 9-Axis IMU
The FRDM-STBC-AGM01 is a development board for the NXP FXAS21002C 3-axis gyroscope and FXOS8700C integrated e-compass (3-axis accelerometer + 3-axis magnetometer)
FRDM-STBC-AGM01 - Hello World Program -Stream sensor data to cloud using AT&T M2X services
The Hello World program for FRDM-STBC-AGM01 is based on FRDM-K64F. It streams accelerometer, magnetometer and gyrometer data (every 3 seconds) from the FRDM-STBC-AGM01 sensor board to the cloud via AT&T M2X services.
FRDM K64F Description & Pinout
The Flagship FRDM-K64F has been designed by Freescale in collaboration with mbed for prototyping all sorts of devices, especially those requiring the size and price point offered by Cortex-M4®. It is packaged as a development board with connectors to break out to strip board and breadboard, and includes a built-in USB FLASH programmer. It's based on the Freescale K64F, with a 32-bit ARM Cortex-M4F core running at 120MHz. It includes 1MB FLASH, 256KB RAM and lots of interfaces including Ethernet, SPI, I2C, ADC, DAC, PWM, UART and other I/O interfaces
Step 1: FRDM-K64F FirmwareUpdate
A new interface firmware image is necessary to mbed-enable Freescale FRDM boards
Quick Start Guide
AT&T M2X Data Service
Step 2: AT&T M2X Data Service setup
As a next step , lets get setup AT&T M2X Data Service. You need to sign-up to start using the service.Follow these step by step instructions to get started.
After registering your device make a note of Device ID, Primary End point & Primary API Key. And create three streams for Accelerometer, Magnetometer & Gyroscope data with stream IDs "acc_rms, mag_rms, gyr_rms" respectively.
The above information have to be entered in the following lines of the main.cpp file in the Hello World Program.
char deviceId = ""; char streamAcc = "acc_rms"; char streamMag = "mag_rms"; char streamGyr = "gyr_rms"; char m2xKey = "";
(NOTE: If you use a different stream ID in the web page you should use the same in the program)
Step 3: Downloading and running the Hello World program
1. Save a program binary (.bin) to the FRDM Platform
Download the binary after compiling the Hello World program. Save the program binary file to your mbed Microcontroller Disk, just like you would with a normal USB disk. The Status LED will flash as the PC writes the file to the Microcontroller disk.
2. Press the Reset Button
When the Reset Button in pressed, the program on the mbed Microcontroller Disk will be loaded in to the Microcontroller FLASH memory. The Status LED will flash as this happens.
3. Stream Data!
The Microcontroller is now running the program; If you reset the Microcontroller, or disconnect and reconnect the power, the program will simply restart. Use serial terminal like putty and configure the corresponding serial port (Check Device Manager under Control Panel as shown in the figure below) for a baud rate of 9600. Press reset button on the board to start streaming data. (If you are seeing data being displayed in the serial terminal then connection with the cloud is established)
4. Check your AT&T M2X dashboard