New EEL Element - Problem

Hi Nick,

Thank you for your message. I copied it wrongly here, but it is ok with 2 points in the source code as:

//#include “…/app_src/atmosphere_platform.h”
#include “…/atmo/core.h”
//#include “…/gpio/gpio.h”

Still giving the same error.
Thanks,

Alejandro

It looks like this text message at the forum converts … to … for some reason. I just pasted and sent it in the previous message with this problem.
THanks,

Alejandro

Headers

Hi,

You must include atmosphere_platform.h, not core.h.

Can you upload your eel so I can take a look?

Nick

Hi Nick,

Sure, I am sending it to you attached to this email.

THanks,

Alejandro

(Attachment button.eel is missing)

Hi Nick,

The forum does not allow me to send attachments as new user. How can I send it to you ?
Thanks,

Alejandro

You can upload it as a public GitHub gist and put the link here.

Nick

1 Like

You could also just send the .atmo file of the project you’re having issues with. The eel will be in there, and you should be able to upload an .atmo here. I think we need to add .eel to our filter.

Nick

1 Like

Hi Nick,

The forum does not allow me to upload any file at all.
I could upload to github:

Thanks,

Alejandro

Alejandro,

I was able to get it to compile with a NXP Rapid IoT project after fixing two things:

  1. #include "../app_src/atmosphere_platform.h in your header. You have it commented out. That’s all you need. Your header should look like:
#ifndef _ATMO_BUTTON_H_
#define _ATMO_BUTTON_H_

#include "../app_src/atmosphere_platform.h"

typedef struct {
    ATMO_DriverInstanceHandle_t gpioDriverInstance;
    ATMO_GPIO_Device_Pin_t button1Pin;					// Type definition for a device pin
} ATMO_button_Config_t;

// Funtion Prototypes go here:

bool ATMO_button_Setbutton1State(bool isOn);

#endif
  1. Your ability code for setbutton1Off is incorrect. You are calling ATMO_buttonClick_Setbutton1State instead of ATMO_button_Setbutton1State.

Here’s a link to the fixed EEL: https://gist.github.com/nick-atmosphereiot/5f94552cff4ff1f73fad890e8a3cd477

-Nick

1 Like

Hi Nick,

I have made the changes you suggest and I could make it work. Thank you !
I did this button.eel as a first attempt. My goal is to use the IC 5933 which has I2C to communicate with the mcu. The code already works on arduino but porting it to IoT Studio looks very hard as it is difficult to debug it.
Thanks again.

Best,

Alejandro

Alejandro,

The easiest way to do this is to create a simple EEL, export the embedded source, then open the source with Arduino IDE and debug in there. Once you get something that works, put those source files back into your EEL.

-Nick

1 Like

Hi Nick,

I will try that. Wich Arduino IDE compiler would you recommend ?
Thank you.

Alejandro

Alejandro,

Can you rephrase? I’m not sure exactly what you’re referring to.

I would recommend just downloading the latest Arduino IDE from the Arduino site, then opening your project in there. We support the Arduino Mega, so I would recommend that as your target board for development.

-Nick

Hi Nick,

Ok ! I was looking for another compiler, but Arduino should suffice. Also, does Atmosphere IoT take C++ libraries ? I am looking to convert my header and cpp file in Arduino to Atmosphere.

Thank you.

Best,

Alejandro

Alejandro,

Atmosphere IoT EELS are C only.

-Nick

1 Like

Hi Nick,

I am trying to fit my .h and .C files into the EEL’s files. I just wonder if after modifying all my functions following ATMO API Definitions suffices. Since my goal architecture is NXP Rapid IOT I am trying to compile in MCUXpresso.

Thank you for your help.

Best,

Alejandro

Alejandro,

It all depends on the specific of the EEL you’re trying to implement. Can you provide more information?

-Nick

Hi Nick,

Basically I would like to use Analog Devices AD5933 with IoT studio. AD5933 is a very versatile impedance analyzer that has been around for several years now. I have the libraries provided by the manufacturer at:

The challenge for me is to convert that into an EEL element and it is pretty hectic.
Thank you.

Best,

Alejandro

Alejandro,

It should be as simple as replacing their I2C calls with Atmosphere I2C Driver calls, and you can replace any instances of their printf with ATMO_PLATFORM_DebugPrint.

-Nick