¡Descarga Proyecto radar ultra sonico y más Resúmenes en PDF de Programación de Bases de Datos solo en Docsity! ARDUINO
PROYECTO
RADAR 180”
CON y
OS |
CONTENIDO DEL PROYECTO 1. INTRODUCCION. 2. COMPONENTES REQUERIDOS: 1. Arduino Uno. 2. Sensor Ultrasonico. 3. Servo Motor. 3. DIAGRAMA Y SCRIPTS. 4. OBJETIVOS. 5. COSTOS 6. APLICACIONES. 7. CONCLUSIONES. USAMOS TINKERCAD PARA PODER HACER LA PRIMERA IMPRESION DEL PROYECTO FINAL. TINKERCA D DIAGRAMA DEL CIRCUITO SCRIPT CODIGO C+ +● #include <Arduino.h> ● #include <Servo.h> ● const int trigPin = 10; ● const int echoPin = 11; ● long duration; ● int distance; ● Servo myServo; ● void setup() { ● pinMode(trigPin, OUTPUT); ● pinMode(echoPin, INPUT); ● Serial.begin(9600); ● myServo.attach(12); ● } ● int calculateDistance(){ ● digitalWrite(trigPin, LOW); ● delayMicroseconds(2); ● digitalWrite(trigPin, HIGH); ● delayMicroseconds(10); ● digitalWrite(trigPin, LOW); ● duration = pulseIn(echoPin, HIGH); ● distance= duration*0.034/2; ● return distance; ● } ● void loop() { ● for(int i=15;i<=165;i+ +){ ● myServo.write(i); ● delay(30); ● distance = calculateDistance(); ● Serial.print(i); ● Serial.print(","); ● Serial.print(distance); ● Serial.print("."); ● } ● for(int i=165;i>15;i--){ ● myServo.write(i); ● delay(30); ● distance = calculateDistance(); ● Serial.print(i); ● Serial.print(","); ● Serial.print(distance); ● Serial.print("."); ● } ● } CODIGO JAVA import processing.serial.*; import java.awt.event.KeyEvent; import java.io.IOException; Serial myPort; String angle=""; String distance=""; String data=""; String noObject; float pixsDistance; int iAngle, iDistance; int index1=0; int index2=0; PFont orcFont; void setup() { size (1200, 700); smooth(); myPort = new Serial(this,"COM3", 9600); myPort.bufferUntil('.');} void draw() { fill(98,245,31); noStroke(); fill(0,4); rect(0, 0, width, height-height*0.065); fill(98,245,31); drawRadar(); drawLine(); drawObject(); drawText(); } . . . OBJETIVOS PROPUESTOS El objetivo del proyecto es detectar el obstáculo con el Sensor ultrasónico, placa Arduino UNO y servo para la codificación del procesamiento como plataforma para mostrar los resultados. norte OBJETIVO N# 1 Para prevenir o reducir los accidentes y útil para seguridad y proteccion. OBJETIBO N# 2 La detección de objetos viene en el rango de 2 a 3 metros y señal al observador sobre el objeto. OBJETIVO N# 3 CREDITS: This presentation template was created by Slidesgo, and includes icons by Flaticon, and infographics & images by Freepik THANKS Do you have any questions? addyouremail@freepik.com +91 620 421 838 yourwebsite.com Please keep this slide for attribution RESOURCES Did you like the resources that we’ve used in this template? Get them for free at our other websites: PHOTOS: ● Back view of woman at home using headphones and tablet ● Side view of woman at home using headphones and tablet ILLUSTRATIONS: ● Isometric tech futuristic backg round I ● Isometric tech futuristic backg round II ● Isometric technology futuristic background III ICONS: ● Icon Pack: Technology