Using Time Input Widget to set timer On/Off in New Blynk 2.0 | JAKK DIY

แชร์
ฝัง

ความคิดเห็น • 123

  • @TheGad999
    @TheGad999 ปีที่แล้ว

    แบบนี้ที่ตามหาเลยครับ ขอบคุณมากๆ เลยครับผม

  • @abdulrosyid5010
    @abdulrosyid5010 ปีที่แล้ว

    Great tutorial. if i want to use 4 led what should be added?

  • @lordchatchawan8243
    @lordchatchawan8243 ปีที่แล้ว

    อยากให้อธิบายโค้ดที่แก้ไขเพื่อเป็นความรู้ในการต่อยอดด้วยครับ ขอบคุณครับ

  • @abisiwiroiswicaksono95
    @abisiwiroiswicaksono95 ปีที่แล้ว

    excuse me sir, how do i get real time in my country? I tried to change the default time with the value of the Epoch Times converter and the result is 1 hour differenc. thanks

  • @uwuvlrrr8868
    @uwuvlrrr8868 2 หลายเดือนก่อน

    ถ้าจะเอาไปใช้กับ ESP32 ต้องปรับตรงไหนบ้างหรอครับ พน.ต้องส่งแล่ว 🥹

  • @user-pkp189
    @user-pkp189 ปีที่แล้ว

    สวัสดีค่ะ อยากทราบว่าถ้าแปลงโค้ดให้เปลี่ยนจากการตั้งเวลาปิดเปิดอัตโนมัติ เป็น ตั้งเวลาเปิด แล้วปิดด้วยการใช้ปุ่ม จะต้องแก้ไขโค้ดได้ยังไงบ้างคะ

  • @user-yy9hs6kw6i
    @user-yy9hs6kw6i ปีที่แล้ว

    อยากจะขอให้พี่อธิบายตรงส่วนที่พี่แก้ไขเพิ่มเติมหน่อยครับ

  • @tiraphonsiburin371
    @tiraphonsiburin371 ปีที่แล้ว

    ถ้าเราจะตั้งทุกๆ2ชั่วโมง เราต้องเอา Time input
    มากี่อันครับ สอนทำหน่อยครับ ขอบคุณครับ

  • @ORIONPESMOD
    @ORIONPESMOD ปีที่แล้ว

    cảm ơn bạn rất nhiều, video bạn giúp mình rất nhiều việc luôn, ủng hộ bạn ra nhiều video

  • @angiegarciace
    @angiegarciace ปีที่แล้ว

    hello, great tutorial... if i wanted to change the led for a buzzer, could i? and what widget could you add in the environment

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      Maybe the code has to be modified a bit

  • @Speedgamer21
    @Speedgamer21 2 ปีที่แล้ว

    Hello, How can I have a manual override of the current status of the LED? like for example the switch can turn off the lights even there is a set time in timer?

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว +1

      It is not supported on this tutorial.
      You have to modify the Arduino code. I implemented what you are talking about on this video: th-cam.com/video/XIaxRwb44xA/w-d-xo.html
      So you can adapt it to what you want.

    • @Speedgamer21
      @Speedgamer21 2 ปีที่แล้ว +1

      @@jakkdiy Thank you! definitely I will check that one.

  • @storiesaqua
    @storiesaqua ปีที่แล้ว

    nice tutorial jakk, can i set 2 timers in 1 lamp?
    example set by timer light turns on at 07:00 am and turns off at 10:00 am then turns on again at 15:00 pm and turns off at 19:00 pm on the same day.

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      Try to start and adapt from this video th-cam.com/video/JTSeFe1KoyU/w-d-xo.html

  • @tukangngoprek9119
    @tukangngoprek9119 2 ปีที่แล้ว

    What if i use ESP 32? How is the code?

  • @santoshbabu517
    @santoshbabu517 2 ปีที่แล้ว +1

    hi jakk very nice tutorial. i want to override the timer when timer is going on . or in simple i want to turn on and off when timer is going on can you plz let me know where to change the code. thank you

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      You can adapt the code from this video th-cam.com/video/ICQyqEjFwio/w-d-xo.html

    • @santoshbabu517
      @santoshbabu517 2 ปีที่แล้ว

      @@jakkdiy thank you for your reply ill see it i am newbee in this ill be thank ful if you give some clue for this code.

  • @panandawankhalid6944
    @panandawankhalid6944 ปีที่แล้ว +1

    Wow nice tutorial jakk, bighelp for me what is part 2 for coding step by step and thank you hehehe :)

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      OK I will

  • @aimanfahmi6527
    @aimanfahmi6527 ปีที่แล้ว

    where do i need to put the auth token,wifi name and password

  • @ikrammohamdi4439
    @ikrammohamdi4439 4 หลายเดือนก่อน

    In serial monitor Nothing appears . Why?

  • @sarnoanaksholeh6704
    @sarnoanaksholeh6704 ปีที่แล้ว

    Projek bagus pak..sudah saya coba dan working..bagaimana supaya membuat 4 Led.4 timer..!!

  • @anggitarwianata3827
    @anggitarwianata3827 2 ปีที่แล้ว +1

    hi sir, I want to add 2 more outputs. (relay module 4 ch), which part of the sketch program do I need to add/modify? please help me sir :)

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      3 questions,
      1. Which virtual pins will you be using for other 2 timers?
      2. Which digital pins of the NodeMCU will you be using for other 2 relays?
      And the last question, where are you from? 😁

    • @akshayharidas1235
      @akshayharidas1235 2 ปีที่แล้ว

      @@jakkdiy V2,v3

    • @anggitarwianata3827
      @anggitarwianata3827 ปีที่แล้ว

      @@danone8964 is your problem solved?

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว +1

      I have another clip that using 4 relays with 2 timers for each relay (that clip is watering 4 channels) please take a look. Not sure if it is what you want.

  • @natthaphongphonlasen5351
    @natthaphongphonlasen5351 6 หลายเดือนก่อน

    สามารถประยุกต์ใช้งานกับrelay ได้มั้ยครับ

    • @jakkdiy
      @jakkdiy  6 หลายเดือนก่อน

      ได้ครับ ต่อวงจรขับรีเลย์แทนหลอด LED ได้เลย

  • @adhimsuryahidayat8921
    @adhimsuryahidayat8921 ปีที่แล้ว

    Apakah ini menggunakan external RTC?

  • @user-yb6gg8gv6c
    @user-yb6gg8gv6c 2 ปีที่แล้ว

    Blynk 2.0 สามารถexport
    ข้อมูลจากchart ได้ไหมครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      ทำได้เฉพาะเวอร์ชั่นเสียตังค์ครับ

  • @waritsooktorn6514
    @waritsooktorn6514 2 ปีที่แล้ว

    สามารถตั้งใส่รีเลย์ได้มั้ยครับ ขอบคุณครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      ได้ครับ​ การใช้งานรีเลย์ดูจากคลิปนี้ครับ​
      th-cam.com/video/G5s-l8yhcf8/w-d-xo.html

    • @waritsooktorn6514
      @waritsooktorn6514 2 ปีที่แล้ว

      @@jakkdiy ขอบคุณครับ 🙏🏻

  • @wissdo
    @wissdo ปีที่แล้ว

    👏😍

  • @kasemsakkrungsai1503
    @kasemsakkrungsai1503 2 ปีที่แล้ว

    ปุ่มสลับกัน ONเป็นOFF ตั้งเวลาก็สลับStop เป็น Start แก้ตรงไหนครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว +1

      แก้โค้ดในฟังก์ชั่น void led_mng() ตามด้านล่างนี้นะครับ
      จาก
      digitalWrite(D0, led_status[0]);
      digitalWrite(D1, led_status[1]);
      เป็น
      digitalWrite(D0, !led_status[0]);
      digitalWrite(D1, !led_status[1]);

    • @kasemsakkrungsai1503
      @kasemsakkrungsai1503 2 ปีที่แล้ว

      ขอบคุณครับ

  • @phonepasongaphaiyalath3683
    @phonepasongaphaiyalath3683 2 ปีที่แล้ว

    มีโค้ดที่ง่ายกว่านี้ไหมครับ แค่ตั้งเวลาเปิดปิด relay ต้องเขียนต้องรับค่ายังไงดีครับ พอดี มือใหม่ครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      สามารถใช้โค้ดตัวนี้ได้ครับ​ บนแอพก็สร้างแค่​ widget time input ไม่ต้องสร้าง​ widget button สำหรับกดเปิดปิด

    • @phonepasongaphaiyalath3683
      @phonepasongaphaiyalath3683 2 ปีที่แล้ว

      @@jakkdiy คือผมอยากรวมโค้ดของพี่เข้ากับโค้ดของผมนะครับ แล้วต้องทำยังไงครับ ต้องเอาตัวแปรในโค้ดพี่ตัวไหนมาเปรียบเทียบกับ param.asLong() จึงรู้ว่า blynk ตั้งเวลาเปิดปิดตอนกี่โมงอ่ะครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      งั้นลองเอาโค้ดของคุณมารวมกับของผมได้มั้ยครับ​ ส่วนตั้งเวลาก็ทำงานได้อยู่แล้ว​ และโค้ดของคุณคุณก็รู้อยู่แล้วว่ามันทำงานยังไง​ จะได้ไม่ต้องทำความเข้าใจโค้ดของผมครับ

  • @witthawatlanalao7515
    @witthawatlanalao7515 2 ปีที่แล้ว

    ถ้าต้องการตั้งเวลาหลายๆครั้งแต่ใช้เอาพุตตัวเดียวได้ไหมครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      ได้ครับ​ แต่ต้องแก้โค้ด​ arduino​ ด้วย

    • @witthawatlanalao7515
      @witthawatlanalao7515 2 ปีที่แล้ว

      @@jakkdiy ต้องแก้ส่วนไหนครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      เพิ่มส่วนของการรับค่า​ time input จาก​ blynk​ และเพิ่มส่วนของการควบคุม​ output ครับ​

  • @DOMEDARK37
    @DOMEDARK37 2 ปีที่แล้ว +1

    10:35 ทำยังไงให้รับคำสั่งจากปุ่มกดครับ?

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      ต้องไล่โค้ดดูแล้วแก้โค้ดครับ​

  • @PooEE1997
    @PooEE1997 2 ปีที่แล้ว

    บางวันไม่ยอมเปิดให้เป็นเพราะไรครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      ข้อเสียของโค้ดตัวนี้คือ​บอร์ดต้องเชื่อมต่อกับ​ WiFi​ ตลอดเวลา​ จึงจะสามารถดึงเวลาจาก​ server ได้​ วันไหนที่ไม่ทำงานอาจเป็นไปได้ว่าบอร์ดเชื่อมต่อเน็ตไม่ได้ครับ

  • @BBjungs
    @BBjungs 2 ปีที่แล้ว

    ถ้าต้องการออกแบบให้ timer เปิดปิด หลายครั้งแต่คนละช่วงเวลา ภายในวันเดียว เราต้องทำยังไงครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว +1

      แก้ไขโค้ด​ แก้ไขแอพ​ แก้ไข​ datastream​s ครับ​ ดูแนวทางจากโปรเจครดน้ำต้นไม้​ 4 channels 2 Timers ที่ผมทำไว้ก็ได้ครับ

  • @pierricdoublet6248
    @pierricdoublet6248 ปีที่แล้ว

    It doesn’t work! Neither the timer nor the LED lighting and disconnection after 10 seconds!

  • @vincentramos3575
    @vincentramos3575 ปีที่แล้ว

    How to do it in servo motor with timer?
    using blynk 2.0

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว +1

      It is similar to a video of fish feeder project I made in my youtube channel, please find it.

  • @witthawatlanalao7515
    @witthawatlanalao7515 2 ปีที่แล้ว

    อัพโหลดแล้วขึ้นว่า blynk edgent.h no such file or directory คืออะไรอะครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      ลองคอมไพล์​ example project ที่ชื่อ​ edgent_esp8266 แล้วติด​ error มั้ยครับ

    • @witthawatlanalao7515
      @witthawatlanalao7515 2 ปีที่แล้ว

      @@jakkdiy คอมไพล์ผ่านครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      งั้นอาจจะต้อง​ save as edgent_esp8266​ ออกมาแล้ว​ copy file ที่อยู่ในโฟลเดอร์นี้​ ไปวางไว้โฟลเดอร์โค้ดของเราด้วยครับ​ เหมือนคอมไพเลอร์จะหาไม่เจอ

    • @witthawatlanalao7515
      @witthawatlanalao7515 2 ปีที่แล้ว

      @@jakkdiy อ่อขอบคุณครับ

    • @ikrammohamdi4439
      @ikrammohamdi4439 5 หลายเดือนก่อน

      The same problem

  • @user-wm7jz5rj7h
    @user-wm7jz5rj7h 2 ปีที่แล้ว

    เราสามารถควบคุมจากระยะไกลได้ไหมครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      ได้ครับ​ ในคลิปผมก็สั่งงานผ่านอินเตอร์​เน็ต​ครับ

    • @user-wm7jz5rj7h
      @user-wm7jz5rj7h 2 ปีที่แล้ว

      @@jakkdiy ครับ

  • @akshayharidas1235
    @akshayharidas1235 2 ปีที่แล้ว

    How can I set am or pm in the timer section and how to add multiple timer event for each relays 🥴...
    Can you please send a code complete corrected code... Please 🥺💫

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      It can use with either 24 hours or AMPM formats

    • @akshayharidas1235
      @akshayharidas1235 2 ปีที่แล้ว

      @@jakkdiynow I'm using old blyk app version and using one of your code 4 relay channel lights on off ....
      I used this code to make my bird cage fully automatic....
      I build a feeder section, it uses servo motor .. and there is a shutter window so there uses a gear motor.I connected gear motor to one relay, and need to connect the servo motor ... I know that Relay is used as switch but I need to connect one servo motor to that Relay and it needs to work move it's rotation from 0° to 90° and need it to return back to its orginal state 0°, so that the feeder mouth opening will work correctly.How to add this servo rotation portion code in this....?

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      I am making a new clip (automatic fish feeder) and I use a servo motor on this project, let's see if it can fulfill what you need.

    • @akshayharidas1235
      @akshayharidas1235 2 ปีที่แล้ว

      @@jakkdiy in that I used a 12 volt motor , my question is how to control servo direction and operate motor normally.... I hope I will get what I want from your next project.... 💫Is that almost completed?

    • @akshayharidas1235
      @akshayharidas1235 2 ปีที่แล้ว

      @@jakkdiy bro, did you complete the coding of fish feeder...? Can I use that code in old blynk app....?

  • @worrapoomluksanalamal4619
    @worrapoomluksanalamal4619 ปีที่แล้ว

    ถ้าจะตั้งให้เป็นเดือนเลยได้ไมครับไม่ใช่แค่ 1 สัปดาห์

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      ณ​ ตอนนี้ยังไม่ได้ครับ

  • @orang6405
    @orang6405 ปีที่แล้ว +1

    what if given a relay module?

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      Do it.

  • @puttala
    @puttala ปีที่แล้ว +1

    error #include ทำยังไงครับ

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      th-cam.com/video/aA7IE57y8xA/w-d-xo.html

  • @tanqmays
    @tanqmays ปีที่แล้ว

    timer.run() มัน error แก้ยังไงเหรอคะ

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      ลงไลบรารี่ครับ

  • @ikrammohamdi4439
    @ikrammohamdi4439 5 หลายเดือนก่อน

    Erreur user_interface.h no such file or directory

  • @tororak
    @tororak 2 ปีที่แล้ว

    ต้องการตั้งให้เปิดแค่ 3-5 วินาทีแล้วปิด
    ต้องแก้โค้ดตรงไหนครับพี่

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      ยังไม่มีโค้ดตัวนี้เลยครับ

  • @markfrancistaguiam5376
    @markfrancistaguiam5376 2 ปีที่แล้ว

    Can you explain your code

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว +2

      The main part is to get Unix time and convert into real time clock in a unit of Hour:Min:Sec
      From "Time Input" widget I got "Start Time" and "Stop Time" in a unit of Hour:Min:Sec
      Then I convert all Unix time, Start time and Stop time in a unit of Second : (Hour*3600) + (Min*60) + Second and compare them to set a condition that output needs to switch on or switch off.
      For example:
      - Real time clock: 10:30:00
      - Start time : 10:20:00
      - Stop time: 11:00:00
      I convert them in a unit of second:
      - Real time clock : 10*3600 + 30*60 + 0 = 37,800
      - Start time: 10*3600 + 20*60 + 0 = 37,200
      - Stop time: 11*3600 + 0*60 + 0 = 39,600
      the condition to switch on output is if "Start time < Real time clock < Stop time" in the case above is "Yes", I have to switch on output.
      Otherwise: Output will set accordingly the "Button" status.
      Hope it is useful for you.

  • @syahirseth7368
    @syahirseth7368 2 ปีที่แล้ว

    Hi Sir, i have a problem when uploading the code to nodemcu, the error is redefinition of blynktimer timer . I hope that you can help me thank you :)

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      Can you let me know the full error messages?

    • @syahirseth7368
      @syahirseth7368 2 ปีที่แล้ว

      @@jakkdiy exit status 1
      redefinition of of blynktimer timer.

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      Do you copy completely my shared code then compile and found this error or you modify something?
      If you compile the original code, you shouldn't find any error.
      You can contact me on Facebook fan page via account I provided in video description.

    • @syahirseth7368
      @syahirseth7368 2 ปีที่แล้ว

      @@jakkdiy i only changed the device and pin part from esp8266 to esp32

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      @@syahirseth7368 Please try following step below:
      1. Put the code on line 22 in comment -->
      //BlynkTimer timer;
      2. Put the code below around instead of void checkTime() function -->
      // ################ START ####################
      unsigned long ms_buf;
      void checkTime()
      {
      unsigned long ms_dif = millis() - ms_buf;
      if ( ms_dif >= 10000 ) // sync time every 10 seconds
      {
      ms_buf = millis();
      Blynk.sendInternal("rtc", "sync");
      }
      }
      // ################ END #######################
      3. Put this code in void setup() in comment --->
      // timer.setInterval(10000L, checkTime);
      4. Put this code in void loop() in comment -->
      // timer.run();
      5. Put this code in void loop() -->
      // ################ START ######################
      void loop()
      {
      BlynkEdgent.run();
      // timer.run();
      checkTime();
      led_mng();
      blynk_update();
      }
      // ################# END #######################

  • @m.zaeemsarfraz2489
    @m.zaeemsarfraz2489 ปีที่แล้ว

    you didnt uploaded any wifi or ssid code!

  • @9997999702
    @9997999702 ปีที่แล้ว

    take a breath.. U Speak Non Stop

  • @TheDemonTV
    @TheDemonTV 2 ปีที่แล้ว

    พอปิด arduino แล้วเหมือนมันไม่เจอเวลาเลยครับ

    • @jakkdiy
      @jakkdiy  2 ปีที่แล้ว

      แล้วยังสั่งงานผ่าน​ button บนแอพ​ Blynk ได้อยู่มั้ยครับ

    • @TheDemonTV
      @TheDemonTV 2 ปีที่แล้ว

      @@jakkdiy ได้ครับ แต่ฟังชันtimer ใช้ไม่ได้

  • @abzaatari
    @abzaatari ปีที่แล้ว

    Thanks for your tutorial, I upload your code and it is running well but if I deselect a day in my app the relay still working.
    These line is not working well. if ((((time_set_overflow == 0 && (rtc_sec >= timer_start_set[i]) && (rtc_sec < timer_stop_set[i])) ||
    (time_set_overflow && ((rtc_sec >= timer_start_set[i]) || (rtc_sec < timer_stop_set[i])))) &&
    (weekday_set[i] == 0x00 || (weekday_set[i] & (0x01

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      Deselected all and selected all will have the same result

    • @abzaatari
      @abzaatari ปีที่แล้ว

      @@jakkdiy yes no effect, I have the correct reading in serial monitor at selecting a day " day 1 is selected " for example.

    • @abzaatari
      @abzaatari ปีที่แล้ว

      @@jakkdiy The device is working fine now, I mess with the code when I making 6 timers controling 1 relay, it was my fault. Thanks

    • @jakkdiy
      @jakkdiy  ปีที่แล้ว

      That's great!!!

  • @arifkyar873
    @arifkyar873 11 หลายเดือนก่อน

    there is too much code

    • @jakkdiy
      @jakkdiy  11 หลายเดือนก่อน

      Sorry about that

    • @arifkyar873
      @arifkyar873 11 หลายเดือนก่อน

      @@jakkdiy Do you have a video where you explain the codes in detail or can you shoot it? I'm having some problems and I can't run the code.

    • @jakkdiy
      @jakkdiy  11 หลายเดือนก่อน

      Not have the explanation for the code but anyway it works. Any error found, you should check the included libraries and selected board.