Things used in this project

Hardware components:
51gzz5eu9pl. sx425
HC-SR04
×1
09264 1
RGB Diffused Common Anode
×1
11113 01
SparkFun Arduino Pro Mini 328 - 5V/16MHz
×1
Tens70
9V battery (generic)
×1
Software apps and online services:
8ztngd 9
circuito.io
Ide web
Arduino IDE

Custom parts and enclosures

Air Gate Body
Air Gate Base
Air Gate for drones

Code

Air gate void loopArduino
Replace the void loop () function in the sample code from circuito.io with the code below
void loop() {
  // Read distance measurment from UltraSonic sensor
  int hcsr04Dist = hcsr04.ping_cm();
  delay(10);
  //Serial.println(hcsr04Dist);

  rgbLed.setRGB(255, 0 , 0 );  //Change the values in the brackets to (255,0,0) for pure RED, (0,255,0) for pure GREEN and (0,0,255) for pure BLUE.


  if (hcsr04Dist < 30 && hcsr04Dist > 2)
  {
    rgbLed.setRGB(0, 255, 0);    //Change the values in the brackets to (255,0,0) for pure RED, (0,255,0) for pure GREEN and (0,0,255) for pure BLUE.
    delay(1000);
  }
}

Credits

Jzbvk4go5lw68vtvbfe4
circuito.io team

Circuito.io is an online platform that generates wiring and code for Arduino projects. Want to know more? Visit http://circuito.io

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Developing a Low-Cost Microcentrifuge Using E-Waste
Intermediate
  • 142
  • 4

Work in progress

Quality microcentrifuges are generally too expensive for most people to afford. This project aims to provide a low-cost alternative.

NodeMCU Home Weather Station with Websocket
Intermediate
  • 157
  • 5

Full instructions

NodeMCU and BME280 Home Weather Station that serves a webpage using Websockets

SORT4U
Intermediate
  • 24
  • 1

Full instructions

It's the sorting machine that you've been waiting for. Just throw all your junk in it and let it sort for you.

SORT4U

Team The Avengers

Flightduino 101
Intermediate
  • 367
  • 7

Full instructions

A drone project that uses the Neural Pattern Recognition Module and other aspects of the Curie Module to advantage for creating a cool drone

Arduino 101 BLE App
Intermediate
  • 1,872
  • 24

Work in progress

I want to show you how to make an application and connect it with the Arduino 101 platform for Internet of things applications.

FM radio
Intermediate
  • 8,233
  • 38

Full instructions

Build a great sounding FM radio with a cool display using an Arduino Nano and the Sparkfun Si4703 FM tuner breakout

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback