Connecting Raspberry Pi Pico W's with MQTT: Building a Collaborative IoT System

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2024
  • Send messages between Raspberry Pi Pico W's from anywhere using MQTT Broker HiveMQ in MicroPython!
    You will only need two or more Raspberry Pi Pico W's with an internet connection!
    Library:
    simple.py -
    github.com/micropython/microp...
    robust.py -
    github.com/micropython/microp...
    Link to Blog Post and Code:
    shillehtek.com/blogs/news/sen...
    TIMESTAMPS:
    00:00 Intro
    01:00 Thonny Setup Instances
    02:40 HiveMQ
    04:01 Code
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    This looks like fun. Thanks for the video. Please keep them coming.

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

      Thanks Night Coder, I will do more segments on MQTT eventually! Appreciate that!

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

    How can we handle situations where the MQTT publisher loses internet connection sometimes a day for few hours?

    • @mmshilleh
      @mmshilleh  หลายเดือนก่อน +1

      Haha thats a intricate situation you would have to gave the publisher keep trying periodically I would say (programmatically) essentially keeping it running at all times

    • @LifeGeneralist
      @LifeGeneralist หลายเดือนก่อน +1

      @@mmshilleh But I wonder how is this problem tackled in real world scenarios. Internet outages can happen suddenly and sometimes it is uncertain, the work goes on and the data is collected but it can't send due to lack of interney

  • @dabunnisher29
    @dabunnisher29 9 หลายเดือนก่อน +1

    Very nice. I am trying to run a BME280 and SSD1306 together via I2C. I am still working through it (haven't got it to work yet), but it might be something that a lot of other people would find useful as well.

    • @mmshilleh
      @mmshilleh  9 หลายเดือนก่อน

      I never played with such screens but I will write this down for a future video. Could be cool to delve into!

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

    If this helped you please consider supporting the channel at www.buymeacoffee.com/mmshilleh or if you want to book a chat with me.
    Also do not forget to like, comment, and subscribe to the channel! 🙂

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

    Hi i am facing an issue when i install CircuitPython the storage is reducing from 128 mb to 470 kb do you know the reason why it is happening?
    BTW it is pico w

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

      Hello Shaik, I used MicroPython for this. I am not sure why it would take a majority of the storage. Do you know the size of the CircuitPython package?

  • @jackrowland1652
    @jackrowland1652 2 หลายเดือนก่อน +1

    I took your advice and am trying to use mqtt for my controller project. I need some help. How do I buy you a cup of coffee. I'm missing something fundamental. No problem sending stuff to node-red, or back to HiveMQ, but I can't get the messages back to the Pi Pico.

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

      Hey Jack the link is on my youtube page in the links. TH-cam sometimes deletes comments when I link an item in the comments hence why I didnt send it in the chat.

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

      www.buymeacoffee.com/mmshilleh/extras

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

      You can also email me at shillehtek@gmail.com for more information! :)

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

      email sent@@mmshilleh

  • @marinehm
    @marinehm 10 หลายเดือนก่อน +1

    Can you do a video on non blocking tasks. I want two things going at the same time. Read Temp,humidity every 10-15 minutes (post that to MQTT), read distance sensor continuously, turn on LED when distance sensor

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน

      I certainly can thanks for bringing this up. I guess before I proceed with that, is the current MQTT framework not sufficient to produce non-blocking tasks or are you having trouble with the coding aspect of it? I would imagine it could be a structure of while loops and timers but I could be naive in the sense that I have not tried to solve the problem or that being an issue for me.
      Please elaborate more :)

    • @marinehm
      @marinehm 10 หลายเดือนก่อน +1

      @@mmshilleh Coding aspect. My MQTT works just fine I was following an example of uasyncio and cannot for the life of me get it to work. Then another video using Time Tics. That one; his Indie accent was too hard for me to follow.

    • @marinehm
      @marinehm 10 หลายเดือนก่อน +1

      @@mmshilleh They are super cheap. I suppose I could just use 2 Wemos esp8266. 1 for the weather sensor and another for the distance sensor. I'm Just trying to grasp the concept of doing two things at once on one ESP usng micropython.