Cheap and Easy WiFi (IoT) Tutorial Part 2 - ESP8266 Arduino Code

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 163

  • @snackentity5709
    @snackentity5709 8 років тому +2

    thanks for taking the time to develop this code, kevin. got my 8266 up and running with it. just a tip for those who are having "timeout" issues from the read_until_ESP function, it's likely because the firmware version on your ESP8266 is different than what kevin used and is spitting out different responses (keywords). on the main "BASE" code page where the keywords are defined, i had to change "Ready" to "ready" (as is mentioned by kevin's comment). i also had to change "Unlink" to "0,CLOSED".
    i haven't played around too much with this yet, but i'll keep updating this comment if i find any of the other keywords are different with my firmware version.

  • @bubba1984
    @bubba1984 9 років тому

    The Chrome technique with X-path was an excellent tutorial on how to skip all the digging and fishing out of the raw html. Great work there!

  • @electronics9414
    @electronics9414 9 років тому

    I saw ur code. "Read until ()function " shows ur smartness. Very brilliant

    • @Kevindarrah
      @Kevindarrah  9 років тому +1

      +gowtham p thanks!! working on part 3 now...

  • @benaloney
    @benaloney 9 років тому

    Nice explanation of your code. I like how you comment next to the closing curly braces " }// for byte i " makes the code much more readable.

  • @webslinger2011
    @webslinger2011 5 років тому +1

    Also getting The error is" request for member 'begin' in '1', which is of non-class type 'int'". How to fix this?

  • @beatlessteve1010
    @beatlessteve1010 9 років тому

    Definitely interesting using an arduino for retrieving specific data from the internet.I am really enjoying your videos!!

  • @MrHjsalom
    @MrHjsalom 9 років тому

    I just watched it again. This video is simply awesome. You are a very generous guy. Congratulations.

  • @jamieclarke321
    @jamieclarke321 10 років тому +1

    Really looking forward to part 3 sending sensor data to the internet!

  • @charlesspringer4709
    @charlesspringer4709 9 років тому

    Nice info. BTW, a caret is like a hat. Those things are left and right "angle bracket". Where did you get caret? A course in vector algebra and rotated the symbol 90 deg?

  • @davebenemerito310
    @davebenemerito310 9 років тому +1

    +Kevin Darrah can you make a video about ESP8266 abou SENDING DATA TO THE INTERNET or FACEBOOK.

  • @khalilbessaad5553
    @khalilbessaad5553 8 років тому

    for the setup and connection there is a library called "ESP8266Wifi.h" and "ESP8266WebServer.h" which will make it easier and you won't need a arduino

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

    Kevin still waiting for your videos on IOT on this series you have promised to make videos man ! It has been 5 year where r you brother.

  • @alokdixit8213
    @alokdixit8213 9 років тому

    Why did you use--> payload[payload_size+i] = URL[i];
    even if we have some payload Data , what will starting of payload array will contain?

  • @eduardoamkie2338
    @eduardoamkie2338 5 років тому

    Hello, I can do the the thingspeak example but I with my personal page I get a bad request response

  • @ricardoparedes9766
    @ricardoparedes9766 9 років тому

    Great video. I am looking some advise. I am planing to connect a number of sensors to get data and then upload it in to the internet. Should I use this as main micro controller or just as a Wifi module?

  • @mehdikrishanbutan
    @mehdikrishanbutan 8 років тому

    Hi dear Kevin,
    thanks for the Good Job you have done...
    But I am getting this Error while Compiling your Code; I have just Changed the SSID Name and SSID Password ...
    cant understand what to do ?
    I am new to ESP8266 and using ESP8266 ESP-12e NodeMCU Module
    ///////////////////////////////////////////////////
    Arduino: 1.6.6 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"
    :0:9: error: expected unqualified-id before numeric constant
    C:\Users\MKBUTAN\Desktop\ESP8266_BASE_01_28_15\ESP8266_BASE_01_28_15.ino:18:16: note: in expansion of macro 'ESP8266'
    SoftwareSerial ESP8266(ESP8266_rxPin, ESP8266_txPin);// rx tx
    ^
    C:\Users\MKBUTAN\Desktop\ESP8266_BASE_01_28_15\ESP8266_BASE_01_28_15.ino: In function 'void setup()':
    ESP8266_BASE_01_28_15:69: error: request for member 'begin' in '1', which is of non-class type 'int'
    ESP8266.begin(9600);//default baudrate for ESP
    ^
    ESP8266_BASE_01_28_15:70: error: request for member 'listen' in '1', which is of non-class type 'int'
    ESP8266.listen();//not needed unless using other software serial instances
    ^
    C:\Users\MKBUTAN\Desktop\ESP8266_BASE_01_28_15\connect_ESP.ino: In function 'boolean connect_ESP()':
    connect_ESP:4: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("AT+CIPSTART=0,\"TCP\",\"api.thingspeak.com\",80
    ");//only connecting to thingspeak
    ^
    connect_ESP:9: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("AT+CIPSEND=0,");//send AT+CIPSEND=0, size of payload
    ^
    connect_ESP:10: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print(payload_size);//the payload size
    ^
    connect_ESP:12: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("
    ");//cap off that command with a carriage return and new line feed
    ^
    connect_ESP:17: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print(payload[i]);
    ^
    C:\Users\MKBUTAN\Desktop\ESP8266_BASE_01_28_15
    ead_until_ESP.ino: In function 'boolean read_until_ESP(const char*, int, int, byte)':
    read_until_ESP:18: error: request for member 'available' in '1', which is of non-class type 'int'
    while(!ESP8266.available()){//wait until a new byte is sent down from the ESP - good way to keep in lock-step with the serial port
    ^
    read_until_ESP:25: error: request for member 'read' in '1', which is of non-class type 'int'
    data_in[i]=ESP8266.read();// save the byte to the buffer 'data_in[]
    ^
    read_until_ESP:56: error: request for member 'available' in '1', which is of non-class type 'int'
    while(!ESP8266.available()){// same thing as done in the buffer
    ^
    read_until_ESP:65: error: request for member 'read' in '1', which is of non-class type 'int'
    data_in[key_size-1]=ESP8266.read();//save the new data in the last position in the buffer
    ^
    C:\Users\MKBUTAN\Desktop\ESP8266_BASE_01_28_15\serial_dump_ESP.ino: In function 'void serial_dump_ESP()':
    serial_dump_ESP:5: error: request for member 'available' in '1', which is of non-class type 'int'
    while(ESP8266.available()){
    ^
    serial_dump_ESP:6: error: request for member 'read' in '1', which is of non-class type 'int'
    temp =ESP8266.read();
    ^
    C:\Users\MKBUTAN\Desktop\ESP8266_BASE_01_28_15\setup_ESP.ino: In function 'boolean setup_ESP()':
    setup_ESP:3: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("AT
    ");// Send just 'AT' to make sure the ESP is responding
    ^
    setup_ESP:11: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("AT+RST
    ");// Give it a reset - who knows what condition it was in, better to start fresh
    ^
    setup_ESP:18: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("AT+CWMODE=");// set the CWMODE
    ^
    setup_ESP:19: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print(CWMODE);//just send what is set in the constant
    ^
    setup_ESP:20: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("
    ");
    ^
    setup_ESP:28: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("AT+CWJAP=\"");// set the SSID AT+CWJAP="SSID","PW"
    ^
    setup_ESP:29: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print(SSID_ESP);//from constant
    ^
    setup_ESP:30: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("\",\"");
    ^
    setup_ESP:31: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print(SSID_KEY);//form constant
    ^
    setup_ESP:32: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("\"
    ");
    ^
    setup_ESP:41: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("AT+CIFSR
    ");//command to retrieve IP address from ESP
    ^
    setup_ESP:59: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("AT+CIPMUX=");// set the CIPMUX
    ^
    setup_ESP:60: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print(CIPMUX);//from constant
    ^
    setup_ESP:61: error: request for member 'print' in '1', which is of non-class type 'int'
    ESP8266.print("
    ");
    ^
    exit status 1
    request for member 'begin' in '1', which is of non-class type 'int'
    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    Please Help

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

    Hi! Is there any other link to the code? The one in the description is not working anymore. Thank you!

  • @rogerrives7096
    @rogerrives7096 9 років тому

    How did you get the ESP8266 to send a SMS test as show in part one

  • @ChaplainDaveSparks
    @ChaplainDaveSparks 9 років тому +1

    Does the Arduino IDE support the normal C string library, such as length of a string, position of a substring within a string, string concatenation, etc.? If so, I'm curious why you're doing this manually. Is that faster or more efficient?

  • @diwolfgangbauermscphd333
    @diwolfgangbauermscphd333 9 років тому

    Hi Kevin, i took me really i while but now it is working, uploading data and getting data from THINGHTTP.
    I am really a fan of your videos!! :-) Your explanations are fantastic, also the video explaining the manchester coding was brilliant!

  • @Itailewinwin
    @Itailewinwin 10 років тому

    hi,
    what would be the concept in order to control the ESP8266 with a web page from outside the local network, without router port forwarding?

  • @adiganapathi9346
    @adiganapathi9346 9 років тому

    is the data logging video up yet?

  • @ashhadkhan1871
    @ashhadkhan1871 8 років тому +4

    Hey! Great Video. I am having a compiling problem. I just copied and pasted your code and didnt edit anything except SSID and its keywords. The error is" request for member 'begin' in '1', which is of non-class type 'int'". Please help me.

    • @jaydmatacarita
      @jaydmatacarita 8 років тому

      I'm getting the same problem.

    • @urielmorales1743
      @urielmorales1743 8 років тому +1

      i have the same problem

    • @cliffolsen479
      @cliffolsen479 7 років тому

      I am using an older version of the Arduino IDE (1.0.5) and am not getting that error.

  • @lourivalpedrosa
    @lourivalpedrosa 9 років тому

    The link of your youtube and current temperature ... the api key is sending the message that is invalid ...

  • @MPElectronique
    @MPElectronique 9 років тому +1

    Hi Kevin.
    i got that from my XPATH : Error parsing document, try a different parse string

  • @dharani312
    @dharani312 6 років тому

    can parse anything from youtube it shows "Error parsing document, try a different parse string."

  • @bryamulloa2268
    @bryamulloa2268 7 років тому

    How do i connect this to the arduino mega? i cant seem to get it to work, serial monitor showing everything on fail, and when i run at commands directly to the esp it works, any help?

  • @rajpratapsingh9090
    @rajpratapsingh9090 9 років тому +1

    Hi
    I am not able to flash my ESP8266 module, when I am tryiny to enter AT commands via serial monitor it is showing me some irrelevant output and also ESP8266 flasher is not able to fetch MAC Address.
    Thanks

    • @AnkitkumarChheda
      @AnkitkumarChheda 8 років тому

      You were suppose to burn arduino n not ESP. Here he is using AT command through arduino to communicate with esp

    • @jaydmatacarita
      @jaydmatacarita 8 років тому

      So this code is for the arduino? how do you then connect the arduino to the ESP?

    • @AnkitkumarChheda
      @AnkitkumarChheda 8 років тому

      +Jairo Marquez google is the best option to find connections. let me know here if u can't find it.

  • @920sokol
    @920sokol 9 років тому

    Is there a part 3?
    Looking forward for a tutorial sending data to e webpage.

  • @tomaska5051
    @tomaska5051 8 років тому

    I have DCcduino + ESP8266. Direct "AT" command work fine. But SoftwareSerial not. I have tried program with very basic version with SoftwareSerial, and anything helps. I have original fimw., without any update, external Power Source, and ESP-01 socket, which change voltage to 3,3V DC, 9600 bit rate. 2xBlink blue Light, but any respond with SoftwareSerial.
    Any Idea? Muss I update fw? Or could Socket have any influence?

  • @brandondaniels9471
    @brandondaniels9471 8 років тому +1

    Wow! I've learned so much from just a few of your videos. Please keep up the great work! :-D

  • @RobertBontrager
    @RobertBontrager 10 років тому

    Can you use these ESP8266 chips to create a mesh network?

  • @VallabhRao123
    @VallabhRao123 9 років тому

    hey, i am already a big fan of your videos.... just need a small help... i get these errors... could you please help...
    :0:9: error: expected unqualified-id before numeric constant
    c:\ESP8266_BASE_01_28_15.ino:18:16: note: in expression of macro 'ESP8266'
    SoftwareSerial ESP8266(ESP8266_rxPin, ESP8266_txPin);
    ^
    please help

  • @thomasrobin
    @thomasrobin 9 років тому

    Please help with the hardware setup. Should you pass the tx pin from the arduino through a level shifter?

    • @srijal
      @srijal 9 років тому

      +Robin Thomas Yes, he explains that in Part 1

  • @dalinz1606
    @dalinz1606 9 років тому

    Hello,
    can u say when the next video will beuploaded where the data is going the other direction. That i can see a measured temperature under a URL?
    I´m looking forward to this :)

  • @Kaizer-qe7kk
    @Kaizer-qe7kk 6 років тому

    Can't you use string.indexOf to check for a character? It worked for me.

  • @Electronieks
    @Electronieks 9 років тому

    how do you resolve the dns names in esp ??

  • @jaydmatacarita
    @jaydmatacarita 8 років тому

    Help! I can't compile the code. It keeps telling me:
    "request for member 'begin' in '1', which is of non-class type 'int'"

  • @monajitsaha9652
    @monajitsaha9652 8 років тому

    Hi I want to know that can we use esp8266 - 01 as smd component

  • @KitarpLive
    @KitarpLive 9 років тому

    web interface and video on new version of esp8266 that is esp12e or esp12q....
    having problems with it.

  • @kamals4905
    @kamals4905 9 років тому

    what about Facebook?
    i didn't able to get numbers of like on my page in things speak...
    any idea?

  • @dennisvanbussel6069
    @dennisvanbussel6069 10 років тому

    Hey kevin! Can you make a video using interrupts? I still don't get it haha.

  • @akashagarwal2922
    @akashagarwal2922 9 років тому

    Great video, when are you coming up with part 3 of this tutorial?

  • @kartikayy
    @kartikayy 9 років тому

    hii when i type
    AT response is ok but in case of AT
    i get error ...can you explain why??

  • @marcelocpsantos
    @marcelocpsantos 9 років тому

    Realy nice tutorial Kevin but did you consider using the String library to deal with finding and retrieving parts of strings? I think things will became much simpler.

  • @janhbrenna4264
    @janhbrenna4264 8 років тому

    Hi, and thanks for all the tutorials, i have a problem, i want too load some information from a website, but too get access too this website (gamingsite) i need too log on with an API key from a game. Any idea how i can solve this?

  • @chromaticprogress7513
    @chromaticprogress7513 10 років тому

    Hello. Arduino beginner here, so please bear with me if the question is stupid or obvious: what happens if the parsing in ThingSpeak never works? I tried your example exactly and others with other websites and it always returned an error message to me: "Error parsing document, try a different parse string." Any help would be greatly appreciated. I'm trying to find a way to get weather data from a website so that I can get my Arduino (with an Adafruit CC3000 WiFi shield) to read it. Thanks!
    EDIT: At the time of this edit, works for the temp in openweathermap.org/ but not others.

  • @MPElectronique
    @MPElectronique 9 років тому

    Hi. Do you have a schematic for arduino and esp8266 ??
    Thank You.
    I appreciate a lot!
    Marc.

  • @yazedalali8394
    @yazedalali8394 5 років тому

    can we make two arduino talk to each other via esp8266_01 ?
    thank you

  • @arunsiddharth852
    @arunsiddharth852 8 років тому

    Sir i have uploaded a code to my esp-01 through arduino(blinks led)but i lost my older at firmware of board(not able to do AT commands anymore :( ).PLz Help.

  • @meetomPL
    @meetomPL 9 років тому

    Awesome job!! Still waiting for part 3 :)

  • @DigantGoradia
    @DigantGoradia 9 років тому

    Hello there , which library i have to download to compile successfully the code which is done by Sir Kevin Darrah? i face the error while compiling the code..

    • @srijal
      @srijal 9 років тому

      +Digant Goradia No additional libraries are needed. What is the error?

    • @DigantGoradia
      @DigantGoradia 9 років тому

      +Srijal Poojari , Actually my simple code cant be upload to the ESP8266 Module through the arduino uno board and the arduino IDE itself. i have conncted every pinouts perfectly..and the error is like this
      warning: espcomm_sync failed error: espcomm_open failed

    • @srijal
      @srijal 9 років тому

      +Digant Goradia In the video series, the code is uploaded to the Arduino and not the ESP itself.
      According to your error, you want to upload some other code to the esp directly, for which you should use a USB to Serial converter. The Arduino can to this but its a mess to set it up. I have tried it many times but in the end I just bought a USB to Serial converter and things are smooth now.

    • @DigantGoradia
      @DigantGoradia 9 років тому

      +Srijal Poojari Ok..but i saw some of the videos, into that videos they have used Arduino to build upthe code to ESP module..

  • @JeffryLandry
    @JeffryLandry 10 років тому

    nice job, you also increased your subscriber count by 2 during the making of this video

  • @Moonteeth62
    @Moonteeth62 9 років тому

    You don't have to have the CIPMUX set to one for TCP communications. Only if you are going to use more than one socket. I send emails out using a TCP connection to a email server just fine in that mode.

  • @hallowdepths
    @hallowdepths 7 років тому

    Hey Kevin! Do I have to put GPIO0 into GND as I upload this sketch into the MCU? Thanks!

  • @saifulkoh
    @saifulkoh 6 років тому

    I am trying to write this back for avr-gcc and so far so good..but I am stuck at ESP.8266.print(payload_size) part...i am using uart_puts(payload_size) but i got an error
    Warning passing argument 1 of 'uart_puts' makes pointer from integer without a cast [-Wint-conversion]
    the output suppose to be "AT+CIPSEND=0,85" but instead i got "AT+CIPSEND=0, "
    Nevermind...I have managed to finish it..everything is working perfectly..
    Hope you can teach us more on how to get more data from websites...thanks

  • @ianphill7554
    @ianphill7554 9 років тому

    Hello everyone. I'm new in ESP8266 and wanted to do something more simple as reading just a 4-digit number from the Internet. can you help me, Please?
    Thanks advance

  • @ismaelgoldsteck5974
    @ismaelgoldsteck5974 10 років тому

    how can you print the ping of a webserver to the serial monitor?

    • @Kevindarrah
      @Kevindarrah  10 років тому

      Walter Spurer haven't gotten there yet, but will make a video on that as well. There's a ton of stuff out there on this part, so just try googling around.

  • @1stPCFerret
    @1stPCFerret 9 років тому

    Is the language he's using C, C++, or a C look-alike? (I guess it's C/C++ - he's including an .h file.)

  • @arasebutt9642
    @arasebutt9642 7 років тому

    how you update, data coming from thing-speaks

  • @MrHjsalom
    @MrHjsalom 9 років тому

    Is there a part 3?

  • @manutube8080
    @manutube8080 9 років тому

    Kevin part 3?

  • @nechunian
    @nechunian 5 років тому

    I like the way you write the code

  • @lourivalpedrosa
    @lourivalpedrosa 9 років тому

    I followed all this steps shown in this tutorial, but, when I sent de GET command to retrieve the data ... it caused an problem that the informations retrieved was greater than the arduino´s buffer size, the default is 64 bytes, even changed the size to 256 it is not enough, cause the answer of the command GET comes with the http header not only the information retrieved as shown when you put the GET command.
    Used and arduino UNO, and other NANO, but the results was the same, does not get all data.
    There is an way to read more data than 64 bytes ? Because, when I read the buffer, the rest of the information does not appears any more - eps.available() is equal to zero - no bytes remains in the buffer the be read.
    You can give me a clue, to solve this problem?
    How can I receive the answer from the Thingspeak whitout the http header, only the data I am asking using the parse command?
    Thanks...

  • @castillolk
    @castillolk 8 років тому

    Hi Kevin. The link to the source code is not working. Will you please fix it.

    • @Kevindarrah
      @Kevindarrah  8 років тому

      just tested, downloaded for me?

  • @electronics9414
    @electronics9414 9 років тому +1

    Eagerly waiting for part 3.

    • @Kevindarrah
      @Kevindarrah  9 років тому +2

      +gowtham p coming soon...

    • @totsonfire14
      @totsonfire14 9 років тому +1

      +Kevin Darrah I cant wait!

    • @Kevindarrah
      @Kevindarrah  9 років тому +1

      part 3 is out - check teh description

  • @lArunl
    @lArunl 9 років тому

    If I dont need to parse any info, how do i get it into "(youtube_subs)" For instance my thingspeak GET site looks like this 12345

  • @hiteshkudale1551
    @hiteshkudale1551 9 років тому

    my website showing error while connecting tcp

  • @zulfqarali8603
    @zulfqarali8603 9 років тому

    Hi Kevin,
    Is it posible to get a copy of source code in your video?

    • @Kevindarrah
      @Kevindarrah  9 років тому +3

      +Zulfqar Ali check the description - everything should be there

  • @bruhdabones
    @bruhdabones 9 років тому

    Do you need to do setup ESP every time before you use it?

    • @srijal
      @srijal 9 років тому

      +Bob “bobdabiulder” dabiuld Yes, every time you reset power as esp does not store SSID and pass details. It may be possible if you directly program the ESP

  • @edwinnicholas4993
    @edwinnicholas4993 10 років тому

    Really really great job you're doing right there. I like the way you write the code and the way you explain it. It really make me want to try this stuff. :)
    Thanks for sharimg, I'm looking forward for your next video.

  • @LinkItSmart
    @LinkItSmart 9 років тому

    How can I dowload zip file

  • @arsh5967
    @arsh5967 8 років тому

    thanks Kevin, I've learned a lot from your videos! :D

  • @farazsayed5730
    @farazsayed5730 10 років тому +2

    Hey Kevin, Thanks for the video. I was wondering if you have played around with NodeMCU Firmware for the ESP8266 and programming in lua. It's a solution that means the board only needs power and no arduino as you can upload your lua code directly onto the board. github.com/nodemcu/nodemcu-firmware. Maybe you can have a play around and make a video on it.
    Also how do you power your board? I now know after much failure that 3.3v pin on the arduino doesn't have enough current. It works a bit better when I use 3.3 from a usb programmer but I get another problem; the usb device doesn't show up unless reset is connected to ground (although it should be pulled high no?). Can you think what I might be doing wrong?

    • @Kevindarrah
      @Kevindarrah  10 років тому +1

      ***** yea, these modules can be a bit power hungry. I buy cheap 5V to 3.3V switches off eBay. They're less than a buck a piece - search DC-DC LM2596

  • @yaghiyahbrenner8902
    @yaghiyahbrenner8902 10 років тому

    Using DOM XPATH for accessing is a brute force approach. I like it. but if the HTML is updated it will break the DOM/XPATH lookup.

    • @Kevindarrah
      @Kevindarrah  10 років тому

      ***** ah yes good point, and this has happened to me before - nice thing is that you just have to update the thingspeak app, not your code on the micro.

    • @yaghiyahbrenner8902
      @yaghiyahbrenner8902 10 років тому

      Kevin Darrah Yes, I agree and it is a good thing, it now acts as a data proxy to the micro-controller
      anyway good work and hope to see you more of you again.

  • @gouravkhanijoe1059
    @gouravkhanijoe1059 8 років тому

    Really cool and detailed explanation..Thanks Kevin.. :) Keep posting..I think I will Learn IoT from you only

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

    Links are not working

  • @MPElectronique
    @MPElectronique 9 років тому

    I received : //*[@id="browse-items-primary"]/li/div/div[1]/div/span[2]/b
    and i paste, the message is : Error parsing document, try a different parse string.
    Can you help me ?
    Thanks!
    Marc.

    • @srijal
      @srijal 9 років тому

      +Marc Paradis I got the same Error on a few webpages, but it works well on the others. Try using a different website for the data you want if possible. And let me know if you find a solution for this error.

    • @matthewfreeman-hu
      @matthewfreeman-hu 9 років тому

      +Srijal Poojari Hi guys, i talked with thingspeak support a couple of months ago, and they said that you can't use this "thing" on every page. It works on UA-cam (HTML, HTML5) but not with other formats.

    • @srijal
      @srijal 9 років тому

      +Matthew Freeman oh okay, thanks!:)

    • @headlessxp4948
      @headlessxp4948 8 років тому

      For me, this XPath(//*[@id="browse-items-primary"]/li/div/div[1]/div/span[2]/b) doesnt work too.Try this one:
      //*[@id='browse-items-primary']/li/div/div[3]

  • @dojocre8
    @dojocre8 8 років тому

    Hello Kevin. I've really enjoy your videos and how deep you get into each device/technology, even referencing the datasheets. Thank you. Since you covered both the ESP and the NRF24, I was wondering it you explored using the ESP AS a NRF24 with an onboard MCU. Maybe disabling the wifi/ip stuff and controlling antenna semi-directly. Like an arduino+NRF24 alternative with the ability to switch into wifi mode when needed. Thanks again.

  • @juweinert
    @juweinert 9 років тому +2

    Why aren't you loading the data from the UA-cam API? For me as a software developer, parsing HTML to get specific data is the worst idea ever. And thus, advising to do so is somewhat dangerous, if you ask me ;)
    Also, HTTP itself does not want the host name to be in the query.
    The HTTP query normally looks like this: "METHOD /path_of_resource/resource HTTP/version". You connect to a server (IP or host) and then tell the server to GET / POST / PUT / DELETE / ... / a specific resource ON THAT server, so there is no technical need for the hostname to be there.
    So does the board do some parsing of the serial input itself?

    • @MakerMark
      @MakerMark 7 років тому

      Because the UA-cam API requires api keys/login and maybe it's too much overhead for the Arduino. There's nothing wrong with the way he's doing it for what he's trying to accomplish. It's not "dangerous" it's just not a complete solution. The benefit is, if the path to the data changes, he just needs to update Thinkspeak and the device code still works.

  • @DJRedderNYC
    @DJRedderNYC 9 років тому +6

    You should upload the code to github :)

  • @klizmata
    @klizmata 10 років тому

    Hi guys!
    I upload the code on my Arduino Uno R3. So before that I test AT and it returns OK but when start Arduino with downloaded code i get ...
    timeout
    ESP CHECK FAILED
    What can cause this ?

    • @Kevindarrah
      @Kevindarrah  10 років тому

      Make sure you have the same firmware loaded in the ESP - it might not be getting the exact keyword back? Otherwise, not sure

    • @klizmata
      @klizmata 10 років тому

      Kevin Darrah 10x for the replay. I'm completely new to Arduino so I tried Tutorial Part 1 video step by step so I was able to get my data form api.thingspeak.com trough Serial Monitor. However can you tell me about this:
      void setup() {
      // put your setup code here, to run once:
      Serial.begin(9600);
      Serial.print("AT
      ");
      }
      void loop() {
      // put your main code here, to run repeatedly:
      }
      Should I see in SerialMonitor OK after above code, because I don't ?
      OR
      I tried this too but it never find "OK":
      void setup() {
      Serial.begin(9600);
      Serial.print("AT
      "); // or "AT" or "AT

      " or "AT


      "
      if (Serial.find("OK")) {
      Serial.print("OK IT IS READY");
      }
      }
      p.s. AT+GMR gives me
      0018000902-AI03
      AT+RST gives me
      [Vendor:www.ai-thinker.com Version:0.9.2.4]
      ready

    • @klizmata
      @klizmata 10 років тому

      Kevin Darrah
      OK i figure it out. And is this expected behaviour ?
      When i first mange to run ESP8266 when I try Serial Monitor commands there was no response. So I switch RX and TX like that RX-RX TX-TX and Serial Monitor commands start working. Now I make it like that RX-TX and TX - RX and this code:
      void setup() {
      Serial.begin(9600);
      Serial.print("AT
      "); // or "AT" or "AT

      " or "AT


      "
      if (Serial.find("OK")) {
      Serial.print("OK IT IS READY");
      }
      }
      returns "OK IT IS READY", but now again I can't send command trough Serial Monitor. When I type In Arduino's RX blink bit but terminal is empty.

    • @klizmata
      @klizmata 10 років тому

      Kevin Darrah When i replace ESP8266.print with Serial.print I get some success with your code connecting to my SSID... testing now...

    • @Kevindarrah
      @Kevindarrah  10 років тому

      that's definitely a wiring problem if it works with Serial.print

  • @ZDevelopers
    @ZDevelopers 10 років тому

    Hey Kevin' great tutorial. I really love your tutorials and they're simply the best out there. But you should really consider using the actual API for getting data from websites since the current method while it works just fine its a lot of overheard and its not proper since websites change their layouts all the time.

  • @johnvbanta
    @johnvbanta 10 років тому

    Hoping someone can help with an issue setting the baud rate on the esp8266. I updated to this latest version of the cloud update:
    AT+GMR
    AT version:0.21.0.0
    SDK version:0.9.5
    OK
    I can connect well via USBTTL at 115200 but cannot change baud to 9600 so it will work with the arduino script in this video. I've tried AT+CIOBAUD=9600 but that's not supported any longer (returns ERROR).
    I found reference saying the right command is now: AT+IPR=9600 but when I do that I cant communicate with it at any baud rate and need to reflash the esp.

    • @Kevindarrah
      @Kevindarrah  10 років тому

      9600 is default with the version I'm using in the video

    • @johnvbanta
      @johnvbanta 10 років тому

      Quick update...I was able to get this to work by downgrading the esp8266 to v0.9.2.2 firmware which apparently defaults the baud rate to 9600. For some reason, when I upgrade to the cloud version (v0.9.5), it sets baud rate to 115200 and the typical AT commands to change it to 9600 so it talks to the arduino don't seem to work.

  • @thibfpv
    @thibfpv 9 років тому

    Hi ! anybody had Invalid api Key when he use thing http ?

  • @thomascarlin7
    @thomascarlin7 10 років тому

    Great video, I really appreciate you taking the time to write all that code, and share it with the community, however I ran into a bit of a problem with this code. Using a 3.3v Arduino Pro Mini with an 8MHz clock, I am unable to read data out of a web page. Pluging my 3.3v FTDI into the SoftwareSerial RX side of the Arduino, I can see the data being passed to the Arduino, but if I Serial.print the data_in buffer as it is running, I can see large gaps in the page it is reading, explaining why the Arduino never catches the keyword. Any ideas on what I could do to fix this? The page I'm loading is small, so maybe I could ignore the first maybe 200 char(web server header), read the whole thing into a temporary buffer, and then search that at my leisure? Any thoughts?

    • @Kevindarrah
      @Kevindarrah  10 років тому

      yea, you are probably getting a buffer overflow. The software serial buffer is pretty small. Try it without printing the data - should be okay then.

    • @thomascarlin7
      @thomascarlin7 10 років тому

      Kevin Darrah That is what I figured. I added the Serial.print line for debugging, knowing that it would amplify the issue. By switching the ESP8266 to the hardware Serial, and my debug output to the Software, I am able to catch both keywords every time.

    • @Kevindarrah
      @Kevindarrah  10 років тому

      Thomas Carlin did the same thing myself :) that's one of the reasons I said that read_until... function could use some optimization

  • @anneblackwood8302
    @anneblackwood8302 9 років тому +4

    if you watch this video muted you can pretend he's a belgian detective

  • @Rousnay
    @Rousnay 8 років тому

    Hi Kevin,
    Your are really great, this is one what i was looking for, Thank you very much :)

  • @electronics9414
    @electronics9414 9 років тому

    I mada similar project with GPRS MODULE works too good. I m so thank ful to u

  • @aladino10100
    @aladino10100 9 років тому

    Great! Wonderful! Wunderbar! Incredibly useful! Thx a lot!

  • @ubiquitousingit
    @ubiquitousingit 7 років тому

    Very well explained sir...thanks a lot :)

  • @MicahMelnyk
    @MicahMelnyk 10 років тому

    fantastic tutorial.
    A question tho: In this video (ua-cam.com/video/uwrWkiI6Hg8/v-deo.html), AllAboutEE uses a find function to parse the string, but you use step through system in reas_until_ESP. Is there a reason you did not use find?

  • @AdityaSharma001
    @AdityaSharma001 9 років тому

    Thanks man!
    You help a lot.

  • @jincyquones
    @jincyquones 10 років тому

    I think it'd be pretty cool have a micro-controller send data via the ESP8266 module to a PHP script which would log all of it in a .csv file. You could then use the IMPORTDATA function in Google Sheets and use the rest of the spreadsheet functions to do whatever. Or would it be possible to eliminate the PHP step and have the micro to generate the .csv file and allow it to be accessed via HTTP query through the wireless module directly, as if it were a server.
    Another awesome web service that these could do amazing things with is IFTTT.

    • @AndyPayne42
      @AndyPayne42 10 років тому

      Almost....except store it on your local machine. I don't understand the desire to give important data to companies knowing they and the government access it on a whim. I hear the media say privacy is dead, it is to people who are puppets to the corporations that want you to give them your data to make you feel they are so much more secure because you are stupid and privacy is dead unless you use our super secure clouds then you have no privacy -- its the opposite lol

    • @jincyquones
      @jincyquones 10 років тому

      Seriously? Exactly how is that at all relevant to my comment? Go take your condescending paranoid delusions elsewhere.

    • @AndyPayne42
      @AndyPayne42 10 років тому

      lol chill and let me teach you cause this is important. The government can and does subpeona information from company servers. This is fact not paranoia. The fact also is a local file server is very easy to build and computers are cheap but people use cloud services (me including) because they are easier but if you care about doing more than looking at youtube view counts then you might need to consider that.

    • @AndyPayne42
      @AndyPayne42 10 років тому

      I am telling you I already do what you are saying plus much more and do it securly then you scoff at me. lol that says a lot about you.

  • @steventoth
    @steventoth 7 років тому

    awesome video, and a beautiful code, thanks a lot!!! :)

  • @nicholasfonda2363
    @nicholasfonda2363 7 років тому

    you can get current time from "www.timeanddate.com/worldclock/"
    My example uses "www.timeanddate.com/worldclock/usa/oroville"
    Xpath="//*[@id="ct"]"
    when using thingspeak like Kevin outlines in his video it returns a web page with just "1:54:51 pm"

  • @ililiilili-k7b
    @ililiilili-k7b 10 років тому

    i really like your videos thanks

  • @fatihberkmuslu7293
    @fatihberkmuslu7293 9 років тому

    Hi Peter Quinn for nice video!

  • @hiteshkudale1551
    @hiteshkudale1551 9 років тому

    please help me with that

  • @davidsonshine9678
    @davidsonshine9678 9 років тому +1

    GreatScott! Sent me here.