0% found this document useful (0 votes)
18 views3 pages

Define Echo 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

Define Echo 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

#define echo 3

#define echo 4

Void setup() {

Serial.begin(9600);

pinMode(echo,INPUT);

pinMode(trig,OUTPUT);

Void loop() {

digitalWrite(trig,LOW);

delay(100);

digitalWrite(trig,HIGH);

delay(100);

digitalWrite(trig,LOW);

int duration = pulseIn(echo, HIGH);

int distance = (duration/2) * 0.034;

;Serial.print (“distanceincm: “)

>include <DFRobot_DHT11.h#

DFRobot_DHT11 DHT

define DHT11_PIN 2#

{ )(Void setup

;Serial.begin(9600)

{ )(Void loop

;DHT . read(DHT11_PIN)
; Serial . print (“temp: “)

; Serial . print (DHT . temperature)

; Serial . print (“ humi : “ )

; Serial . printLn (DHT . humidity)

} ; Delay (1000)

define LDR A0#

{ )(Void setup

; Serial . begin (9600)

{ )( Void loop

; Int value = analogread (LDR)

; Serial . printLn ( value )

} ; Delay (100)

{ )( Void setup

; Serial . begin ( 9600 )

; pinMode (5, INPUT )

{ )( Void loop

; digitalRead (5)

; Serial . print (“look out fire “ )

; Serial . printLn (digitalRead (5) )

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy