LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview with Arduino eHealth shield

Hello everybody,

I'm also trying use some sensors for eHealth shield (you can look some extra information in http://www.cooking-hacks.com/ehealth-sensors-complete-kit-biometric-medical-ardu ino-raspberry-pi). In my case, I use serial communication. I used LVFA_Base but I had got a lot of problems (communication errors like 5002 or 5003). I tasted it without eHealth shield and it works right, I think that the problem is eHealth shield isn't compatible with LVFA_Base and, in my opinion, the solution could be change some things in the firmware. Does anybody know how can I do it or have any information about that (examples, tutorials...)?

Thank you for your help!

0 Kudos
Message 1 of 7
(6,817 Views)

Having that shield attached shoudn't affect the operation of LIFA.  What exactly did you try to do when you ran LIFA while having the eHealth board attached?

0 Kudos
Message 2 of 7
(4,556 Views)

I'm doing a project of an Intelligent Bed using a normal arduino sensor of humidity and three specific sensors those operate with an arduino eHealth shield. I also like to control it by an Scada made by Labview.

This is my program for the sensors:

code.png

I know that I have to compile LIFA to communicate Arduino MEGA with Labview so, normally I execute this code before run in Labview. I recorded a video with the steps:

I checked that: if I put eHealth shield LIFA doesn't work (error 5002 due to a bad communication) but without eHealth shield humidity sensor works without mistakes, so I suppose I have to modify the firmware for my eHealth shield and its sensors and I tried to do like this:

firmware modificada.png

I think the program isn't right and I have got problems with syncLV(); checkForCommand(); sampleContinously(); I don't know how to solve or modify LIFA because I am not a Computing Engineer I only know about Automatics and Electronics so I would be very happy for all big or small help.

(Sorry for my English isn't so good and it's difficult explain all this for me in other language)

0 Kudos
Message 3 of 7
(4,556 Views)

There are a few things that have not been done correctly here.  The first thing is that you cannot change the name of the file that you are using (it must remain "LIFA_Base.ino"; copy the entire "Firmware" folder to somewhere and use that folder for your new version of the firmware).  Also, when you want to compile LIFA, you must have all LIFA files open at the same time (in the tabs).  This should be done automatically when you open LIFA_Base.ino through the Arduino IDE.

Second, you don't want to put that code in the "loop" function.  It must be in a function within the architecture of LIFA (in the checkForCommand() function that is in LabVIEWInterface.ino).  I.e. you need to create a a custom function.  I started doing this by duplicating a function that was similar to what I wanted and made sure that the duplicated function worked normally.  Then, I started changing the code to do what I wanted to do.

0 Kudos
Message 4 of 7
(4,556 Views)

Ok, thank you very much!!

I will change the wrong things and I'll try to learn something about custom functions. Do you know any interesting website or that sort of things that explain how to do that? That sounds a little difficult...

Thank you, you helped me a lot! 

0 Kudos
Message 5 of 7
(4,556 Views)

There is no tutorial.  That is why I suggest duplicating an existing function and giving it a new command number first.  Every function in LIFA is thus an example.  It might take some time and testing to fully understand it but once you get it, you'll realize it's not that difficult.  I often forget somet things but simply look at the existing functions to re-learn them.

0 Kudos
Message 6 of 7
(4,556 Views)

Ok, thank you very much!!

0 Kudos
Message 7 of 7
(4,556 Views)