Show Posts
Pages: 1 ... 4 5 [6]
76  Using Arduino / Sensors / Question on ultrasonic sensor! on: August 23, 2012, 03:57:50 am
If I keep the ultrasonic sensors (40KHZ/25KHZ) in a sealed plastic container, will they still measure the distance? I want to measure the water level in a tank about 10ft depth and I don’t have the water proof ultrasonic sensors available at my place. Any suggestions are welcome.
77  Using Arduino / Sensors / Re: Best way to tell if a lid is open. on: August 22, 2012, 01:58:39 am
Certainly using the micro switch/leaver switch is the simplest way.  In case if you don't want to use mechanical approach, you can do this with IR proximity sensor as well.
78  Using Arduino / Sensors / Re: Problem reading PIR sensor on: August 17, 2012, 05:05:04 am
If want to test the sensor to rule out if sensor is the issue, you can do it with test circuit in step 4 without multimeter.  All the best!

http://www.instructables.com/id/PIR-Motion-Sensor-Tutorial/step4/Testing-your-PIR/
79  Using Arduino / General Electronics / Re: reading an ultrasonic sensor on: August 16, 2012, 03:24:18 am
Refer the linkhttp://www.kerrywong.com/2011/01/22/a-sensitive-diy-ultrasonic-range-sensor/,
80  Using Arduino / General Electronics / Re: Arduino dB meter / noise-level meter - circuit? on: August 16, 2012, 03:21:59 am
Give a try with IN4148 instead of IN4001
81  Using Arduino / Programming Questions / Re: programming relay shield on: March 15, 2012, 10:04:14 am
Good Luck!  you can refer http://arduino.cc/en/Tutorial/LiquidCrystal for interfacing LCD.
82  Using Arduino / Programming Questions / Re: programming relay shield on: March 14, 2012, 10:50:32 pm
OK try below, The output pins used are pin 4 to 7

You can simply turn them off or on using below code.
Code:
void setup() {               
  // initialize the digital pins as an output.
 
  pinMode(4, OUTPUT); 
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);   
}

void loop() {
  digitalWrite(4, HIGH);   // Turns ON Relay on digital pin 4
  delay(1000);              // wait for a second
  digitalWrite(5, HIGH);    // Turns ON Relay on digital pin 5
  delay(1000);              // wait for a second
  digitalWrite(6, HIGH);   // Turns ON Relay on digital pin 6
  delay(1000);              // wait for a second
  digitalWrite(7, HIGH);    // Turns ON Relay on digital pin 7
  delay(1000);              // wait for a second

  digitalWrite(4, LOW);   // Turns OFF Relay on digital pin 4
  delay(1000);              // wait for a second
  digitalWrite(5, LOW);    // Turns OFF Relay on digital pin 5
  delay(1000);              // wait for a second
  digitalWrite(6, LOW);   // Turns OFF Relay on digital pin 6
  delay(1000);              // wait for a second
  digitalWrite(7, LOW);    // Turns OFF Relay on digital pin 7
  delay(1000);              // wait for a second
}
83  Using Arduino / Programming Questions / Timer on: March 13, 2012, 10:58:42 am

I am doing my first project and looking for the timer code to turn the output ON / OFF after certain time say 1 minute or 5 minutes.  Currently I am using millis() to achieve this, but I think there will be a better way to do this, any suggestions are welcome!!!

Currently I am using below sketch to turn OFF the output after 1 minute.
********************************

unsigned long time;
void setup() {
  pinMode(13, OUTPUT);
  pinMode(9, INPUT);
}

void loop() {
  if (digitalRead(9) == HIGH)
{
  digitalWrite(13, HIGH);
    time = millis();
   
    }
 
 if (millis() - time > 60000)
{
 digitalWrite(13, LOW);

}
}
Pages: 1 ... 4 5 [6]