Arduino Library Porting | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 4 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Arduino Library Porting
July 26, 2015
11:06 pm
Avatar
Mabuse
Member
Forum Posts: 3
Member Since:
July 26, 2015
sp_UserOfflineSmall Offline

Hi,

I am currently evaluating the compiler to see whether it fits my purpose or not, before buying it.

Right now I want to import an Arduino Library to the compiler, but I am failing hard...

Maybe someone can can find the mistake(s) I made.

The API VIs right now are only consisting of an Error In- and Output, but the compiler always states "Arduino function "***.lvllib:***" not supported.

 

I also tried just copying the Template, but as soon as I rename a VI (renaming leads to the same Error as before)

 

Thank you all for your attention

July 27, 2015
12:11 am
Avatar
filipealtoe
Admin
Forum Posts: 89
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Hello;

One thing that jumps at me by looking at your Translator.vi is that you missed placing the .h file inside brackets in the Includes definition array. If you open the Translator.vi for the Digilent Shield addon, which is the shipping example, notice how both include files are placed inside brackets <analogShield.h> and <SPI.h>.

I haven't tried your code, but as a suggestion, once you make the correction above, use the Arduino Code tool that is part of the compiler so you have access to the generated C code from your test VI, copy it and paste it in the Arduino IDE and make sure it compiles there. This is explained in details on the User Guide that is part of the User Manual.

Hope this helps.

Filipe

Cheers Filipe
July 27, 2015
1:43 am
Avatar
Mabuse
Member
Forum Posts: 3
Member Since:
July 26, 2015
sp_UserOfflineSmall Offline

Hi,

thanks for the reply.

The bracket did not change anything, I added them anyways, to avoid further mistakes.

 

Sadly i cannot create any C code, since the error pops up while creating the C code.

 

I tried to copy the whole Digilent Shiel Addon, but as soon as I change the name of the VIs (as well as the cases in the translate VI), I have the same problems as in my example. It cannot be exported to C code due to the VIs "not being supported" anymore...

July 27, 2015
1:46 am
Avatar
filipealtoe
Admin
Forum Posts: 89
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Oh, I missed that on your first post. Where did you save this library? The Arduino Code tool will only work if your library is saved inside the Addon folder, where the Digilent Shield one resides. Otherwise, the compiler will think it is a regular VI and will try to compile with the supported resources. Since it won't find your functions in the internal function dictionary, it will generate an error saying it is not supported.

Cheers Filipe
July 27, 2015
2:12 am
Avatar
Mabuse
Member
Forum Posts: 3
Member Since:
July 26, 2015
sp_UserOfflineSmall Offline

Thank you very much Filipe, that solved the Problem.

I did not know, that the files had to be placed inside the Addon Folder.

July 27, 2015
2:26 am
Avatar
filipealtoe
Admin
Forum Posts: 89
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Awesome. Good luck on your project!

Cheers Filipe
Forum Timezone: UTC 0

Most Users Ever Online: 33

Currently Online:
1 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

John: 18

RTSLVU: 15

Dan6077: 11

Member Stats:

Guest Posters: 0

Members: 80

Moderators: 0

Admins: 3

Forum Stats:

Groups: 1

Forums: 2

Topics: 58

Posts: 289

Newest Members: Travlissah, viktorIcera, HowardClouG, Dianecet, Produktnaodchudzaniex

Administrators: geadmin: 5, filipealtoe: 35, Steffan: 89