Nextion Display LED On Off with Dual State Button & Image

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 50

  • @ahmadhumadi3153
    @ahmadhumadi3153 2 роки тому +2

    Thank you for your efforts, we'll explained and demonstrated, greatly appreciated 🙏

  • @joescopo8933
    @joescopo8933 Рік тому

    Great video! I can now use a duel state button on my project. Thank you!

  • @chain3519
    @chain3519 3 роки тому

    Let me go ahead and leave a like for this straightforward tutorial

  • @itsme.6863
    @itsme.6863 3 роки тому

    I learned something, so I clicked thumps-up. Thanks.

  • @donaldwright2426
    @donaldwright2426 4 роки тому

    I'm using your example code to stop and start a pulse motor that the Arduino MEGA runs. Your code is simple as Panali mentionned. Eventually it will be a 3phases PMSM... Just learning right now!

  • @bugkuska
    @bugkuska 2 роки тому

    do you have example use more than 1 button?

  • @badusha_ali_
    @badusha_ali_ Рік тому

    sir nextion or dwin is better display

  • @electronic7979
    @electronic7979 4 роки тому +1

    Nice project. Very good

  • @kamilzdunczyk2245
    @kamilzdunczyk2245 4 роки тому

    nice example
    but what should I do if I want to have similar such buttons??

  • @BucuranIoan
    @BucuranIoan 9 місяців тому

    i have on situation.... i using two page. in the 2 page i use the dual state button. if i change the state of the button from OFF to ON and back to the page 1, when i back again to the page 2, the button state is not keep the state, button state is off. why?

  • @imextradeco.6689
    @imextradeco.6689 4 роки тому

    Thank you for the easy-to-understand Tutorial. I have something to ask you. Could you give me any good ideas? My goal is to display the Arduino EEPROM stored values in a box (x0.val) on a particular page. I'm stumbling right now, I don't know how to get the page ID currently displayed on the TFT screen. Could you please teach me?

  • @surenderkumar-yi1ig
    @surenderkumar-yi1ig 2 роки тому

    Very useful video thank you sir

  • @Counterpoint69
    @Counterpoint69 Рік тому

    😮Hello. Your code works well for one dual state switch. However it won’t work for multiple dual state switches on one page or dual state switches on several pages. I’ve tried the following code on an Arduino 2560 but it doesn’t turn on the built-in LED on the Arduino board (pin 13). I'm using a dual state button with this. Any help would be appreciated.
    #include "Nextion.h"
    int ledPin = 13;
    NexDSButton bt0 = NexDSButton(2, 9, "bt0");
    uint32_t dual_state=0;
    void setup(void){
    nexInit();
    pinMode(ledPin, OUTPUT);
    }
    void loop(void){
    bt0.getValue(&dual_state);
    delay(200);
    if(dual_state==1)
    {
    digitalWrite(ledPin, HIGH);
    }
    else if(dual_state==0)
    {
    digitalWrite(ledPin, LOW);
    }
    }

  • @rockrock4478
    @rockrock4478 Рік тому

    How to add one or two more buttons to a sketch, please?

  • @Tecnotronics223
    @Tecnotronics223 3 роки тому

    Very very nice.... Regards to you 👍

  • @adnanyounus6192
    @adnanyounus6192 2 роки тому

    Hello Sir,
    Hope you are doing well.
    Please let me know is it possible to proceed same project with Raspberry Pi Pico ?
    If yes please make a toturial on it.
    Thanks

  • @pch4287
    @pch4287 3 роки тому

    Very helpfull video.Thank you

  • @Microsree28134
    @Microsree28134 4 роки тому

    Sir,
    Please make a video on Nextion display sleep and wake mode

  • @mouseminer2978
    @mouseminer2978 3 роки тому

    Very nice. What if I have two switches. How Arduino is going to distinguish, which is on and which is off.

    • @rachelchow4512
      @rachelchow4512 3 роки тому +1

      Hi will you consider to look at the DWIN display?kindly send me an email or message referring to my banner contact info.

  • @Microsree28134
    @Microsree28134 4 роки тому

    Whu did yo put ") " in else if statement..?

  • @pravado81
    @pravado81 4 роки тому

    The coding that is used in the editor. What language is it?

  • @federicoferrara125
    @federicoferrara125 4 роки тому +1

    Good evening, excellent project but this error appears to me:
    print bt0.val
    if bt0.val == 1
    {
    t0.txt = "LED ON"}
    else if (bt0.val == 0)
    {
    t0.txt = "LED OFF"}
    SYNTAX ERROR :EXTRA "{{( appears. Can you tell me what to do thanks

    • @federicoferrara125
      @federicoferrara125 4 роки тому

      Signor Savaranan,gentilmente puo' rispondere alla mia domanda?.Grazie

  • @pablosaizortuno4740
    @pablosaizortuno4740 4 роки тому

    It is possible to do it without the screen? I mean, just from the debug mode simulation, connecting the computer to the Arduino

    • @chain3519
      @chain3519 3 роки тому

      Probably not helpful to you now, but in the debug panel there's an option in the bottom left corner called User MCU input. This brings up a COM port selector tool. From there I'm sure you could hook in an arduino or even just simulate an arduino using PUTTY

  • @STMONDEO1
    @STMONDEO1 4 роки тому

    Pete.
    Hi Saravanan.
    i am new to this Arduino Program.
    Trying to run your code but keep getting error message ( EXPECTED INITIALIZER BEFORE NUMERIC CONSTANT )

    • @kamilzdunczyk2245
      @kamilzdunczyk2245 4 роки тому +2

      let me know if it works
      #define SWITCH_ON 1
      #define SWITCH_OFF 0
      const int led = 12;
      byte received_data[4];
      int switch_pos;
      void setup() {
      // put your setup code here, to run once:
      Serial.begin(9600);
      Serial.println("ready");
      pinMode(led,OUTPUT);
      digitalWrite(led, LOW);
      }
      void loop() {
      // put your main code here, to run repeatedly:
      int i;
      while (Serial.available() > 0) {
      switch_control();
      }
      }
      void switch_control() {
      int size = Serial.readBytesUntil('
      ', received_data, 4);
      // First Byte has the switch position data
      switch_pos = received_data[0];
      Serial.print("SWITCH:");
      if (switch_pos == SWITCH_ON) {
      Serial.println("ON");
      digitalWrite(led, HIGH);
      } else if (switch_pos == SWITCH_OFF) {
      Serial.println("OFF");
      digitalWrite(led, LOW);
      }
      }

    • @Rebel-from-Hell
      @Rebel-from-Hell Рік тому

      Did you ever figure this out Pete?

  • @MrDelta830
    @MrDelta830 3 роки тому

    Morning sir AL, with Nexion software it's possible to dowload a project from display to computer for make some modifications ? Example text, color, ecc. Thanks

    • @rachelchow4512
      @rachelchow4512 3 роки тому

      Hi will you consider to look at the DWIN display?kindly send me an email or message referring to my banner contact info.

  • @palanik1960
    @palanik1960 4 роки тому

    Excellent and simple.
    Good product demo.Can you please extend the project for practical application like home device control or as security application.

    • @donaldwright2426
      @donaldwright2426 4 роки тому

      I use it to show the RPM, frequency of a pulse motor. Also instaured a dual button to start and stop the pulse motor. The pulse motor was in part 3D printed and salvage a relay coil that I modified to adapt as a stator coil to my 3D pulse motor.
      Regards.

    • @NRL_04
      @NRL_04 4 роки тому

      I used it to make a "dark mode" switch for my wather station project. The limits are in your imagination.

  • @advancedperformance9721
    @advancedperformance9721 3 роки тому

    Thanks alot sir

  • @muhammadazka1868
    @muhammadazka1868 2 роки тому

    hello sir , i love your videos. but can you make a program similar to this but using software serial instead of rx tx in the arduino?? that would be more helpfull thanks :)

  • @elizetebezerra3391
    @elizetebezerra3391 Рік тому

    Comprei um celular,já faz 1mês e não chegou,e me cobraram também 77 90não sei de que

  • @STMONDEO1
    @STMONDEO1 4 роки тому

    Hi can not get to UPLOAD to my Arduino UNO.
    Can anybody help with this project.
    Thanks

    • @kamilzdunczyk2245
      @kamilzdunczyk2245 4 роки тому

      you have the answer in the post below.
      let me know if it works

  • @АнатолийМ-ь9к
    @АнатолийМ-ь9к Рік тому

    А у нас выключатели включаются в верх а в низ выключаются.

  • @michaelnessim
    @michaelnessim 3 роки тому

    link is down

  • @chandrapurnama6777
    @chandrapurnama6777 2 роки тому

    i nned link driver ch340

  • @forkus2000
    @forkus2000 4 роки тому

    But this is a very bad solution , because you never send the id of the button to the microproccessor , whath happens if you have two buttons ? how can you detect from wich button send the command? do the same with 3 buttons ... and you see what i talking about....Thanks

    • @jokkiossaka3306
      @jokkiossaka3306 4 роки тому

      No problem, every button have other ID...

    • @kritsadaonkhong3148
      @kritsadaonkhong3148 3 роки тому

      Hello, I ran into this problem. I don't know how to fix the problem.

    • @kritsadaonkhong3148
      @kritsadaonkhong3148 3 роки тому

      @@jokkiossaka3306 help me

    • @rachelchow4512
      @rachelchow4512 3 роки тому

      @@kritsadaonkhong3148 Hi will you consider to look at the DWIN display?kindly send me an email or message referring to my banner contact info.

  • @daryl7237
    @daryl7237 2 роки тому

    Hi there! i really like all your Nextion display video thank you ! it really help on some of my project, is there any way that i can message u when i face any coding problem? email