From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

!! Arduino Uno + HC-SR04 Ultrasonic sensor + labview Help!!

Solved!
Go to solution

Thanks egaruz89

I will try to do this with pdf, don't worry about spanish we are to close, I am Portuguese.

best regards

cpalha

0 Kudos
Message 11 of 72
(8,296 Views)

Hi RobWal, could you please post how do you get conect the file LABVIEWInterface.pde that was provided by egaruz89 with the library?

Best regards.

Screw

Pd. Sorry for my english, I am from mexico.

0 Kudos
Message 12 of 72
(8,296 Views)

hey guys.

i am getting an error while uploading "output" was not declared in the scope

???

0 Kudos
Message 13 of 72
(8,296 Views)

You'll need to make sure that you are running the same version of LIFA and Arduino IDE that was being used when the custom firmware was written to make sure that it will compile and work correctly.  Hopefully that is the only thing that is causing issues.

0 Kudos
Message 14 of 72
(8,296 Views)

How can I see the distance, the Indicator Array dont show me nothing :S

Message 15 of 72
(8,296 Views)

HI

When I was use to http://dl.dropbox.com/u/8067369/LabVIEWInterface.pde

apear this error
" LabVIEWInterface.ino: In function 'void processCommand(unsigned char*)':

LabVIEWInterface:109: error: 'Ultrasonic' was not declared in this scope

LabVIEWInterface:109: error: expected `;' before 'ultrasonic'

LabVIEWInterface:531: error: 'ultrasonic' was not declared in this scope

LabVIEWInterface:531: error: 'CM' was not declared in this scope  "

I was use to this "ultrasonic.h"
http://trollmaker.com/article3/arduino-and-hc-sr04-ultrasonic-sensor
what can I do???

the error "531" is this
"Serial.write( (ultrasonic.Ranging(CM)) ); "

0 Kudos
Message 16 of 72
(8,296 Views)

First, you cannot put that code there.  To use it with LIFA, you have to create a case for it in the switch and then create LabVIEW VIs to access the function on the Arduino.

Now to your question, in my experience those errors mean that the Arduino IDE is unable to find the .h file.  Generally, when I add non-standard libraries to Arduino I put them in the LIFA_Base folder.  If you are still getting "not declared" errors, you will want to make sure that the .h file gets opened with all the other files (it will be another tab).

Also, I don't see any library at the link that you posted.  I just see a basic implementation of the sensor.

Message 17 of 72
(8,297 Views)

HI

I  modify some thinks, and the  error was diferent this time:

"

LabVIEWInterface.ino:109:1: error: unterminated #ifdef

LabVIEWInterface.ino: In function 'void processCommand(unsigned char*)':

LabVIEWInterface:531: error: 'ultrasonic' was not declared in this scope "
and mark this paragraph " Serial.write( (ultrasonic.Ranging()) );"
how can I implementation a library?
I only follow the steps of  people

Sorry I can´t programer of "C" , I only can use Labview

What can I do?

0 Kudos
Message 18 of 72
(8,297 Views)

HI,
i have a question

which "ultrasonic.h" did you use, I try with diferent kind and the http://dl.dropbox.com/u/8067369/LabVIEWInterface.pde

Show me error of compilation
thanks

0 Kudos
Message 19 of 72
(8,297 Views)

you need to download the library "ultrasonic.h" for arduino, you can download on this page https://github.com/elrodri/Ultrasonic-HC-SR04, just add this library to arduino software and you can load the LabVIEWInterface.pde without problems, other thing that you have to do is, just have Arduino softeare open when you load the Lifabase

0 Kudos
Message 20 of 72
(8,297 Views)