can any one please say how to convert the below arduino program to labview.
if can please attach the block diagram of labview program
int PWMpin = 10;
void setup()
{
// no setup needed
}
void loop()
{
int x = 1;
for (int i = 0; i > -1; i = i + x){
analogWrite(PWMpin, i);
if (i == 255) x = -1;
delay(10);
}
}
As this is an Arduino forum, why would you assume that members here know enough about Labview to help in converting Arduino code to Labview ?
You may be lucky because members here have a wide range of experience but it might be better to seek advice from a Labview forum and rather than posting the Arduino code describe what you want to do.
By the way, the code above will not work because PWMpin will default to being an input and it is being used as an output.
UKHeliBob:
By the way, the code above will not work because PWMpin will default to being an input and it is being used as an output.
http://www.arduino.cc/en/Reference/AnalogWrite (emphasis mine)
You do not need to call pinMode() to set the pin as an output before calling analogWrite().
My apologies for any confusion.
vinothkrishnan:
can any one please say how to convert the below arduino program to labview.
if can please attach the block diagram of labview program
int PWMpin = 10;
void setup()
{
// no setup needed
}
void loop()
{
int x = 1;
for (int i = 0; i > -1; i = i + x){
analogWrite(PWMpin, i);
if (i == 255) x = -1;
delay(10);
}
}
You cannot convert to LabVIEW, because LabVIEW knows nothing about the Arduino's hardware.
I suggest you look at LINX if you insist on using LabVIEW with the Arduino.
If you don't want to use LINX, then write your own LabVIEW client program to communicate over serial with the Arduino's server sketch.