Alireza Karkon
Published © CC BY

360 Radar (that encodes data onto an image)

This is a 360 radar using an ultrasonic sensor that saves data and encodes them onto an image.

AdvancedFull instructions provided10 hours30,562
360 Radar (that encodes data onto an image)

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
RobotGeek 180 Degree Robot Servo
RobotGeek 180 Degree Robot Servo
×2
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Visual Studio 2015
Microsoft Visual Studio 2015

Hand tools and fabrication machines

pipe
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Custom parts and enclosures

EXE File

Download the EXE file from here

Schematics

Circuit Diagram

Circuit Diagram

Circuit Diagram

Code

Servo Control

C/C++
This code on C++ is for control the servo and should be upload to Arduino
#include <Servo.h>

Servo Down;
Servo Up;
const int trigPin = 9;
const int echoPin = 10;

long duration;
int pos = 0;
int pos2 = 0;
int distance;
int _degrees;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT); 
 Down.attach(2);
 Up.attach(3);
Serial.begin(9600); 
}
void loop() {
  Down.write(0);  
  Up.write(0);  
   for (pos = 0; pos <= 180; pos += 1) {
    Down.write(pos);
    _degrees = pos;
    dis();              
    delay(50);                       
    if (pos == 180){
         for (pos2 = 0; pos2 <= 180; pos2 += 1) {
    Up.write(pos2);
    _degrees = pos + pos2;
    dis();            
    delay(50);                       
      }
  }
   }
  for (pos = 180; pos >= 0; pos -= 1) { 
    Down.write(pos);
    Up.write(pos);
    delay(5);                      
  }
}
void dis(){
  digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
Serial.print(distance);
Serial.print(",");
Serial.println(_degrees);
  }

Credits

Alireza Karkon

Alireza Karkon

10 projects • 69 followers
Hey guys! I'm Alireza. I'm a student (Bachelor of Technology)-Computer EngrgTech. I'm C# / C++ / Unity programmer and familiar to Front-End.

Comments