Programación de El Secador de Frutas

Please download to get full document.

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
 12
 
  Programación de El Secador de Frutas en arduino
Share
Transcript
  PROGRAMACIÓN DE EL SECADOR DE FRUTAS //PUERTOS CONFIGURACION ********************************************************** const int Inicio = 2; // the number of the SENSOR pin //const int Sensor1 = 3; // the number of the SENSOR pin const int Sensor1 = A2; const int Banda = 5; // the number of the SENSOR pin const int LED = 13; // the number of the LED pin const int Ventilador = 9; // the number of the pin const int Niquelina = 10; // the number of the pin const int SensorLM317 = A0; //Sensor LM317 int ValorLm317 = 0; // value read from the LM317 //VARIABLES************************************************************************ int dato1; // Variable int dato2; int Temperatura; void setup() { Serial.begin(9600); pinMode(Inicio, INPUT); pinMode(Sensor1, INPUT); pinMode(Banda, OUTPUT); pinMode(LED, OUTPUT); pinMode(Ventilador, OUTPUT); pinMode(Niquelina, OUTPUT); } void loop() { digitalWrite(Banda, LOW); digitalWrite(Ventilador, LOW);   digitalWrite(Niquelina, LOW); dato1 = digitalRead(Inicio); while (dato1 == HIGH) //Esperamos por Pulso de Inicio { dato1 = digitalRead(Inicio); digitalWrite(LED, HIGH); delay(100); digitalWrite(LED, LOW); delay(100); dato2 = analogRead(Sensor1); Serial.println(dato2); ValorLm317 = analogRead(SensorLM317); //AQUI OJO SE PUEDE HACER TRANFORMACION DE VOLTAJE A GRADOS Serial.println(ValorLm317); } dato2 = analogRead(Sensor1); while (dato2 > 200)//Esperamos hasta q el objeto llegue a secado { dato2 = analogRead(Sensor1); //Serial.println(dato2); digitalWrite(Banda, HIGH); } digitalWrite(Banda, LOW); ValorLm317 = analogRead(SensorLM317); while (Temperatura < 30) //Esperamos hasta q temperatura llegue a x { ValorLm317 = analogRead(SensorLM317); //AQUI OJO SE PUEDE HACER TRANFORMACION DE VOLTAJE A GRADOS   Temperatura = (ValorLm317 / 1023.0) * 5000;; Temperatura = Temperatura / 10; Serial.println(Temperatura); digitalWrite(Ventilador, HIGH); digitalWrite(Niquelina, HIGH); digitalWrite(LED, HIGH); delay(1000); digitalWrite(Ventilador, LOW); delay(8000); } digitalWrite(Banda, HIGH); //sale las cosas del area de secado digitalWrite(Ventilador, LOW); digitalWrite(Niquelina, LOW); digitalWrite(LED, LOW); delay(3000); // se activa la banda por 5 segundos digitalWrite(Banda, LOW); }
Related Search
Similar documents
View more
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x