author

uludirik

1
Inbox View Profile
4Comments

Tell us about yourself!

  • MY ARDUINO CODES#include <SoftwareSerial.h> //SoftwareSerial mySerial(10, 11); // RX, TXint KanalBir,KanalBir2,KanalIki,KanalIki2,KanalUc,KanalUc2;int KanalBirBolme,KanalBirMod,KanalIkiBolme,KanalIkiMod,KanalUcBolme,KanalUcMod,ProgressBar;int HavaHizAlarmi;String message; void setup() { pinMode(0, INPUT); pinMode(1,INPUT); pinMode(2,INPUT); pinMode(5,OUTPUT); pinMode(13, OUTPUT); pinMode(12, OUTPUT); pinMode(2,OUTPUT); pinMode(3,OUTPUT); Serial.begin(57600); while (!Serial) { // ; } Serial.println("Serial On"); mySerial.begin(9600); }void loop() { Serial.println(message);while (!mySerial.available()){ KanalBir=analogRead(0); KanalBir2=map(KanalBir,0,1023,0,50); KanalBirBolme=KanalBir2/10; KanalBirMod=Kan…

    see more »

    MY ARDUINO CODES#include <SoftwareSerial.h> //SoftwareSerial mySerial(10, 11); // RX, TXint KanalBir,KanalBir2,KanalIki,KanalIki2,KanalUc,KanalUc2;int KanalBirBolme,KanalBirMod,KanalIkiBolme,KanalIkiMod,KanalUcBolme,KanalUcMod,ProgressBar;int HavaHizAlarmi;String message; void setup() { pinMode(0, INPUT); pinMode(1,INPUT); pinMode(2,INPUT); pinMode(5,OUTPUT); pinMode(13, OUTPUT); pinMode(12, OUTPUT); pinMode(2,OUTPUT); pinMode(3,OUTPUT); Serial.begin(57600); while (!Serial) { // ; } Serial.println("Serial On"); mySerial.begin(9600); }void loop() { Serial.println(message);while (!mySerial.available()){ KanalBir=analogRead(0); KanalBir2=map(KanalBir,0,1023,0,50); KanalBirBolme=KanalBir2/10; KanalBirMod=KanalBir2%10; ProgressBar=map(analogRead(0),0,1023,0,100);//-------------------------------------------------------------- KanalIki=analogRead(1); KanalIki2=map(KanalIki,0,1023,0,50); //-------------------------------------------------------------- ProgressBar=map(analogRead(0),0,1023,0,100); ////-------------------------------------------------------------- if ((analogRead(0)) < HavaHizAlarmi){ digitalWrite (5,HIGH); delay (250); digitalWrite (5,LOW); delay (250); } if (message.length() > 14 ){ //-------------------------FAN AÇIK----------------------------- if (message[3] == '0' && message[4] == '4' ){ delay (10); digitalWrite(13, HIGH); message = ""; } // --------------------FAN KAPALI--------------------------------- if (message[3] == '1' && message[4] == '4' ){ delay (10); digitalWrite(13, LOW); message = ""; } //-------------------------ISIK AÇIK------------------------------------ if ( message[3] == '0' && message[4] == '5' ){ delay(10); digitalWrite(12, HIGH); message = ""; } //-------------------------ISIK KAPALI------------------------------- if (message[3] == '1' && message[4] == '5' ){ delay (50); digitalWrite(12, LOW); message = ""; } //-----------------------YUKARI HAREKET BAŞLADI---------------------- if (message[4] == '2' && message[5] == '1' ){ digitalWrite(2, HIGH); delay(5); message = ""; } //----------------------YUKARI HAREKET DURDU--------------------------------- if (message[4] == '2' && message[5] == '0' ){ digitalWrite(2, LOW); message = ""; } //------------------------AŞAĞI HAREKET BAŞLADI----------------------------------- if (message[4] == '3' && message[5] == '1' ){ digitalWrite(3, HIGH); delay(5); message = ""; } //---------------------------AŞAĞI HAREKET DURDU----------------------------- if (message[4] == '3' && message[5] == '0' ){ digitalWrite(3, LOW); message = ""; } //---------------------------HAVA HIZ SINIR ALARMI-------------------------------- if (message[4] == '7' && message[5] == '0' ){ HavaHizAlarmi = 150; } //------------------GELEN KODLARI FİLTRELEME---------------------------------------- message = ""; }// --------------------sensör bilgilerini tanımlayıp gönderme---------------------------//---------------------------------------------------------- if (message[4] != '9' && message[5] != '9' ){ String sendThis = ""; delay(50); sendThis = "n0.val="; sendThis.concat(KanalBirBolme); writeString(sendThis); message = ""; delay (10); //---------------------------------------------------------- String sendThis2 = ""; delay(50); sendThis2 = "n1.val="; sendThis2.concat(KanalBirMod); writeString(sendThis2); message = ""; delay (10); //---------------------------------------------------------- String sendThis3 = ""; delay(50); sendThis3 = "n2.val="; sendThis3.concat(KanalIki2); writeString(sendThis3); message = ""; delay (10); //----------------------------------------------------------- String sendThis4 = ""; delay(50); sendThis4 = "j0.val="; sendThis4.concat(ProgressBar); writeString(sendThis4); message = ""; delay (10); String sendThis5 = "";//---------------------------------------------------- delay(50); sendThis5 = "n6.val="; sendThis5.concat(analogRead(0)); //GEÇİCİ writeString(sendThis5); message = ""; delay (10); //--------------------------------------------------- } if ( message[0] == '2' ){ // çürük gelen kodlar için filtreleme message = ""; }} while (mySerial.available()){ message.concat(mySerial.read()); } }//---------------------SENSÖR DATALATININ SONUNA ONDALIK EKLEME-------------------void writeString(String stringData) { for (int i = 0; i < stringData.length(); i++) { mySerial.write(stringData[i]); } mySerial.write(0xff); mySerial.write(0xff); mySerial.write(0xff);}// end writeString function

    Hi Mr.GideonThanks for yours sharing.I made your project but,ı created two diffretns page in nextion editor. First pages is is potentiometer project.Second pages is button&led project.when I open the second page,my nextion sends meaningless and very fast stringsfor example; "262552552552625525525526255255255262552552552625525525526255255255262552552552625525525526255255255262552552552625525525526255255255262552552552625525525526255255255"why did this ?Thank you very much for your help.

    View Instructable »
  • uludirik followed AlanV2
      • Smart Home Automation With Android + Ethernet Internet + Arduino
  • I like your work very much. Thank you so much.You sent a variable here, but how is TXT sent?for example; When you have a 5v input, you see the "active" TXT on the screeni try this;String sendThis = ""; Delay (50); SendThis = "t1.txt ="; SendThis.concat ("active"); WriteString (sendThis);But he did not work.

    View Instructable »
  • Hi Gideon, I am influenced your works. But i have a questions.In this cods 2XLED how come ?i made but 2.led did not work efficiently??Whats this hint :)

    View Instructable »
      • Writing From Arduino Uno to Nextion
      • Getting Started With Arduino and Nextion (pt 3)
      • Peltier Fermentation Chamber for Beer