This project combines an Emic 2 text- to- Speech module, a ultrasonic Ping))) distance sensor, the MAKE compressed air rocket launcher, and an Arduino Uno.
This project could be used for security, pranks, and many more fun things.  

Step 1: Materials

You will need to acquire the following materials:

-  Arduino Uno R3 (x1)

-  Breadboard (x1)

-  Emic 2 (Rev. A) Text- to – Speech module (x1)

-  PING))) Ultrasonic Distance Sensor (x1)

-  Jumper Wires

-  NPN transistor (MP 2222A) (x1)

-  100 Ohm resistor (x1)

-  8 AA battery holder (x1)

-  AA batteries (x8)

-   9V battery clip (x1)

-8 Ohm speaker (x1) (not shown)

-  Compressed Air Rocket Launcher (from Makershed) (x1)

-  Bicycle pump (x1)

-  Paper rocket


<p>I think I would call it Proximity activated rocket launcher. However, I like it because it shows how to get the emic2 to announce what it is reading from a sensor. Not caring too much about the rocket. </p>
<p>if you need data for the four pin sensor, its here</p><p>https://www.instructables.com/id/Easy-ultrasonic-4-pin-sensor-monitoring-hc-sr04/</p>
<p>could you change the code for the four pin ultrasonic sensor ? Please ?</p>
There was a problem and the code for this project was not attached. I am attaching it in this comment: <br> <br> <br> <br> <br> <br>/* <br> <br>This program is based off the demonstration of the Emic 2 module by <br>Joe Grand [www.grandideastudio.com] <br> <br>*/ <br>#include <br> <br>#define rxPin 2 // Serial input (connects to Emic 2 SOUT) <br>#define txPin 3 // Serial output (connects to Emic 2 SIN) <br> <br>// set up a new serial port <br>SoftwareSerial emicSerial = SoftwareSerial(rxPin, txPin); <br>const int pingPin = 7; <br>long int duration, distanceInches, distanceCm; <br>byte LimitCm= 30; <br>byte ledPin = 12; <br> <br>long microsecondsToInches(long microseconds) <br>{ <br> return microseconds / 74 / 2; <br>} <br> <br>long microsecondsToCentimeters(long microseconds) <br>{ <br> return microseconds / 29 / 2; <br>} <br> <br> <br> <br>void setup() // Set up code called once on start-up <br>{ <br> // define pin modes <br> pinMode(rxPin, INPUT); <br> pinMode(txPin, OUTPUT); <br> pinMode(ledPin,OUTPUT); <br> <br> // set the data rate for the SoftwareSerial port <br> emicSerial.begin(9600); <br> <br> /* <br> When the Emic 2 powers on, it takes about 3 seconds for it to successfully <br> intialize. It then sends a &quot;:&quot; character to indicate it's ready to accept <br> commands. If the Emic 2 is already initialized, a CR will also cause it <br> to send a &quot;:&quot; <br> */ <br> emicSerial.print('\n'); // Send a CR in case the system is already up <br> while (emicSerial.read() != ':'); // When the Emic 2 has initialized and is ready, it will send a single ':' character, so wait here until we receive it <br> delay(10); // Short delay <br> emicSerial.flush(); // Flush the receive buffer <br>} <br> <br>void loop() // Main code, to run repeatedly <br>{ <br> //check distance with Ping))) <br> pinMode(pingPin, OUTPUT); <br> digitalWrite(pingPin, LOW); <br> delayMicroseconds(2); <br> digitalWrite(pingPin, HIGH); <br> delayMicroseconds(5); <br> digitalWrite(pingPin, LOW); <br> <br> pinMode(pingPin, INPUT); <br> duration = pulseIn(pingPin, HIGH); <br> <br> distanceInches = microsecondsToInches(duration); <br> distanceCm = microsecondsToCentimeters(duration); <br> <br> <br> check(); <br> delay(100); <br> <br>} <br> <br>void check() <br>{ <br> if (distanceCm &gt; 30) <br> { <br> emicSerial.print('S'); <br> emicSerial.print(); <br> emicSerial.print('\n'); <br> while (emicSerial.read() != ':'); <br> } <br> if (distanceCm &lt; 30) <br> { <br> <br> emicSerial.print('S'); <br> emicSerial.print(&quot;object detected. Fire.&quot;); <br> emicSerial.print('\n'); <br> while (emicSerial.read() != ':'); <br> <br> digitalWrite(ledPin, HIGH); <br> delay(100); <br> digitalWrite(ledPin, LOW); <br> delay(100); <br> <br> } <br>} <br>

About This Instructable




More by electroman90:Voice activated Rocket Launcher 
Add instructable to: