Dry ice in microwave?

What happens when you put dry ice in a micro wave? Im just wondering cause a local grocery store is now selling dry ice for Halloween effects (yes i know they cant sell to minors).Are the result any thing like this? (i dont think that microwave was turned on)

Topic by i make shooting things   |  last reply

where to find old microwaves...? Answered

I FRIED my MOT and im looking for some old microwaves, i checked all the junk yards, but couldn't find any. Any suggestions?

Question by pwnag3   |  last reply

dose metal explode when you put it in the micro wave? Answered

I want to temper my home made steel knife in the micro wave as my oven is currently out of action. Will the metal just heat up or will it explode??? Will it heat up to fast and cause to much pressure on the steel resulting in a crack or a warped knife??? Should i heat up the knife with a blow torch first???  Are there any good ways of doing this??? Please help me!!! :2(

Question by henster22   |  last reply

Controlling a servo with a Micro-controller?

So I decided to spend some time to make a "gimbal" in a very loose sense. Basically I was experimenting using a square wave oscillator to generate the correct PWM to have a servo rotate between 0 and 180 degrees when a tilt sensor is tripped. After some research multiple sites said having a 1ms pulse every 20ms would have it move to the 0 degree position. Great so I will make a oscillator pulses ~1ms on one side and 19ms on the other. However this does not seem to be working. I am curious if it is a fault in my math or if the tolerance on the parts I am using are just too wide to be any good. Here is a diagram of my set-up with the values a came up with. One spot that may be weak is that I just notice someone somewhere mentioned using 50Hz for the timing I just used that number when I calc my figures. Any feedback?  Also a side note is that I have been able to move the servo in one direction only and by accident ( in fact it's what inspired this project) when C1 & C2 were 2.2nF and the R1 & R2 were 10k potentiometers that I turned until something happened. Now that I am trying on purpose no results. 

Question by Jayccob   |  last reply

Wave JT Kit - LED Chaser with Joule Thief - Sale

Wave JT is an LED chaser/Larson scanner/sequencer what runs with just one AA battery. Joule Thief circuit boosts the 1.5V (or less) from the battery to 5V to power the microcontroller and LEDs. The kits are available at $19. PCB alone is $7. *** Summer Sale Price *** > see the instructable > go to my website for purchase

Topic by ledartist 

induction "furnace" from microwave transformer?

Hey guys I've seen around the net that it's fairly easy to make a spot welder from a micro wave transformer /micro oven transformer. So I was thinking if it's possibly to use the same idea to make a induction furnace? I would like to use it for melting/ casting aluminum (...and possibly metals with a higher melting point... if possible) any idea if it's possible.. and how to?

Question by lordl9999   |  last reply

how do you make a knife? Answered

Well i am thinking on making a knife n=but i don't know what ible to use help me!!!

Question by knife maker   |  last reply

How to limit A/C current draw from gird and draw power from secondary grid tied solar inverter ?

Micro grid tie inverters are an excellent power source and can be linked together to generate energy, however they do not function when grid is down, this is for the safety of line workers. In a real world scenario I want to ensure that all power is drawn from the energy produced by the micro solar inverters as the primary source while it can produce power and not from the grid which will act as a secondary power source, this will require some sort of current limiting solution from the grid without reducing the voltage to keep the inverter working.   For the safety of line workers I would like to have an automatic transfer switch which will have both the primary power source from grid and a tertiary inverter backed battery backup so that when the grid is off, the power is drawn from the Inverter and there is no power fed back into the line keeping lineworkers safe and since pure sine wave produced by the inverter can activate the grid-tie inverters and it should theoretically increase the VA of the UPS to the size of the installed Grid-tie micro inverter capacity, the automatic transfer switch should take care of switching between grid when power is on and to the backup inverter when power is off.  TIA for any advice in this regard !

Topic by Ruben GeradM   |  last reply

Request: DIY Portable Microwave

I was looking around and was hoping to find somewhere a guide to make a portable microwave, I have looked around on the internet for hours trying to find a DIY one because I want to make it myself rather than buying one.  What I am trying to do is find a way to make a microwave portable.  I wouldn't be making the actual microwave though, I would just buy one that you guys would hopefully suggest for me to buy.  The purpose of this is to have a microwave that I can put inside of a locker for cooking food in.  I just need someone to guide me through because all I learned through my searching was that I possibly needed an inverter, due to it being battery powered (I assume.)  Then again aren't there car batteries that can run on AC like a microwave, although I am not sure which is why I am here.  Summary: What I am asking is someone to make a step by step tutorial or guide of some sort to making a microwave portable (not building the actual microwave though, just making one portable to be runnable by like a car battery)

Topic by karatetoes   |  last reply

What should i do with all of my old hack saw blades?

I have lots of small broken hacksaw blades and I want to do something with them along the line of making weapons or knife attachments or stuff like that!!!  Hope that you all have some good ideas!!! Ps The cut on my thumb is not from a hack saw. I got bitten!!! :2)

Question by henster22   |  last reply

Wiring a wav playing setup and shift register to the same arduino?

I just ran into an issue with my current setup for a project I've been working on. I would like to hookup a wav playing setup (either the Adafruit Wave Shield or a wav playing setup like this) Issue I'm having is I can't change the pins around for the shift register setup (which I have setup and working just like I like!).  I know this is probably a stupid question (what with stacking shields for the uno) but could I wire up multiple items to the same pin? IE wire pin 12 to both a shift register and a wav playing setup? If not, is there some way around this that would work on a micro that would not mean having to jump to a mega. Thanks!

Question by DoctorWoo 

microcurrent frequency specific device?

How To Create Frequency Specific Microcurrent? I am looking to build a two channel (A/B) microcurrent (allowing from 20 - 600 microamps) with selectable frequencies ranging from 3 to 970 Hz). This is based on a medical device that I'm looking to replicate. I've figured out some of this but again, considering the wealth of knowledge here I'm sure some would know the best way to build this. here are specifications Description Device Specs Frequency Range: 0.1 – 999.9 Hz programmable Wave Form: Square pulses Duty Cycle: 50% Current Intensity:  20μA to 400μA Constant current generator Output Polarity: Programmable alternating, positive or negative Output Load Resistance 0 to 100K ohm Output Channels: Two fully independent channels Output Connection: 3.5 mm mono phone jacks Programming Port: micro-USB Memory: Professional-up to 999 programmable protocols; Patient: up to 99 programmable protocols Power Supply: (2) AA alkaline batteries Dimensions: 5.1 x 3.2 x 1.2 inches Weight: 6.42 oz here is the link i am following https://mendtechnology.com/product/mend-professional-package/

Question by kedarg2   |  last reply


Hey there, I have been working on a recent project to build an Arduino Oscilloscope interfaced with a 4X4 keypad membrane with Nokia 5110 LCD display.I have successful individual code fragments/portions which 1)Generate waves interfaced with the keyboard  2)Display the same on the Nokia LCD 5110 i am using the Arduino Due and the 1st part of my code generates waves on DAC1 with the code as follows:- #include "Waveforms.h" #include #include //Set the desired duty cycle in percentage double dc,t,a,d; long d_milli,d_micro,a_milli,a_micro,m,n; int stage =0; int sample_delay1; LiquidCrystal lcd(A2, A3, A4, A5, A6, A7); float sample_delay; String num1,num2; int wave1; String wave_name; double duty_cycle,k; const byte ROWS = 4; //four rows const byte COLS = 4; //four columns //define the cymbols on the buttons of the keypads char hexaKeys[ROWS][COLS] = {   {'1','2','3','A'},   {'4','5','6','B'},   {'7','8','9','C'},   {'.','0','#','D'} }; byte rowPins[ROWS] = {23,25,27,29}; //connect to the row pinouts of the keypad byte colPins[COLS] = {31,33,35,37}; //connect to the column pinouts of the keypad int i = 0; int sample; //initialize an instance of class NewKeypad Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); boolean in_setup = true; void setup() {   Serial.begin(9600);   analogWriteResolution(12);  // set the analog output resolution to 12 bit (4096 levels)   analogReadResolution(12);   lcd.begin(20,4);   char key = customKeypad.getKey();   lcd.setCursor(0, 0);   lcd.print("choose wave: ");   lcd.setCursor(0, 1);   lcd.print("A=Sine");   lcd.setCursor(8, 1);   lcd.print("B=Triangular");   lcd.setCursor(0, 2);   lcd.print("C=Sawtooth");   lcd.setCursor(11, 2);   lcd.print("D=Square");   while( true)   {         char key = customKeypad.getKey();         if(stage == 0)         {               Serial.println("in stage 0");               if(key == 'A' )               {                 wave1 = 0;                 lcd.clear();                 lcd.setCursor(0,0);                 lcd.print(" Sine?      ");                 wave_name ="Sinusoidal";                 Serial.println(wave_name);               }               else if(key == 'B')               {                 wave1 = 1;                 lcd.clear();                 lcd.setCursor(0,0);                 lcd.print("Triangular?");                 wave_name ="Triangular";                 Serial.println(wave_name);               }               else if(key == 'C')               {                 wave1 = 2;                 lcd.clear();                 lcd.setCursor(0,0);                 lcd.print("Sawtooth?  ");                 wave_name ="Sawtooth";                 Serial.println(wave_name);               }               else if(key == 'D')               {                 wave1 = 3;                 lcd.clear();                 lcd.setCursor(0,0);                 lcd.print("Square?    ");                 wave_name ="Square";                 Serial.println(wave_name);                               }               else if(key == '#')               {                 stage++;                 //lcd.clear();                 lcd.setCursor(0,1);                 lcd.print("Frequency=");                 Serial.println("Frequency=");               }         }        else if(stage == 1)         {               if(key != NO_KEY &&(key=='1'||key=='2'||key=='3'||key=='4'||key=='5'||key=='6'||key=='7'||key=='8'||key=='9'||key=='0'))               {                 num1 = num1 + key;                 //int numLength = num1.length();                 //to adjust one whitespace for operator                 lcd.setCursor(10,1);                 lcd.print(num1);               }                             else if(key == '#')               {                     k = num1.toInt();                     Serial.print(k);                                                                                        int sample_delay_int = 1000000/(k*120);                           float sample_delay_float = 1000000/(k*120);                           float difference= sample_delay_float-sample_delay_int;                           sample_delay1 = sample_delay_int - 6;                           if(difference > 0.5)                           {                             sample_delay1++;                           }                                                                               Serial.println(sample_delay1);                           lcd.clear();                           lcd.print(wave_name);                           lcd.setCursor(0,1);                           lcd.print("Frequency=");                           lcd.print(num1);                           lcd.print(" Hz");                                         break;                                       }                   }                                                 }       } void loop()   {   analogWrite(DAC1, waveformsTable[wave1][i] );    i++;   if(i == maxSamplesNum)  // Reset the counter to repeat the wave     i = 0;   else delayMicroseconds(sample_delay1);                   } Next, I input these waves from DAC1 into analog input A0 to display on the LCD with code as below:- #include #include #include #define DISPLAY_WIDTH 84 #define DISPLAY_HEIGHT 48 #define ARDUINO_PRECISION 1023.0 Adafruit_PCD8544 display = Adafruit_PCD8544(8,9,10,12,11); //Analog Pins int channelAI = A0;      // probe #define DELAY_POTENTIMETER //disabled it I don't have it connected #ifdef DELAY_POTENTIMETER int delayAI = A1;       // delay potentiometer #endif float delayVariable = 0; float scale = 0; int xCounter = 0; int yPosition = 0; int readings[DISPLAY_WIDTH+1]; int counter = 0; unsigned long drawtime = 0; unsigned long lastdraw = 0; int frames = 0; void setup(void) {   display.begin();   display.setContrast(30);// you might have a slightly different display so it might not be the optimal value for you   display.clearDisplay(); } void loop() {    #ifdef DELAY_POTENTIMETER   delayVariable = analogRead(delayAI);   delayVariable = (delayVariable/100);   #endif   scale = (float)(DISPLAY_HEIGHT-1)/ARDUINO_PRECISION;     //record readings   for(xCounter = 0; xCounter <= DISPLAY_WIDTH; xCounter++)   {                                     yPosition = analogRead(channelAI);     readings[xCounter] = (yPosition*scale);     #ifdef DELAY_POTENTIMETER     delay (delayVariable);     #endif   }     display.clearDisplay();   //Draw Voltage Ref Lines   display.drawLine( 10, 0, 10, DISPLAY_HEIGHT-1, BLACK);   display.drawLine( 5, (DISPLAY_HEIGHT-1)-(.2 *ARDUINO_PRECISION * scale), 10, (DISPLAY_HEIGHT-1)-(.2 *ARDUINO_PRECISION * scale), BLACK);   display.drawLine( 0, (DISPLAY_HEIGHT-1)-(.4 *ARDUINO_PRECISION * scale), 10, (DISPLAY_HEIGHT-1)-(.4 *ARDUINO_PRECISION * scale), BLACK);   display.drawLine( 5, (DISPLAY_HEIGHT-1)-(.6 *ARDUINO_PRECISION * scale), 10, (DISPLAY_HEIGHT-1)-(.6 *ARDUINO_PRECISION * scale), BLACK);   display.drawLine( 0, (DISPLAY_HEIGHT-1)-(.8 *ARDUINO_PRECISION * scale), 10, (DISPLAY_HEIGHT-1)-(.8 *ARDUINO_PRECISION * scale), BLACK);   //display.drawLine( 5, (DISPLAY_HEIGHT-1)-(.84 *ARDUINO_PRECISION * scale), 10, (DISPLAY_HEIGHT-1)-(.84 *ARDUINO_PRECISION * scale), BLACK);     //Draw Voltage Ref Numbers   display.setCursor(0,((DISPLAY_HEIGHT-1)-(.2 *ARDUINO_PRECISION * scale))-3);   display.print((int)(5.0*0.2));   display.setCursor(0,((DISPLAY_HEIGHT-1)-(.4 *ARDUINO_PRECISION * scale))-3);   display.print((int)(5.0*0.4));   display.setCursor(0,((DISPLAY_HEIGHT-1)-(.6 *ARDUINO_PRECISION * scale))-3);   display.print((int)(5.0*0.6));   display.setCursor(0,((DISPLAY_HEIGHT-1)-(.8 *ARDUINO_PRECISION * scale))-3);   display.print((int)(5.0*0.8));     for(xCounter = 0; xCounter <= DISPLAY_WIDTH; xCounter++)   {     display.drawPixel(xCounter, (DISPLAY_HEIGHT-1)-readings[xCounter], BLACK);     if(xCounter>1){       display.drawLine(xCounter-1, (DISPLAY_HEIGHT-1)-readings[xCounter-1], xCounter, (DISPLAY_HEIGHT-1)-readings[xCounter], BLACK);     }   }   //Draw FPS   display.setCursor((DISPLAY_WIDTH-1)-11,0);   display.print(frames);     //Draw Voltage   display.setCursor(((DISPLAY_WIDTH-1)/2),0);   display.print(analogRead(channelAI)/ARDUINO_PRECISION*5.0);     display.display();     //Calculate FPS   drawtime = micros();   frames=1000000/*a second*//(drawtime-lastdraw);   lastdraw = drawtime; } Now the problem arises when i try doing the 2 things on d same arduino due board. I got perfect results when i used arduino due and arduino uno simultaneously but have not been able to generate waves on the LCD using the same board. Is it possible to do the same. Can some1 help me incorporate the 2 programs into 1..Thanxx

