element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Blog Using the ESP8266 the easy way
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 27 Oct 2014 5:45 PM Date Created
  • Views 3461 views
  • Likes 3 likes
  • Comments 28 comments
  • esp8266
  • bypic
  • microcontroller
  • iot
  • arduino
Related
Recommended

Using the ESP8266 the easy way

Former Member
Former Member
27 Oct 2014

As far as I am concerned the ESP8266 is a bit of a game changer for the internet an microcontrollers and so I have put it together with the ByPic (the what?). Okay I will start again. ByPic is an interactive language that works through a serial interface using a simple USB to serial converter: So:

image

Will give:

image

Really, this is the output from the Mini-Max, pressing 11 will use the HTTP protocol to get the head sent by google that contains the current date and time. What is shown as the main menu is an interface to the underlying library. To use the library direct then press 0 to get out of the main menu and yo gen an OK prompt.

This is an example of a session:

wf_start()    result = Nothing, this will initialise the hardware

mode(1)  result = 10

join("yourssid","yourpassword") result = 1 if okay. This is the SSID and password to the network you oen, i.e your home or work network. 

info()  result = a list of information, if there are errors then try rst(), you must have an IP address at this point if not it means that it can't connect with the given network so is the SSID and password correct?

get("www.google.com","/",80)  result = 1 if okay or time out if the page was too big to fit into the serial buffer. If it says there is no connection with the site then check the spelling of google and also make sure there is an IP address using info.

see1()  will show the received data which will be the 'head' data from the google server.

 

Of course that is just one way of using this wonderful device. If you have less then £20 to spare you could get an evaluation kit which will do all of the above. If you just want to see how it works in detail the tutorial is here. And the library for the ESP8266 is here. The software contains a HTTP client and also a HTTP server.

I hope you find it interesting.

  • Sign in to reply

Top Comments

  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago in reply to Problemchild +1
    The ESP8266 has its own AT command set already, a buddy of mine has it up and running with Arduinos in his home control system, see here for details: https://scargill.wordpress.com/2014/10/05/esp8266-working…
  • Problemchild
    Problemchild over 10 years ago in reply to shabaz +1
    Yeah, I think this was the point of using the Bypic system. The ESP device is a little awkward and the other CPU provides a good way of demarcating the application and the communications side of the application…
  • scargill
    scargill over 10 years ago in reply to shabaz +1
    Parsing the AT commands is a doddle in C on the Arduinos - I suggest it better that they get a little more stable before anyone puts TOO much work into it - and of course any such library would be easy…
  • Problemchild
    Problemchild over 10 years ago in reply to Former Member

    I for one will be interested in seeing some of your new products based on the ESP8266

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to scargill

    Thanks, that is definitely worth a look.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scargill
    scargill over 10 years ago in reply to Former Member

    I'm using the ESP-01 both on it's own and with another processor (Arduino-type - I use the 1284 chip - 2 uarts) - right now it's in the air - I'm inclined to agree that there will be severe limits on what can be done with the chip itself - mainly down to available RAM - and so having a serial buffer feeding it to another device is likely idea because that gives your main processor time to do other stuff. The jury is out but I'm working with the AT command set - but there is another - look up ESP8266 FRANKENSTEIN you'll see there's a development going on that does NOT use the AT set!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to scargill

    I think this is the most interesting point about the ESP8266. Do you use it by itself or with another processor?

    The ESP8266 is a microcontroller with some I/O and other hardware that you might expect, so for simple applications there is probably nothing more needed? Or is there? The ESP8266 I think runs around 80MHz and from experience with the PIC32MX (not MZ) running at the same speed, the overhead of TCP/IP, DHCP and other protocols that are needed takes a massive chunk out of the processors real world capability.

    The moment you need to do some timed work or capture signals is when it falls apart - well that's a bit strong, it becomes very challenging. Something very simple like listening for TCP/IP and UART begins to have conflicts, then suppose you want to add a flashing LED indicator - yet another timer to consider.

     

    For the small cost of an additional processor the solution becomes much more practical and potentially more reliable as one processor could look after the other. The ESP8266 takes care of all of the Wi-Fi communication and internet protocols and the other processor takes care of the nitty-gritty stuff like battery management, signalling and user interface. The developer/s can then work independently and not worry about any conflicts.

     

    In fact it would be nice to have a much more machine like method of communication with the ESP8266 rather than the AT command interface. In spite of reports on other forums, if the power supplied is sufficient for the ESP8266 when it bursts into transmit mode then it is reasonably reliable but there is only so much error checking you can do with AT commands. If it has to be serial then at least some form of <start><packet><end> would be a great improvement. An alternative to serial could possibly use SPI a protocol similar to that used with an SD Card for example. I have the development kit from (http://www.esp8266.com/) I just wish had the time - ah well.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scargill
    scargill over 10 years ago in reply to Problemchild

    I've done a fair bit of work with the ESP8266 and though I'm using different processors, right now there is definitely an argument that the only system stable enough for general use is the updated Espressif firmware which really does mean using an external processor, however the good news is that trivial stuff is possible with only minimal code (as against some Ethernet libraries used with external Ethernet cards. I've a socket application using less than 7k of code part of which is a bootstrap program and a fairly complicated response handler..  even the tiniest 8-pin devices could be used and with a software uart could then also talk to a display like the Sparkfun Microview.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube