user49065: output not declaired.anyone please help me to fix this problem
int const trigpin=10;
int const echopin=9;
int const buzzpin=2;
void setup() 
{
  {
  Serial.begin(9600); 
 }
  pinmode(trigpin,output);
  pinmode(echopin,input);
  pinmode(buzzpin,output);
}
void loop() 
{
  long int duration,distance;
  digitalwrite(trigpin,high);
  delaymicroseconds(1000);
  digitalwrite(trigpin,low);
  duration=pulsein(echopin,high);
  distance=(duration/2)/29.1;
  Serial.print(distance);
  Serial.println("CH");
  if(distance<=50)
   {
    digitalwrite(buzzpin,high);
   }
   else if(distance>50)
   {
    digitalwrite(buzzpin,low);
   }
   delay(60);
}


user47961: To be used in the pinMode function (note capital M), it needs to be all capitals, ie OUTPUT.
From a quick scan, you might also need the following changes:
output ==> OUTPUT
input ==> INPUT
pinmode  ==> pinMode
digitalwrite ==> digitalWrite
delaymicroseconds ==> delayMicroseconds
Make sure your code matches the case (uppercase/lowercase) of the examples/tutorials etc.

49065: <p>output not declaired.anyone please help me to fix this problem</p>

<pre><code>int const trigpin=10;
int const echopin=9;
int const buzzpin=2;
void setup() 
{
  {
  Serial.begin(9600); 
 }
  pinmode(trigpin,output);
  pinmode(echopin,input);
  pinmode(buzzpin,output);
}
void loop() 
{
  long int duration,distance;
  digitalwrite(trigpin,high);
  delaymicroseconds(1000);
  digitalwrite(trigpin,low);
  duration=pulsein(echopin,high);
  distance=(duration/2)/29.1;
  Serial.print(distance);
  Serial.println("CH");
  if(distance&lt;=50)
   {
    digitalwrite(buzzpin,high);
   }
   else if(distance&gt;50)
   {
    digitalwrite(buzzpin,low);
   }
   delay(60);
}
</code></pre>
 47961: <p>To be used in the pinMode function (note capital M), it needs to be all capitals, ie OUTPUT.</p>

<p>From a quick scan, you might also need the following changes:</p>

<p>output ==> OUTPUT</p>

<p>input ==> INPUT</p>

<p>pinmode  ==> pinMode</p>

<p>digitalwrite ==> digitalWrite</p>

<p>delaymicroseconds ==> delayMicroseconds</p>

<p>Make sure your code matches the case (uppercase/lowercase) of the examples/tutorials etc.</p>