Question by ranjana_1   |  last reply

Haptic Feedback Meditation (E-Meditation)

Hello, I am a 17 year old electronic hobbyist. I am in the process of making a "Haptic Feedback" meditation device. I give the whole project story here. If you are just interested in the final project you can skim or skip to the "Testing" section. THE IDEA Many months ago (when i was not so knowledgeable about electronics) I had an idea. I wanted to be able to see my thoughts as I thought them. I was obsessed with the idea of this and the thought of what would happen( imagine holding up a microphone to a pair of speakers). I could imagine myself staring at my own thoughts (or a colorful representation of them) for hours. I imagined it to be a "New Generation" of meditation. I drew up a few sketches of what this would look like and.. I hit a wall. At the time. I knew absolutely no way to do this. I just knew it was possible. I put the project on the back burner. CONSTRUCTION Six months passed and I had gotten better and better at electronics and micro-controllers and such. A month ago, I started obsessing over it again. I did some internet searches about this type of technology and all the gibberish started making sense. Not before long. I had ordered the parts for it. It cost me a good 100 dollars in birthday money. But it was well worth it and i do not regret the purchase's at all. The three main pieces were a Micro-controller(arduion uno), a brain-wave reading headset(from an expensive childs toy) and a 7 inch by 3 inch RGB led panel( a fancy panel that makes different colors and patterns). Despite knowing a little bit about electronics I was out of my depth, yet still addicted to the project. Long story longer, I had tested the three pieces of technology and they all worked beautifully. With my limited supplies i busted open the headset, made some solder joints, plugged it into the micro-controller, plugged the micro-controller into the computer, and plugged the brain reader into me. Someone before me had already made sample brain viewing  programs in the processing language for these kinds of projects and i downloaded it. I turned on the program and flinched as i turned on the headset( being plugged into your laptops battery can be a tad unnerving). I was looking at a graph of my brainwaves in a system of line graphs and bars. TESTING This was exciting stuff. I sat there for perhaps an hour just staring at my brainwaves shortly noticing a pattern emerging from just simply staring at even the brain reading program. I noticed the more I stared at my brainwaves looking for the next sudden jump or dip. The less they did. In other words, actively TRYING to move my brainwaves, almost completely nullified them. This was very interesting. I took the device and my laptop to my school To get an accurate sample, I allowed any and everyone who wanted plug themselves in to go right ahead. As they messed with thier hair to get it to fit right and turned it on. What was seen for a few seconds was a (what I consider healthy) measure of brain activity. Everything was jumping up and down at varying levels. But after the subject began staring at this dance. The brain activity shrank and shrank until little was left to be observed. Occasionally depending on the situation the subject would then get bored with the lack of activity and try and make some sort of small talk. It then showed a small rising in overall brainwaves that was immediately crushed by the subjects attention toward the screen. In the initial planning, this was the last possibility I had considered. With accidental electrocution being higher on my list of possibilities. The grandiose plan of mixing my thoughts and ideas in front of my eyes shrank. I was loving every second of it. I then later plugged the panel into the device and began writing code to make it react the way i wanted it to. I had programmed the panel to display the color blue when meditation was high and red when attention was high. Purple would occur during a balance of the two. I then took out my computer from the equation as a reader and decided to see what would happen by just watching these two stats work themselves out on a color panel. I got similar results. When I was actively attempting to meditate while simultaneously watching my level of meditation it was an unwavering red. Deep breaths and glances away from the panel would bring purple to blue colors. Then I tried something completely different. I attempted to radiate unconditional love for my brainwaves. I accepted them for their want to be attentive and alert. And embraced them with as much sincerity as I could. The panel turned purple and stayed blue for as long as i could keep this state up without wavering. "Wow" i remember remarking. I may have created the worlds first "Unconditional Love bench press". And your up to speed. FUTURE I have some ideas for the future of this project but I have caught myself in a mental enigma. How would one meditate to the thoughts of their meditation without their monitoring of the brainwaves getting in the way? Or have I missed the point of meditation which might be to have no thoughts? Ideas and suggestions would be great. I would love to hear what this community would have to offer to this device. Input on meditation? Input on the technical stuff? All is welcome.

