ESP8266 Control NeoPixels Using URL Queries In Arduino IDE (Mac OSX and Windows)

Sdílet
Vložit
  • čas přidán 6. 08. 2024
  • • Your support helps me post videos more frequently:
    / acrobotic
    www.paypal.me/acrobotic
    buymeacoff.ee/acrobotic
    BTC: 1ZpLvgETofMuzCaKoq5XJZKSwe5UNkwLM
    ==========
    • Find me on:
    / acrobotic
    / acrobotic
    / acrobotic
    ==========
    • My shops:
    acrobotic.com/shop
    amazon.com/shops/acrobotic
    ==========
    • Description:
    In this video I show how to send data to, and process it on, an ESP8266 web server. I start with the web server code from another video ( • ESP8266 Web Server Ste... ), and add a route where to send the data for processing as URL arguments.
    The video includes an example application where the URL arguments in the query string specify the number and colors of a strip of WS2812B LEDs by WorldSemi (a.k.a. NeoPixels™). I go over the process, step-by-step, of how to write the code using the Arduino IDE.
    One of the most common tasks when using the ESP8266 is setting it up as a device that connects to a network and responds to traffic on it (i.e., a web server). I wanted to show you in detail how to take things further by using the web server to receive and process data sent from a web browser.
    ==========
    • Related vids:
    Getting started with the WeMos ESP8266 Development Board using Arduino: • Getting Started | ESP8...
    ==========
    • Project parts:
    ACROBOTIC Development Board for ESP8266:
    acrobotic.com/products/acr-00018
    amzn.to/2dAZ1mW (affiliate)
    ACROBOTIC WS2812B Strips:
    White 30 pixels/meter amzn.to/2hCpUf5 (affiliate)
    Black 30 pixels/meter amzn.to/2ipACVC (affiliate)
    White 60 pixels/meter amzn.to/2feapnt (affiliate)
    Black 60 pixels/meter amzn.to/2gbddUR (affiliate)
    White 144 pixels/meter amzn.to/2jf11BK (affiliate)
    Black 144 pixels/meter amzn.to/2joHKkM (affiliate)
    ==========
    • Project code:
    Firmware for the Arduino IDE:
    github.com/acrobotic/Ai_Tips_...
    ==========
    • Tutorials:
    Detailed guide for getting started with the ESP8266 Development Board:
    learn.acrobotic.com/tutorials/...
    ==========
    • Music:
    andyclassical (audiojungle.net/user/andyclas.... Envato's Music Standard License.
    ==========
    #ESP8266 #Arduino #Tutorial
  • Věda a technologie

Komentáře • 73

  • @7Trident3
    @7Trident3 Před 2 lety

    As a self taught programmer, your data entry, and commentary fill in a lot of blanks! You are an excellent teacher, excellent control, and use of the english language!

  • @brantbeck8487
    @brantbeck8487 Před 7 lety +8

    You guys are doing an amazing job, have no worries your following will continue to grow quickly. Well structured, easily understood videos with solid links and your responses to questions are exceptional and timely. Thank you so much and please keep the videos coming!

    • @datasith
      @datasith  Před 7 lety +2

      Thanks so much for the kind words, Brant. We're so glad you guys and gals are finding our vids useful! Certainly, more are on the way, we've just posted one on using POST requests and JSON (czcams.com/video/Edbxyl2BhyU/video.html). Upwards and onwards!

  • @mrwonk
    @mrwonk Před 2 lety

    Excellent videos. You have simplified and explained what the code does, so it is simple for me to take what you show and write my own code to do what I am looking to do. So much easier than the clunky documentation I find online!

  • @TheM4rten
    @TheM4rten Před 7 lety

    exactly what i was missing on YT ! thx for all the great videos !

    • @datasith
      @datasith  Před 6 lety

      Thanks for the kind words, we're glad you liked them :)

  • @LASERLine.Brasil
    @LASERLine.Brasil Před 7 lety +4

    Thank you very MUCH for the info. Great job!!

    • @datasith
      @datasith  Před 7 lety +3

      Glad you liked it, more vids on the way!

  • @minaligupta9872
    @minaligupta9872 Před 7 lety

    Great job.. I am a beginner so it has helped me a lot in understanding everything clearly :)

    • @datasith
      @datasith  Před 7 lety

      Thanks for watching! Glad we could help :)

  • @danielizzudin3839
    @danielizzudin3839 Před 5 lety

    Very well presented ! Love it

    • @datasith
      @datasith  Před 5 lety

      Thanks so much for the kind comment, I'm glad you found the content useful!

  • @im_user98711
    @im_user98711 Před 7 lety

    This week, I'm new for ESP8266 but after watching your great tutorial, I think next week I will jump to start my project.

    • @datasith
      @datasith  Před 7 lety

      Thanks, good luck with your project!

  • @microstro6402
    @microstro6402 Před 2 lety

    Nice 👍

  • @juliooliveira7991
    @juliooliveira7991 Před 7 lety

    THAT'S AMAZING!

  • @just4electronics101
    @just4electronics101 Před 4 lety

    Guys You are amazing Love your videos and the best thing each And every single Video is worth to watch and every single video is unique no one else is providing such amazing content on ESP8266 .....I Must say you are best .........Love YOu GuYs for providing such an amazing content

    • @datasith
      @datasith  Před 4 lety

      Thanks so much, I'm glad you liked them :)

  • @TheM4rten
    @TheM4rten Před 6 lety

    String msg = "LED #"+n+" has been set to: " .....

    • @datasith
      @datasith  Před 6 lety

      Yeah, there are a few tricks here and there that can make coding life a little easier. We're glad you found one, thanks for watching and for the kind words!

  • @codingmaster6321
    @codingmaster6321 Před 6 lety

    Thnx my man : )

    • @datasith
      @datasith  Před 6 lety +1

      You're welcome, my viewer : )

  • @pascallacsap6276
    @pascallacsap6276 Před 7 lety

    Great Great job. May be the "setPixelColor" name for the function could lead to misunderstandings with the strip method. I am really eager to see your next tutos. Thank so much. I was using the metadata field of thingspeak objects "to send parameters" to my ESP8266...

    • @datasith
      @datasith  Před 7 lety

      Thanks for the kind words, Pascal! Ha, that's an interesting approach using the metadata. More videos are on the way, stay tuned!

  • @capiberra4118
    @capiberra4118 Před 7 lety

    Thanks.

  • @boomer9900
    @boomer9900 Před 4 lety

    These are good videos, I'm learning so much. So I have a bunch of functions written to display various patterns. The order of the functions is coded in the ino file. I would like to change the order of the functions with curl or web browser using OTA, which I do have working. I programmed my board Wemos D1 mini to wait 30 seconds from power on to receive a new program OTA. The problem I faced is the CPU seems to be too busy running the patterns to let the web server receive any handles. I tried the yield function with no luck and don't have any major delay commands. Any thoughts? Thanks.

    • @datasith
      @datasith  Před 4 lety

      You can try a Task Scheduler as I did in my last video (czcams.com/video/3lQ7_aotw1s/video.html), or you can move to the ESP32 and take advantage of having a couple of cores, that is, have the animations running on one core, and the web server on the other. HTH!

  • @cyberworld6469
    @cyberworld6469 Před 5 lety

    Great info!! What is necessary to control a range of pixels (ie - 0-12) to a given color? TIA!

    • @datasith
      @datasith  Před 4 lety

      You could send the data as an array instead, using websockets might be easier: czcams.com/video/ROeT-gyYZfw/video.html
      HTH!

  • @DerekWelchElectric
    @DerekWelchElectric Před 5 lety +1

    Great tuts, only question is, why is udummy advertising on your videos. I'm getting exactly the course I need watching you?

    • @datasith
      @datasith  Před 5 lety

      Hey, Derek. Thanks for the compliment! Haha, no clue (I have no control over which ads are shown), I'm happy that you find the content useful enough to disregard the tempting offers from other platforms :)

  • @tarunbirgambhir3627
    @tarunbirgambhir3627 Před 7 lety +1

    is it possible to create buttons and text fields on a web page and use those to interact rather than the url of the web page ?

    • @datasith
      @datasith  Před 7 lety +1

      Yes it is, see our other video for creating a client using JavaScript. It'll give you a good idea on how to do it! We plan on making a video soon on how to do it exactly, thanks for watching!

  • @moeddimangadap2493
    @moeddimangadap2493 Před 4 lety

    How can I store the data monitored in the case of ECG sensor to the web server and see the graph analysis? Need of response. Thanks.

    • @datasith
      @datasith  Před 4 lety

      You can search my videos for "sensor" (e.g., czcams.com/video/6-RXqFS_UtU/video.html) and "graphs" (e.g., czcams.com/video/oI5SwqfiB5E/video.html)

  • @sto_karfi842
    @sto_karfi842 Před 5 lety

    Do you have any video on how to set a gui for these tasks on the IP or something like that(I'm kinda new on the stuff)?

    • @datasith
      @datasith  Před 4 lety

      I try to aim all my videos for people getting started. Unfortunately, the GUI options aren't great, so in general you're better off writing the code yourself, but including existing libraries with the functionality you need!

  • @quaternion-pi
    @quaternion-pi Před 7 lety

    Excellent tutorial! Is it possible to have a python script running on a laptop replace the manual creation of the arguments passed in the browser to the Neopixel string?

    • @datasith
      @datasith  Před 7 lety

      Thanks! You're one step ahead of the game :) It sure is possible to have a script in Python or any other language (e.g., JavaScript) constructing the URLs and sending the requests. We'll have videos on this coming up soon. Thanks for watching!

    • @quaternion-pi
      @quaternion-pi Před 7 lety

      Outstanding! New subscriber. I look forward to more tutorials. Your documentation of additional resources with the video is also great. Is the Neopixel string you use bright enough for under kitchen cabinet lighting - or would RGB+White addressable Leds be better? My ultimate goal is to control them with an Amazon Echo Dot or Google Home via voice command,

    • @datasith
      @datasith  Před 7 lety

      alphakittycat We're happy you like the content :) The RGB+W will give you a slightly "cleaner" white because there's a separate white LED instead of using R+G+B at full intensity. Calculate 40~60mA@5VDC per pixel and you'll get plenty of brightness with either one. In case you buy the ones linked in the description and they don't work for you, let us know and we'll happily refund your order!
      P. S. We'd love to see pics of your Echo Dot/Google Home project when you finish it!

  • @AlainPilon
    @AlainPilon Před 7 lety +1

    Please, if you are going to use Vim editor, use the motion keys. It was driving me nuts to see you use the arrow keys to move around! :-) I love these videos but I just want to grab your keyboard and type for you!

  • @neilausten9404
    @neilausten9404 Před 5 lety

    Hi
    I can open the server when I put in the IP address but when I put in the setcolorpixel_num=1 , As you do, I get a response that site does not exist.

    • @datasith
      @datasith  Před 5 lety

      Do you use the question mark "?" between setcolor and pixel_num?

    • @neilausten9404
      @neilausten9404 Před 5 lety

      @@datasith Yes indeed, as shown :192.168.1.8/setcolor?pixel_num=1
      Also , I'm sure I copied your code exactly as you wrote it.
      Thanks for your reply.

    • @datasith
      @datasith  Před 5 lety

      ​@@neilausten9404 cool. So, something is 'choking' inside the setPixelColor() function definition, and the code can't get to the line server.send(...). If you comment out everything except for that line, and substitute the variable "rsp" for a string like "debugging this!", then you should be able to reach the page. Then, you can little-by-little find what's failing. Let me know how it goes!

  • @karsdivs
    @karsdivs Před 5 lety

    How can i convert String to char*?? Any suggestions guys..

    • @datasith
      @datasith  Před 5 lety

      Google and Stack Overflow are your friends.
      String str = "test";
      char *pstr = str.c_str();

  • @marcelobenitezabc
    @marcelobenitezabc Před 7 lety +1

    ***A*W*E*S*O*M*E*** tks for sharing!

  • @JadeclonOfficial
    @JadeclonOfficial Před 4 lety

    Does this work in realtime?

    • @datasith
      @datasith  Před 4 lety

      no, the closest you can get to real-time is using websockets: czcams.com/video/ROeT-gyYZfw/video.html

  • @Brandon-youtube
    @Brandon-youtube Před 7 lety

    Is it okay to just do all of this in the Arduino IDE?

    • @datasith
      @datasith  Před 7 lety +1

      Yup, it's okay to do it in the built-in editor. Our use of the external editor is just a matter of preference. Maybe if your code gets complex the tools that external editors like Sublime Text offer will make your life easier.

    • @Brandon-youtube
      @Brandon-youtube Před 7 lety

      Thank you

    • @EmmaMaryTaylor
      @EmmaMaryTaylor Před 4 lety

      @@datasith I was just wondering this myself! Thank you!

  • @ltdr99
    @ltdr99 Před 7 lety

    Why do not you use more micropython?

    • @datasith
      @datasith  Před 7 lety +1

      Hey Teo, we're trying to be systematic about our posted videos. We're now covering a few basic topics using the Arduino IDE, but soon we'll do a set on MicroPython. Hang on tight! :)

    • @datasith
      @datasith  Před 7 lety

      Hmm, *s bright*, we respectfully disagree. As with most things there are _pros_ and _cons_ and they highly depend on the application. Our favorite feature of firmware interpreters such as MicroPython is the ability to run code immediately without waiting for an upload. Of course there are ways to do this even w C/C++ but that's the beauty of choice, everyone can have their own without one being "smarter" than any other.

    • @datasith
      @datasith  Před 7 lety +1

      s bright:
      > I don't see any reason...
      What we're saying is that other people (including ourselves) may see a reason.
      > a more powerful embedded device...
      You're absolutely right, however, we make due with what we've got. In this case, the compromise is using a stripped-down, limited version of Python to run it on a $5~$10, widely available board. For us it's worth it, but we certainly respect differing opinions.

  • @professorm4171
    @professorm4171 Před 7 lety

    Why don't you type code in the Arduino IDE? It's easier.

    • @datasith
      @datasith  Před 7 lety

      Because it's easier (for us) to do it this way :)

  • @ezio8000
    @ezio8000 Před 7 lety

    Love your youtube on the ESP8266-12E. Instead of using pin D2, I used D9, which is labeled Rx. See www.c-sharpcorner.com/article/blinking-led-by-esp-12e-nodemcu-v3-module-using-arduinoide/ for the pin mapping, for others who may want to use a different pin.

    • @datasith
      @datasith  Před 4 lety

      Awesome, thanks for sharing. I'm glad you found it useful!

  • @johnscott7377
    @johnscott7377 Před 6 lety

    His password is "13meetup37".

    • @datasith
      @datasith  Před 6 lety

      😱 😱 😱 313373 H4XR!!!