int trigPin = 11; // Triggerint echoPin = 12; // Echolong duration, cm, inches;long sum=0;long avg;int i; void setup() { //Serial Port begin Serial.begin (9600); //Define inputs and outputs pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT);} void loop() { // The sensor is triggered by a HIGH pulse of 10 or more microseconds.…
divakar patel
updated on 31 Aug 2022
Project Details
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Read more Projects by divakar patel (9)
Week-3 Challenge: ADVISOR Tool
1.For EV_defaults_in file, if cargo mass is 500 kg with all other default conditions, can the vehicle travel for 45 km with FTP drive cycle? Conclude your observations. Select the EV_defaults_in from the drop down menu in the load file section Change the cargo mass to 500kg Now click on the continue button a new window…
16 Feb 2024 03:57 AM IST
Project 2 - Measuring distance of an object using ultrasonic sensor (HC-SR04)
20 Jan 2023 04:16 PM IST
Project 1 - Controlling a DC motor using PWM and monitoring its Running status
20 Jan 2023 04:10 PM IST
Project 2 - V&V SW Analysis II
#ifndef FILE#include#endif #ifndef FALSE#define FALSE 0#define TRUE 1#endif /** this define determines if we are using stubs -* set to 0 for stubs or 1 for no stubs*/#define no_stubs 1 /** this define determines the interface to use* set to 1 for original interface or 0 for changed interface*/#define original_interface…
02 Jan 2023 04:09 PM IST
Project 1 - V&V SW Analysis - I
if(owner switch on the phone) { (Company logo at the center of the screen) } else if(customer switch on the phone) { (All my icons of the APPS shall be present in the grid) } else if(owner powered on the phone) { (the "call the phone" icon is the first icon and the "Dictionary" icon is the second icon at the bottom bar of my screen.)…
29 Dec 2022 01:03 PM IST
Project 2 - Measuring the distance of an object using ultrasonic sensor and also smoothen the sensor data using moving average filter
int trigPin = 11; // Triggerint echoPin = 12; // Echolong duration, cm, inches;long sum=0;long avg;int i; void setup() { //Serial Port begin Serial.begin (9600); //Define inputs and outputs pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT);} void loop() { // The sensor is triggered by a HIGH pulse of 10 or more microseconds.…
31 Aug 2022 03:51 AM IST
Project 1 - Interfacing a 16*2 LCD with Arduino using I2C protocol
//I2C MASTERCODE//I2C communication between two arduino#include<Wire.h> //Library for I2C Communication functions#include<LiquidCrystal.h> //Library for LCD display functionLiquidCrystal lcd(2, 7, 8, 9, 10, 11); //Define LCD Module Pins (RS,EN,D4,D5,D6,D7) void setup() {lcd.begin(16,2); //Initilize…
25 Aug 2022 06:18 PM IST
Project 2 - Implement the Code for controlling the retraction and extension of Airplane’s landing gear
1. #include <iostream>using namespace std; string lights,lever; void setLightsRed(){ lights = "Red"; } void setLightsGreen(){ lights= "Green"; } void setLightsOff(){ lights = "Off"; } string getLights(){ …
08 Jul 2022 07:07 AM IST
Project 1 - Creation of user defined data type to implement the user interfaces for working with ‘Set’ (Mathematical Set theory)
#include<stdio.h> #define SIZE 50 int S1[SIZE],S2[SIZE],S3[SIZE]; void accept(int S[],int n) { int i; for(i=1;i<=n;i++) scanf("%d",&S[i]); S[0]=n; } void display(int S[])…
07 Jul 2022 02:04 PM IST