If Statement HELP!


to measure distance.

and i'd add , if statement, can following.

if (value of pin 7 < 50cm)
{
output pin 6 = high
}
.

how can above in arduino?

bassam

quote
if (value of pin 7 < 50cm)
{
output pin 6 = high
}


try this:

code: [select]
if (analogread(7) < 50)
{
digitalwrite(6, high);
}


lefty


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > If Statement HELP!


arduino

Comments