Hardware requirements
Mini USB cable
FRDM-KE02Z40M board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, you can see the similar information from the terminal as below.
I2C example – Read Accelerometer Value Found an MMA8451 on board , the device address is 0x1d . The accel values: status_reg = 0xff , x = -82 , y = -194 , z = 2058 status_reg = 0xff , x = -79 , y = -198 , z = 2055 status_reg = 0xff , x = -78 , y = -194 , z = 2057 status_reg = 0xff , x = -82 , y = -191 , z = 2058 status_reg = 0xff , x = -82 , y = -190 , z = 2057 status_reg = 0xff , x = -80 , y = -192 , z = 2059 status_reg = 0xff , x = -79 , y = -186 , z = 2058 status_reg = 0xff , x = -85 , y = -187 , z = 2050 status_reg = 0xff , x = -83 , y = -192 , z = 2048 status_reg = 0xff , x = -81 , y = -196 , z = 2054
End of I2C example .