Topic by TheIronHobo   |  last reply

Write output on registery inside ESP8266

Could any one help me please? I have the following code to make MODBUS tcp/ip(its work good) the other issue in the code is ultrasonic sensor (trig on D1& echo on D2 and output distance on serial port)I want to write distance on one of memory register say (3). I use the command "digitalWrite(distance, MBHoldingRegister[3] )" its fail then I use analogWrite also fail what's the solution?#include #define trigPin D1#define echoPin D2#define analog_output D5float distance;long duration;int dataIn;int m = 0;int h = 0;int t = 0;const char* ssid = "MH_Ext";const char* password = "74375325";int ModbusTCP_port = 502;//////// Required for Modbus TCP / IP /// Requerido para Modbus TCP/IP /////////#define maxInputRegister 20#define maxHoldingRegister 20#define MB_FC_NONE 0#define MB_FC_READ_REGISTERS 3 //implemented#define MB_FC_WRITE_REGISTER 6 //implemented#define MB_FC_WRITE_MULTIPLE_REGISTERS 16 //implemented// MODBUS Error Codes//#define MB_EC_NONE 0#define MB_EC_ILLEGAL_FUNCTION 1#define MB_EC_ILLEGAL_DATA_ADDRESS 2#define MB_EC_ILLEGAL_DATA_VALUE 3#define MB_EC_SLAVE_DEVICE_FAILURE 4// MODBUS MBAP offsets//#define MB_TCP_TID 0#define MB_TCP_PID 2#define MB_TCP_LEN 4#define MB_TCP_UID 6#define MB_TCP_FUNC 7#define MB_TCP_REGISTER_START 8#define MB_TCP_REGISTER_NUMBER 10byte ByteArray[260];unsigned int MBHoldingRegister[maxHoldingRegister];//////////////////////////////////////////////////////////////////////////WiFiServer MBServer(ModbusTCP_port);void setup() {pinMode(14, OUTPUT);pinMode(trigPin, OUTPUT);pinMode(echoPin, INPUT);Serial.begin(9600);delay(100) ;WiFi.begin(ssid, password);delay(100) ;Serial.println(".");while (WiFi.status() != WL_CONNECTED) {delay(500);Serial.print(".");}MBServer.begin();Serial.println("Connected ");Serial.print("ESP8266 Slave Modbus TCP/IP ");Serial.print(WiFi.localIP());Serial.print(":");Serial.println(String(ModbusTCP_port));Serial.println("Modbus TCP/IP Online");}void loop() {distance = getDistance();Serial.println(distance);delay(1000);// Check if a client has connected // Modbus TCP/IPWiFiClient client = MBServer.available();if (!client) {return;}boolean flagClientConnected = 0;byte byteFN = MB_FC_NONE;int Start;int WordDataLength;int ByteDataLength;int MessageLength;// Modbus TCP/IPwhile (client.connected()) {if(client.available()){flagClientConnected = 1;int i = 0;while(client.available()){ByteArray[i] = client.read();i++;}client.flush();///// code here --- codigo aqui///////// Holding Register [0] A [9] = 10 Holding Registers Escritura///////// Holding Register [0] A [9] = 10 Holding Registers Writing/// Enable Output 14digitalWrite(14, MBHoldingRegister[14] );digitalWrite(distance, MBHoldingRegister[12] );//// end code - fin//// rutine Modbus TCPbyteFN = ByteArray[MB_TCP_FUNC];Start = word(ByteArray[MB_TCP_REGISTER_START],ByteArray[MB_TCP_REGISTER_START+1]);WordDataLength = word(ByteArray[MB_TCP_REGISTER_NUMBER],ByteArray[MB_TCP_REGISTER_NUMBER+1]);}// Handle requestswitch(byteFN) {case MB_FC_NONE:break;case MB_FC_READ_REGISTERS: // 03 Read Holding RegistersByteDataLength = WordDataLength * 2;ByteArray[5] = ByteDataLength + 3; //Number of bytes after this one.ByteArray[8] = ByteDataLength; //Number of bytes after this one (or number of bytes of data).for(int i = 0; i < WordDataLength; i++){ByteArray[ 9 + i * 2] = highByte(MBHoldingRegister[Start + i]);ByteArray[10 + i * 2] = lowByte(MBHoldingRegister[Start + i]);}MessageLength = ByteDataLength + 9;client.write((const uint8_t *)ByteArray,MessageLength);byteFN = MB_FC_NONE;break;case MB_FC_WRITE_REGISTER: // 06 Write Holding RegisterMBHoldingRegister[Start] = word(ByteArray[MB_TCP_REGISTER_NUMBER],ByteArray[MB_TCP_REGISTER_NUMBER+1]);ByteArray[5] = 6; //Number of bytes after this one.MessageLength = 12;client.write((const uint8_t *)ByteArray,MessageLength);byteFN = MB_FC_NONE;break;case MB_FC_WRITE_MULTIPLE_REGISTERS: //16 Write Holding RegistersByteDataLength = WordDataLength * 2;ByteArray[5] = ByteDataLength + 3; //Number of bytes after this one.for(int i = 0; i < WordDataLength; i++){MBHoldingRegister[Start + i] = word(ByteArray[ 13 + i * 2],ByteArray[14 + i * 2]);}MessageLength = 12;client.write((const uint8_t *)ByteArray,MessageLength);byteFN = MB_FC_NONE;break;}}}//===== getDistance - Custom Functionint getDistance() {// Clears the trigPindigitalWrite(trigPin, LOW);delayMicroseconds(2);// Sets the trigPin on HIGH state for 10 micro secondsdigitalWrite(trigPin, HIGH);delayMicroseconds(10);digitalWrite(trigPin, LOW);// Reads the echoPin, returns the sound wave travel time in microsecondsduration = pulseIn(echoPin, HIGH);// Calculating the distancedistance = duration * 0.034 / 2; // distance in cmreturn distance;}

Question by methaq_ali