ENJOYE /* AnalogReadSerial Reads an analog input on pin 0, prints the result to the Serial Monitor. Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu). Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. This example code is in the public domain. www.arduino.cc/en/Tutorial/AnalogReadSerial */ // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); pinMode(13, OUTPUT); } // the loop routine runs over and over again forever: void loop() { // read the input on analog pin 0: int sensorValue = analogRead(A0); // print out the value you read: Serial.println(sensorValue); delay(500); // delay in between reads for stability if ( int sensorValue=0){ digitalWrite(13, HIGH); } else digitalWrite(13, LOW); }
best straightforward tutorial I have ever come across, +1
Thank you so much
@@identica450 code pls jii
Bro kya hum fire fighting robot main flame sensor ki jagah smoke detector used kar sakte hai kya???
I have a doubt y arduino... Without that u can do rgt... Bcoz same work smoke detector does
where did u get the code from?
Example code comes with the Arduino SDK kit which is free to download. A quick google should lead you to it.
What is the program you instal in the laptop that runs arduino code for a smoke detector please ?
sir when i brought smoke near sensor value is increasing
Code please I need code please.... help me
Please give me the coding
Code plz
can you give me a coding?
no code???????
Give them code as long as you have it will be better
Not working😥
Where is the code !🙄
code please
nice dude
code bro
Doesnt work
Codes pls?
ENJOYE
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
www.arduino.cc/en/Tutorial/AnalogReadSerial
*/
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
pinMode(13, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(500); // delay in between reads for stability
if ( int sensorValue=0){
digitalWrite(13, HIGH);
}
else
digitalWrite(13, LOW);
}
;lol
@@sanjayniranjanbalaji9530 why lol ?
code please
Code bro
upload analog read code which is in example of arduino