Posts

Showing posts from July, 2021

How to control LCD with Arduino

Image
 #include <LiquidCrystal.h> const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); void setup() {   // set up the LCD's number of columns and rows:   lcd.begin(16, 2);   // Print a message to the LCD.   lcd.print("Subscribe"); } void loop() {   // set the cursor to column 0, line 1   lcd.setCursor(0, 1);   lcd.print("myChanel"); }

CODE AND CIRCUIT DIAGRAM OF RPM CONTROLLER PROJECT

Image
 #include <LiquidCrystal.h> LiquidCrystal lcd(2,3,4,5,6,7); const int hallPin=8; const unsigned long sampleTime=1000; const int maxRPM = 10000;  int volume_pin = A0; int read_ADC; int pwm_pin = 11; int duty_cycle; int duty_cycle_lcd;   void setup() {   pinMode(hallPin,INPUT);   pinMode(volume_pin, INPUT);   pinMode(pwm_pin, OUTPUT);   lcd.begin(16,2);     lcd.setCursor(0,0);   lcd.print(" JAHANZEB ");   lcd.setCursor(0,1);   lcd.print("  Subscribe ");   delay(2000);   lcd.clear(); }   void loop() {      int rpm=getRPM(); read_ADC = analogRead(volume_pin); duty_cycle = map(read_ADC, 0, 1023, 50, 255);   duty_cycle_lcd = map(read_ADC, 0, 1023, 0, 100);  if(duty_cycle_lcd>0){  analogWrite(pwm_pin, duty_cycle);  }else{digitalWrite(pwm_pin, LOW);} lcd.setCursor(0,0); lcd.print("Duty Cycle: "); lcd.print(duty_cycle_lcd);  lcd.print("%  "); lcd.setCurs...

FRONT PAGE OF O BJECT ORIENTED PROGRAMING

Image

LAB # 11 (DATA STRUCTURE AND OBJECT ORIENTED PROGRAMING)

Image
LAB # 11                                           CoNTeNT   TASK Write a program that finds the factorial by using the inline method? TASK Write a program that shows the explicit function by using class?  TASK Write a program that shows the implicit function by using class? TASK Write a program to find the minimum number by giving three different integers by using class?  TASK  Write a program that finds the factorial by using the inline method? CODE OUTPUT  TASK Write a program that shows the explicit function by using class?  CODE OUTPUT  TASK Write a program that shows the implicit function by using class?  CODE OUTPUT  TASK Write a program to find the minimum number by giving three different integers by using class?  CODE OUTPUT 

LAB # 10 (DATA STRUCTURE AND OBJECT ORIENTED PROGRAMING)

Image
LAB # 9                                           CoNTeNT    TASK Demonstrate the reference argument? TASK Demonstrate the reference argument and interchange two variables? TASK Without using a third variable interchange the value of two variables using reference argument? TASK  Write a program that demonstrates function returning a pointer? TASK Demonstrate the reference argument? CODE OUTPUT TASK Demonstrate the reference argument and interchange two variables CODE OUTPUT TASK Without using third variable interchange the value of two variables using reference argument? CODE OUTPUT TASK Write a program that demonstrates function returning a pointer? CODE OUTPUT

LAB # 9 (DATA STRUCTURE AND OBJECT ORIENTED PROGRAMING)

Image
LAB # 9                                           CoNTeNT   TASK Write a program that demonstrates a returning function? TASK Writeaprogramthatreturnyourname? TASK  Write a program that performs any type of expression using  returning a function? TASK Write a program that performs Boolean expression using returning a value? TASK Write a program that returns a logical type operation? TASK  Write a program that returns a logical type operation? TASK Write a program that demonstrates a returning function?  CODE OUTPUT TASK   Writeaprogramthatreturnyourname? CODE TASK Write a  program that performs any type of expression using  returning a function? CODE OUTPUT TASK Write a program that performs Boolean expression using returning a value? CODE OUTPUT TASK Write a program that performs returns a character? CODE OUTPUT TASK W...

LAB # 8 (DATA STRUCTURE AND OBJECT ORIENTED PROGRAMING)

Image
LAB # 8                          CoNTeNT     TASK Write a program that displays the marks by using class? TASK Write a program that performs addition by using inline operation?  TASK Write the program to demonstrate the class using dot operator? TASK   Write a program that displays the marks by using class? CODE OUTPUT  TASK Write a program that performs addition by using inline operation?  CODE OUTPUT  TASK Write the program to demonstrate the class using dot operator? CODE OUTPUT  

LAB # 7 (DATA STRUCTURE AND OBJECT ORIENTED PROGRAMING)

Image
LAB # 7                                                        CoNTeNT     TASK Write a program that performs an add, sub, multiplication, and division in a single program by using the inline method? TASK Write a program that shows the global and local variables?    TASK  Write a program that performs an add, sub, multiplication, and division in a single program by using the inline method? CODE OUTPUT  TASK Write a program that shows the global and local variables?  CODE OUTPUT 

LAB # 6 (DATA STRUCTURE AND OBJECT ORIENTED PROGRAMING)

Image
LAB # 6 CoNTeNT TASK  Write a program that performs the queue operations?   TASK Write a program to demonstrate inline function? TASK Write a program using & pointer operator?  TASK Write a program to explain & * operator? TASK  Write a program that performs the queue operations?   CODE #include <iostream> #include <conio.h> #define max 3 using namespace std; void push (int a[max]); void pop (int a[max]); void peek (int a[max]); void display (int a[max]); int front =-1,rear=-1; class queueimpt { public: void push(int a[max]) { int item; cout<<"enter item"; cin>>item; if (rear==max) cout<<"queue overflow\n"; else { if (front==-1) front =0; rear++; a[rear]=item; } } void peek(int a[max]) { cout<<"peek element"<<a[front]<<endl; } void pop(int a[max]) { int item1; if(front==-1||front>rear) cout<<"queue underflow\n"; else { item1=a[front]; cout<<"element deleted"<...

LAB # 5 (DATA STRUCTURE AND OBJECT ORIENTED PROGRAMING)

Image
LAB # 5 CoNTeNT   TASK writes a program to find the area of the circle? TASK writes a program that performs binary searching? TASK  write a program to demonstrate the list? TASK writes a program to find the area of the circle? OUTPUT TASK write a program which perform binary searching? OUTPUT TASK  write a program to demonstrate list? OUTPUT