Robotic Coding Professional Product Counter

Robotic Coding Professional Product Counter

Coding Archive

Coding Archive

Robotic Coding Professional Product Counter

With this code, which works stably and without errors, you can see the number of products on the LCD screen. All errors in other codes have been cleared. This code is used in product counts of professional industrial machines.

You can use infrared or laser reader instead of ultrasonic distance sensor.
You can run the project from the Tinkercad virtual application sample and experience the system.

#include <LiquidCrystal.h>

//initialize the pins
const int trigPin = 6;
const int echoPin = 7;
const int buzzer = 8;
const int role1 = 9;


int count = 0;
int count2 = 0;
int urunaktif = 0;

//initialize the variables
long duration;
int distance;

//interfacing the LCD display
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup()
{
 //setup code to run once:
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(buzzer, OUTPUT);
  pinMode(role1, OUTPUT);
  
  lcd.begin(16,2);
  lcd.clear();
  Serial.begin(9600);
  
  lcd.print("HELLO");
  lcd.setCursor(0,1);
  lcd.print("NICEDAY");
  delay(2000);
    lcd.clear();
}

void loop()
{

 
  
  digitalWrite(trigPin,HIGH);
  //delayMicroseconds(1000);
  digitalWrite(trigPin,LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2)/29.1;
  //delay(500);
  
  //suppose I have fixed the ultrasonic senser at the distance of 100 cm
  if (distance <80)
  {
    
    
    
    if (urunaktif ==0) ///////
      
    {  
    tone(buzzer,1600);
    
    
    count++;
    count2++;
    urunaktif++;
     // delay(1000);
    
    
    } /////////////
     
  
  }
  else 
  {
    noTone(buzzer);
    urunaktif =0;
    
  }
  
  
   if (count2 ==12)
    {
   digitalWrite(role1, HIGH);
   count2 =0;
     lcd.clear();

    }
  
  
  
  
  

  
  
  //lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("DISTANCE: ");
  lcd.print(distance);
  lcd.print("cm");
  lcd.setCursor(0,1);
  lcd.print("PIECE ");
  lcd.print(count);
  lcd.print(" / ");
  lcd.print(count2);
  //delay(500);

  
  
}



Tinkercad :

Robotic Coding Professional Product Counter video tutorial, Coding Archive video tutorial, Robotic Coding Professional Product Counter Coding Archive tutorial, Robotic Coding Professional Product Counter Coding Archive watch video, Robotic Coding Professional Product Counter Coding Archive HD Video, With this code, which works stably and without errors, you can see the number of products on the LCD screen. All errors in other codes have been cleared. This code is used in product counts of professional industrial machines. Coding Archive sample video, With this code, which works stably and without errors, you can see the number of products on the LCD screen. All errors in other codes have been cleared. This code is used in product counts of professional industrial machines. Coding Archive video code , Robotic Coding Professional Product Counter learning video, Robotic Coding Professional Product Counter coding video

Coding Archive

In this area, I show advanced ASP - Active Server Pages coding and working styles and coding with MySQL, MSSQL, Oracle and other databases. - See All
Classic ASP XMLHTTP Url Html Code Viewer
You can do your transactions quickly with the Classic ASP code, where you can pull the html code structure from the url you connect with XMLHTTP.
ASP MySql Database Random Records
For Classic Asp MySql database random data this code is for you! You can use it in all your projects for Mysql database random data that works smoothly and fast.
Classic ASP CDO Message Mail Component Code
You can use the code I have given to send mail without any problems with the CDO component. Have peace of mind with this CDO code that works smoothly in your projects :)
Classic ASP XMLHTTP Set Timeout Code
With Classic ASP you can set the connection time limit when retrieving xml data. With the code I gave you, you can end long-term connection problems.
ASPJpeg Draw Image
You can examine the example of placing a logo on a photo with the Classic Asp ASPJpeg component with this code. You can use the Classic ASP AspJpeg component code piece that will always work for you in all your works.
Formatnumber ASP Classic Function
You can examine the Classic ASP formatnumber function in detail with the code I will give you.
Classic ASP ASPJpeg Component Full Code
I am giving all relevant code structure for writing on a photo with aspjpeg. I'm sure this code structure will be very useful for you.
Classic ASP Include File Code
For Classic ASP, you can benefit from the code structure I have given to call another asp file into the page.
Classic ASP Mysql Record Limit
If you want to set limits with classic asp in mysql table listing, you can use the code structure I have given.
Jquery Load Div From Another Page
This code will be useful for calling an external page with jquery inside the div tag.
Total Number of Records in Mysql Database with a Single Code
Asp Mysql Recordcount. This code is for you to quickly query the total number of data in the Mysql database table.
First Day and Last Day of the Month Date Function
With this asp vbscript function you can find the first and last day of a month. It is a very fast function that will work in your database filtering operations.