Integrate MPL3115A2 into FRDM-KL46Z

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
MattMM
 
Posts: 4
Joined: Sat Sep 26, 2015 4:47 pm

Integrate MPL3115A2 into FRDM-KL46Z

Post by MattMM »

I recently purchased the MPL3115A2 sensor from adafruit and am trying to integrate it into my Freescale FRDM-KL46Z. I am new to adafruit and freescale products and coding. I was able to write some basic code to get a number of my choice to display on the freescale LCD, but I need help with the code needed to display the MPL3115A2's altitude on the FRDM-KL46Z's LCD. Do you know where I can find some sample code for Kinetis Design Studio to accomplish this? Thanks in advance.

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: Integrate MPL3115A2 into FRDM-KL46Z

Post by Franklin97355 »


User avatar
MattMM
 
Posts: 4
Joined: Sat Sep 26, 2015 4:47 pm

Re: Integrate MPL3115A2 into FRDM-KL46Z

Post by MattMM »

Thank you for your prompt response. I will give this a try later today and will let you know the outcome.

User avatar
MattMM
 
Posts: 4
Joined: Sat Sep 26, 2015 4:47 pm

Re: Integrate MPL3115A2 into FRDM-KL46Z

Post by MattMM »

When I compile the code from the link I get the following errors:

C:\workspace.kds\ALT\Debug/../Sources/MAG3110.c:26: undefined reference to `E14_SelectSlaveDevice'
./Sources/MPL3115A2.o: In function `MPL3115A2_setup':
C:\workspace.kds\ALT\Debug/../Sources/MPL3115A2.c:14: undefined reference to `E14_SelectSlaveDevice'
./Sources/main.o: In function `main':
C:\workspace.kds\ALT\Debug/../Sources/main.c:87: undefined reference to `E14_SelectSlaveDevice'
C:\workspace.kds\ALT\Debug/../Sources/main.c:90: undefined reference to `E14_SelectSlaveDevice'
C:\workspace.kds\ALT\Debug/../Sources/main.c:120: undefined reference to `accel_interface_raw'
C:\workspace.kds\ALT\Debug/../Sources/main.c:130: undefined reference to `mag_interface_bh'
C:\workspace.kds\ALT\Debug/../Sources/main.c:136: undefined reference to `pres_interface_bh'
C:\workspace.kds\ALT\Debug/../Sources/main.c:140: undefined reference to `sw_count'
C:\workspace.kds\ALT\Debug/../Sources/main.c:140: undefined reference to `t_count'

How and where do I define these tags?

User avatar
MattMM
 
Posts: 4
Joined: Sat Sep 26, 2015 4:47 pm

Re: Integrate MPL3115A2 into FRDM-KL46Z

Post by MattMM »

I figured out the E14_SelectSlaveDevice error. I had to generate the PE code for that method.

I don't have that same board that your link shows all I bought from you guys is the little MPL3115A2 sensor on its breakout board. here is the link to what I bought:
https://www.adafruit.com/product/1893

How do I wire this to the FRDM-KL46Z board?
How do I know if I'm actually communicating with the MPL board?

I currently have it wired to the J3 I/O header as follows:
MPL Terminals FRDM terminals
GND J3-14
3vo J3-4
SCL (thru a 330 ohm resistor) J3-3 (PTE19/LCD_P58/ADC0_DM2/ADC0_SE6A/SPI0_MISO/I2C0_SCL/SPI0_MOSI)
SDA (thru a 330 ohm resistor) J3-5 (PTE18/LCD_P57/ADC0_DP2/ADC0_SE2/SPI0_MOSI/I2C0_SDA/SPI0_MISO)


Thanks in advance for your help. It is greatly appreciated.

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: Integrate MPL3115A2 into FRDM-KL46Z

Post by Franklin97355 »

How do I wire this to the FRDM-KL46Z board?
That would be a question you should ask on the Freescale site, we don't have and don't know the FRDM board.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”