4 Channel IR Tracking Module [S075]



https://www.youtube.com/watch?v=MOsxmBge2wU


*GitHubhttps://github.com/rdiot/rdiot-s075.git


* Specs

Working voltage: DC 3.3V-5V

Working current: try to choose more than 1A power supply

Working temperature: - 10oC - +50oC

Mounting aperture: M3 screws

Detection range: 1mm to 60 CM adjustable, the closer the performance more stable, white reflects the farthest distance.

Size: in the control panel of 42mm * 38mm * 12mm (length * width * height)

Small forward 25mm * 12mm * 12mm (length * width * height)

Output interface: 6 wire interface (1234 to 4 signal output ends, + positive power, - for the negative power is ground)

The output signal: TTL level (can be directly connected to I/0 microcontroller, infrared light reflected back to the sensor induction, the red indicator light, output low level; no infrared light, the indicator light does not shine, the output high.)


* Contents

- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004

int IN1 = 2;

int IN4 = 5;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(IN1,INPUT);

  pinMode(IN4,INPUT);


  delay(1000);


  lcd.clear();

}


void loop()

{

  lcd.setCursor(0,0);

  lcd.print("S075:4CHIR Tracking");


  String val1str = "";

  String val4str = "";


  int in1_val = digitalRead(IN1);

  int in4_val = digitalRead(IN4);


  if(in1_val == 0)

    val1str = " detected";

  else 

    val1str = "         ";


  if(in4_val == 0)

    val4str = " detected";

  else

    val4str = "         ";


  lcd.setCursor(0,1);

  lcd.print("IN1=" + (String)in1_val + val1str);


  lcd.setCursor(0,2);

  lcd.print("IN4=" + (String)in4_val + val4str);

}

Posted by RDIoT
|

Tracking Sensor Module Obstacle Avoidance (KY-033) [S026]



https://www.youtube.com/watch?v=11V1Tuf-Sc8


*GitHub https://github.com/rdiot/rdiot-s026.git


* Specs

Operating voltage: 2.5V - 12V(cannot over 12V)

Working current: 18mA - 20mA at 5V

Output electrical level signal: low level when detecting objects / high level when no objects / 0 or 1 decides if objects exist.


* Contents

- Connect

GND ----- GND

OUT ----- D2

VCC ----- 5V


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004


int T = 2; // INPUT PIN

int count = 0;

String dot = ".";


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(T, INPUT);

  delay(1000);


  lcd.clear();

}


void loop()

{


  if(count >= 20)

  {

    dot = "";

    lcd.clear();

    count = 0;

  }

 

  lcd.setCursor(0,0);

  lcd.print("S026:KY-033 Tracking");


  if (LOW == digitalRead(T))

  {

    dot += "Detected";


    lcd.setCursor(0,1);

    lcd.print(dot);

    count = count+8;

  }

  else

  {

    dot += ".";

    lcd.setCursor(0,1);

    lcd.print(dot);

    count++;

  }

  delay(100);


}

Posted by RDIoT
|