Go Down

Topic: SensComp Sensor (Read 1 time) previous topic - next topic


Did anyone know how to program this kind sensor(SensComp 600 series)?

Wire Connect
INIT = 4
OSC = 5
ECHO = 6

I get the result of 191402,191338,191477 keep changing although the distance is same. And how can i convert the value to meter or inches?

Code: [Select]

#define  INIT   4  // Trigger the measurement
#define  ECHO1   6  // Receive the ultrasonic signal feedback
#define  ECHO2   5  // Receive the ultrasonic signal feedback

void setup()
  pinMode(INIT, OUTPUT);
  pinMode(ECHO1, INPUT);
  pinMode(ECHO2, INPUT);

void loop()
  long duration1,duration2;
  digitalWrite(INIT, LOW); // trigger the sensor to measure distance
  digitalWrite(INIT, HIGH); // finish trigger
  duration1 = pulseIn(ECHO1,HIGH);  // Read the signal feedback
  Serial.print("duration = ");




"Interfacing to Microcontrollers

The interfacing of the 6500 module to a microcontroller is not too difficult.  The simplest connection requires only two lines, one output for INIT, and one input to receive the ECHO.  In this mode, BINH and BLNK are just tied to ground as they remain low through the entire measurement cycle. If you want to do your own blanking, you will also need to have output connections to the BLNK and BINH inputs bringing the total lines used to four.

The board can be wired directly from the 6500 board's cable connector to the pins of most micros including PIC, 68HC11, and BasicX.  The only exception is the ECHO line which is an open collector This pin needs to have an external 4.7K Ohm pull-up resistor in order to work properly. "
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

Go Up