Vous êtes sur la page 1sur 18

Explore (/tag/typeid/)

Login(/account/login)
Create
| SignUp(/account/gopro?sourcea=header&sourceaUrl=/id/UsingtheESP8266module/?ALLSTEPS)
(/about/create.jsp)
Contests
Community (/community/)
let's make(/contest/)
(/)
(/)

share what you make >


(/id/intel/)

(/editInstructable/)

(/tag/typeid/categoryliving/channelreuse/?sort=FEATURED)
(/tag/typeid/categoryoutside/channelcamping/?sort=FEATURE
(/tag/typeid/categorytechnology/channel

UsingtheESP8266module byPropellerpowered(/member/Propellerpowered/)
Download(/id/UsingtheESP8266module/?download=pdf)

(/id/UsingtheESP8266module/)
Collection

8Steps
IMadeit!

Favorite

Share

AboutThisInstructable
479,018views
(http://cdn.instructables.com/F74/YBB3/I0HYTNK5/F74YBB3I0HYTNK5.LARGE.jpg)

ThisInstructablewillteachyouhowtousethose$5.00ESP8266modules,as
wellasprovideyousomebasicknowledgeaboutnetworking.I'llbeusingthe
MicromiteCompanionKit(http://propellerpowered.com/shop/?page_id=1946)in
myexampleswhichisprogrammedinBASIC,howeveralloftheseinstructions
shouldbeadaptableeasilytoyourfavoritemicro.
Inshort,theESP8266moduleisaTTL"SerialtoWirelessInternet"device.
ProvidingyourmicrocontrollerhastheabilitytotalktoaTTLserialdevice(most
do)you'llbeinbusiness!Theoriginalinstructionshavebeentranslatedfrom
Chineseintocrypticdatasheets.We'lltrytochangethatwiththisInstructable.
TheESP8266moduleisa3vdevice,butit'snowimp.Itdrawsquiteabitof
power.Infact,you'llprobablyneedtomakesurethatyourcircuit'spowersupply
canhandleatleast1ampofpower.(Inmycase,Iwasusingasimple7.5v
500mapowersupply.WhenIstartedworkingwiththismodule,Iswitcheditfora
7.5v1amppowersupplyandhadplentyofpower.)Asitturnsoutthereisgood
reasonforthissomeYoutubevideoshavesurfacedrecentlywithfolksseeing
anythingfrom500meterstoacouplemilesoftransmissioncapabilityfromthis
module.That'salotofhorsepowerfor$5.00!

License:

247favorites
Propellerpowered
(/member/Propellerpowered/)
Propellerpowered
(http://www.propellerpowered.com)

(/member/Propellerpowered/)
Follow
175

MorebyPropellerpowered

(/id/Buildingyourown
MicromiteCompanionMinicomputer)

(/id/Microcontroller
controlledHomeEntertainmentSyst)

(/id/Howtobuildthe
QuickPlayerExtreme)
Tags:
ESP8266(/tag/typeid/categorytechnology/keyword
esp8266/)
8266(/tag/typeid/categorytechnology/keyword

8266/)

Freecloudfor
ESP8266
jumpwire.io

MakeyourIoTin5min.PublicAlpha
Released

wireless(/tag/typeid/categorytechnology/keyword
wireless/)
BASIC(/tag/typeid/categorytechnology/keyword
basic/)
micromite(/tag/typeid/categorytechnology/keyword
micromite/)
companion(/tag/typeid/category
technology/keywordcompanion/)

Colgate Sensitive Pro-Relief


HovertoExpand

airtelbroadband
online

RemovetheseadsbySigningUp(/account/gopro?
sourcea=removeads&nxtPgName=Using+the+ESP8266+module&nxtPg=/id/UsingtheESP8266module/?ALLSTEPS)

propeller(/tag/typeid/categorytechnology/keyword
propeller/)
propellerpowed(/tag/typeid/category
technology/keywordpropellerpowed/)
web(/tag/typeid/categorytechnology/keywordweb/)
server(/tag/typeid/categorytechnology/keyword

Step1:Obtainingandpreparingyour8266module

server/)

Related

(http://cdn.instructables.com/F5H/I3AH/I0HYTNTY/F5HI3AHI0HYTNTY.LARGE.jpg)

Buildingyourown
MicromiteCompanion
Minicomputer
(/id/Buildingyourown
MicromiteCompanion
TriggeryourDSLR
wirelesslywith
smartphoneandESP8266
Wifimodule(/id/Trigger
yourDSLRwirelessly
ESP8266FROM
ANYWHERE(/id/ESP8266
FROMANYWHERE/)
bytcpipchip
(/member/tcpipchip/)

EasyESP8266WiFi
DebuggingwithPython
(/id/EasyESP8266WiFi
DebuggingwithPython/)
byjimk3038

CBDBv2Evolution
ESP8266Development
BoardmeetsARDUINO
IDE!(/id/CBDBv2
EvolutionESP8266
SeeMore(/tag/typeid/?q=)

(http://cdn.instructables.com/FVC/5F6R/I0HYTNYA/FVC5F6RI0HYTNYA.LARGE.jpg)

IobtainedmymodulefromanEbayvendor
(http://www.ebay.com/itm/281430286471?
_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT)in
theUnitedStates.TheshippingwasfasterthanChina,butmoreimportantly,the
vendorprovidesthemodulewithoutthepinssolderedin.
The8266moduleisn'treallybreadboardfriendly,butit'seasytoconvertittoa
fourpinmoduleifyoupurchasethepinlessversion.(ortakeafewminutesto
removethepinsifyouhaveobtainedtheotherversion)
You'llneed5pinconnectionstomakethemodulework.(Seeimage1)

RX,TX,ground,and3vconnectedtotwopositionsonthemodule.
Isourceda4pinfemalecablefrommypartsboxandcutoffoneend.
Iusedasmallamountofnailpolishtocarefullypaintovertheunusedpin,then
loopedthe3vconnectionfromthepowerpinovertheunusedpinintothecenter.
(Seeimage2)
Theendresultisa4pinmodulethatisnowbreadboardfriendlytoplugintoyour
project.

Step2:Hookingitup

(http://cdn.instructables.com/FHX/O2JV/I0HYTNV3/FHXO2JVI0HYTNV3.LARGE.jpg)

Onceyouhavethemoduleadapted,nowmakethefourconnections,
(RX,TX,3v,Gnd)toyourmicrocontroller.I'vebreadboardedminetomyMicromite
Companion(http://propellerpowered.com/shop/?page_id=1946)whichisusing
theMicromitechip(createdbyGeoffGraham)runningBASIC.TheMicromite
hasmultipleserialconnections,andaconsolewhichI'musingasmyinterface
tothe8266module.YoucouldevenconnectthemoduledirectlytoyourPCif
youhaveaTTLSerialtoUSBadapter.(Don'ttrytoconnectthemoduletoaPC
serialportdirectly,youcouldcausedamagetothemoduleortheyour
computer!)
ThecorrectconnectionstotheMicromiteCompanion(Micromite)areRXto21,
TXto22.
Thedefaultbaudratesettingsare115200,N,8,1
Next,you'llneedtouseaterminalprogramtoprogramtheunit.
I'vewrittenthefollowingBASICterminalprogramfortheMicromite:
Open"Com1:115200"As#1
terminal:
a$="":b$=""
a$=Inkey$
Ifa$<>""ThenPrint#1,a$
IfLoc(#1)>=1Thenb$=Input$(1,#1)
char=Asc(b$)

Ifchar>31ThenPrintb$
Ifchar=13ThenPrint""
GoToterminal

Step3:Configuringthe8266Module

(http://cdn.instructables.com/FV4/W5CM/I0HYTNO2/FV4W5CMI0HYTNO2.LARGE.jpg)

You'llneedtoconfigurethemoduleforyourwirelessnetwork.
YoushouldalreadyknowyourwirelessSSIDandpassword,aswe'llneedthose
next!
Fromyourterminal,typeATandpressenter.IfyougetacheeryOKfromthe
module,youhavehaveaccomplishedabigstepinthisInstructable!
Next,typeAT+RSTandgivethemoduleamomenttoreset.You'llseea
paragraphofdatareturned.
TypeAT+CWMODE=3tosetthemoduleasbothaclientandanaccesspoint.
Don'tworryifyoumakeatypointheprocessofdoingthesecommands.
(There'snobackspace)JusthittheenterbuttonandenjoythebrokenEnglish
errormessageandretypethecommand.
Next,let'sseeifwecanseeyourwirelessrouter.TypeAT+CWLAPandenter.
You'llseesomethinglikethis.
+CWLAP:(4,"Guest",75)
+CWLAP:(4,"linksys",80)
+CWLAP:(4,"family",90)
+CWLAP:(4,"NETGEAR",91)
Seeyouraccesspoint?Typethefollowingcommand,replacingSSIDand
passwordwithyourinformation.
AT+CWJAP="SSID","password"
Congratulations!Yourmoduleisconfiguredforyournetwork.
NowweneedtoseewhatIPaddresshasbeenassignedtoit.
TypeAT+CIFSRandpressenter.Yourmodule'sIPaddressshouldbe
displayed.

192.168.1.20

Step4:BASICnetworking

(http://cdn.instructables.com/F3L/D6ND/I0HYU6WD/F3LD6NDI0HYU6WD.LARGE.jpg)

Ok,we'velostabouthalfouraudienceattheendofthelaststep.Ifyouarestill
reading,itmeansthatyouhaveaworkingmodule,butneedsomeguidancein
theworldofnetworking.Don'tworry,youareingoodhands.I'mgoingto
condenseasemesterofnetworkingclasses(IusedtoteachCCNA)intojust
enoughnetworkingknowledgetobereallydangerous.Soundlikefun?Readon!
SoyouhavetheIPaddressthatwasdisplayedinthelaststepofthelastpage.
(Didyouwriteitdown?)
Nowwhat?
I'llassumeyouareathomewithawirelessroutersomewhereinyourhome.It's
probablyconnectedtoeitheracablemodemorDSLadapter.It'sevenpossible
thatyouhaveasingledevicewhichisdoingbothjobs.Thisdeviceisthe
gatewaytoallofyourinternettravels,eventheInstructableyouarereading!
Yourhomenetworkhasaprivateside,andapublicside.Theprivatesideof
yournetworkisallofthecomputersanddeviceswhichareconnectedtoyour
wirelessrouter.Theycanbewiredtoit'sports,orconnectedwirelessly.
YouactuallygotaBIGCLUEtohowtheprivatesideofyournetworkis
configuredbytheIPAddressyouweregiventoyourmodule.Minewas
192.168.1.20.
Takealookatthosefirstthreenumbers..192.168.1
Thosearetheprivatesideofyournetwork.Youmighthave192.168.0oreven
10.0.0.
AllofyourcomputersandwirelessdevicesonyournetworkhaveanIPaddress
thatstartswiththosethreedigits.
It'sthatlastdigit(20inmycase)thatdeterminesthefulladdressofeach
connection.
Eachofyourdeviceswillhaveadifferentlastnumber.Yourwirelessrouter
probablyuses1.192.168.1.1
Theneatpartabouttheprivatenumbersisthattypicallythereisroomforupto
254differentdevicesandcomputersonyournetworkrightnow!Talkabouta
LANparty!
Takealookattheimageabove.
RememberwhenIsaidthatyourwirelessrouterhasbothaprivatesideanda
publicside?
YourrouterreceivesaliveIPaddressfromyourInternetprovider.Thisaddress
isuniquetotheentireworld,andit'sveryimportantthatitis!Thewirelessrouter
actuallycontainstwoaddresses.Oneistheprivateside,theotheristheliveIP

addresswhichisvisibletotheworld.Don'tworry,yourrouterisdesignedtobe
thegatekeeper,controllingyourwebrequestsfromyourdevicesandkeeping
thebadguysoutofyourcomputers.Thetruthis,thoseprivateIPaddressesare
notvisiblefromtheoutsideworld.(Unlesswewantthemtobe,keepreading!)

Step5:Communicatingwiththemodule

See How Dove Elixir Oil is better


than ordinary hair oils?

(http://cdn.instructables.com/FBU/DXVL/I0HYU1QU/FBUDXVLI0HYU1QU.LARGE.jpg)

Let'stakeabreakfromnetworkingclasstoseeifyourlittle8266moduleisable
tocommunicatewithyournetwork.AneasywaytodothisisusingthePING
command.
IfyouareusingWindows:
ClickonStart,Run,andtypeCMDandpressenter.
TypeIPCONFIGandpressenter.
TypePINGandtheIPaddressofyourmodule.(ItypedPING192.168.1.20)
IfyouareusingLinux:
Openaterminalwindow
TypeIFCONFIGandpressenter
TypePINGandtheIPaddressofyourmodule(ItypedPING192.168.1.20)
I'vecircletwopiecesofinformationinmyimage.ThefirstistheIPaddressof
thecomputerI'mworkingat.(Thisisalwaysgoodinformation)andthesecondis
theIPaddressofwhatIactuallyPINGed.DidyoucatchmePINGingmy
wirelessrouter?Goodeyes!Pingyourrouteraswellasseeifitanswers.It's
usually.1
AsuccessfulPINGrequestwillalwaysreturnasetofnumberslikeminedid.If
youget"RequestTimeOut"messagesitmeansthatsomethingisn't
communicating.

Step6:RunningasimplewebserverinBASIC

Hover to Expand

(http://cdn.instructables.com/FOJ/LW69/I0HYU2ED/FOJLW69I0HYU2ED.LARGE.jpg)

Ifyou'vegottengoodPINGresultsfromyourmodule,youarereadytostart
experimenting!
Let'sstartwithareallysimplewebserverwritteninMMBASIC.Ifyouareusing
anothermicro,theBASICprogramshouldbeveryeasytoreadandconvertto
yourlanguage.
TypeinthelittleprogramandRUNitonyourMicromiteCompanion.
Ifyouareusingaterminalprogramconnectedtoyour8266module,takenoteof
thefollowingcommands..
AT+CIPMUX=1
AT+CIPSERVER=1,80
Thesetwocommandssetupthemagictomakethemoduleautomatically
answerarequestfromanothercomputerordevice.Inmycase,I'veconfigured
themoduletoanswerwebrequestsonport80.
Typicalportsareasfollows:
80=Httpwebrequests
8080=Httpwebrequestsonnetworksonwhich80isblocked
23=Telnet(textterminal)requests
Onceyou'veruntheprogram,openawebbrowserandtypetheaddressofyour
device(minewas192.168.1.20)intothewebaddressbar.Thatplacewhere
you'vetypedwww.instructables.com.(http://www.instructables.com.)
ThemoduleseemstohandlealloftheformattingoftherequiredHTMLheaders
yourwebbrowserislookingfor,soyoucanblastdatadirectly.(Atareasonable
speedofcourse!)

Step7:InvitingtheInternet

(http://cdn.instructables.com/F97/JM6P/I0HYTNYC/F97JM6PI0HYTNYC.LARGE.jpg)

(http://cdn.instructables.com/FYD/5OYP/I0HYTNVY/FYD5OYPI0HYTNVY.LARGE.jpg)

Soyoucancommunicatefromyourwebbrowser,yourphone,laptop,orother
Internetcapabledevicetocontrolyourprojects.I'llbettheideasarealready
churning!
WhatifyouwantyourfriendinIrelandtocontrolyourprojectaswell?
Whatifyouwanttocontrolyourprojectfromsomewhereotherthanyour
(http://cdn.instructables.com/FWJ/TMWJ/I0HYTNX4/FWJTMWJI0HYTNX4.LARGE.gif)
homenetwork?
ThoseprivateIPaddressesareonlygoodwhileyouareinsideyourown
network.
It'stimetotalkaboutpublicaddressandsomethingcalledrouter"Port
Forwarding".
First,youneedtoknowyourrouter'spublicInternetaddress.It'seasytofind.
Simplypointyourwebbrowseratwww.whatismyip.com
(http://www.whatismyip.com)areyoubegivenyourliveIPaddress.(Seefirst
image)
Nextyou'llneedtoconfigureyourroutertoallowrequestsfromtheoutsideworld
intoyournetworkandprovideita"rule"toallowcertaintraffictoyourwireless
module.Thisiscalled"PortForwarding".
RememberwhenisaidthatIPING'dmywirelessrouterat.1tofindit's
address?
Openyourwebbrowserandtypetheaddressofyourwirelessrouterintothe
addressbar.
(Usually,it's192.168.1.1or192.168.0.1dependingonyournetwork,butyou
shouldknowitnow.)
Therouterwillrespondwithalogin/passwordresponse.Unlessyouhavere
programmedit,(Mostpeoplehaven't)itwillacceptadminandpassword.(Don't
worry,yourrouterdoesn'tallowfolksfromtheInternettoprogramitbydefault!)
Here'sthetrickypart.You'llneedtodig,(usuallyinthe"advanced"menus)for
somethingcalled"PortForwarding"or"Forwarding".Allroutersarealittle
different,butdon'tbeafraidtopokearound.Youaren'tgoingtohurtanything.
Takealookatthe2ndand3rdimages.Theyaregreatsamplesofsome
commonrouters.
Onceyoufoundit,you'llneedtoaddarulewiththefollowinginformation:

TheExternalPort#youwanttousewithyourdevice.Mostofthetime,you'lluse
either80(ifyouwanttoprovidewebaccess)or23(ifyouwanttoprovidetelnet
"text"access).Justusethesamenumbertwiceasyouseeinmyexamples.
SomerouterswillalsoaskforanInternalPort#aswell.Againyoucanusethe
samenumberstwiceagain.Finally,givetheIPaddressofyourdevice.(Mine
was192.168.1.20)
Onceyou'veestablishedthisruleinyourrouter,yourdeviceisnowaccessible
fromtheworld!Fromoutsideofyournetwork,youcanuseyour"live"IPaddress
toaccessyour8266module.

Step8:ClosingNotes

(http://cdn.instructables.com/FF7/MJ5K/I0HYU490/FF7MJ5KI0HYU490.LARGE.jpg)

RememberwhenIsaidyou'dgetenoughnetworkinginformationtobe
dangerous?Welcometothefun.
Afewnotes:
First,someInternetproviders,inpaticularcableprovidersdon'tliketogiveyou
theabilitytousethecommonlowerportnumbers(likeport80,or23).Theywill
claimthatdoingthisisaviolationoftheirservice(nonsense!)orthattheyare
protectingyoubyblockingtheseports.(hogwash!)
Ifthisisthecase,justushigherportnumbers,like8080or2323(orjustmake
upahighernumberyoucanremembereasily.)Justadditattheendoftheweb
ortelnetrequesttomakeitwork.
Also,fromtimetotimeyour"live"IPaddresscanchangemakingitimpossible
foryoutoreachyourprojectuntilyougobackhomeandlookupthenew
addresswithwww.whatismyip.com.(http://www.whatismyip.com.)Thereisa
great,freeservicewhichyoucansubscribetocalledDuckDNS(
www.duckdns.org(http://www.duckdns.org))whichwillgiveyouanameontheir
serverandalittletooltorunonyourPCwhichwillkeeptrackofthechanges.
InsteadofusingtheIPaddress,you'llbeabletouse{yourname}.duckdns.org.It
reallyworkswell!
Needmorehelp?
DropovertoourfriendlyforumsatPropellerpoweredandpostup!
http://forums.propellerpowered.com(http://forums.propellerpowered.com)

Wehaveabenicecommentpolicy.
Pleasebepositiveandconstructive.

IMadeit!

140of
58

AddImages

MakeComment

Next(http://www.instructables.com/id/UsingtheESP8266module/?
&sort=ACTIVE&limit=40&offset=40#DISCUSS)

AlessandroP(/member/AlessandroP/)

5monthsago

Reply

Hello,
(/member/AlessandroP/)

IamworkingonaprojectwiththeESP8266andneedtodefinerequirements
soIhavedifferentoptions.IwanttousetheESP8266Version12connected
toArduinotocollectsensorsdataandcommunicatewithamobileappthat
sendsthesedatatothecloud.SoIamtryingtofigureouthowtosetthe
ESP8266totalktothemobileapp.Themobileappwouldbelikeabridge
betweentheESP/Arduinosystemandthecloud.Themobilephonecanbeset
astetheringorportablehotspotviaWifiandconnecttothecloudvia4G.
Wouldliketohavesomesuggestionsforthebestsetupforthe
ESP8266/Arduinointhisconfiguration?

drmpf(/member/drmpf/) AlessandroP

1monthago

Reply

IsuggestsettingthemobileasanAccessPointandthenconnecting
(/member/drmpf/)
directlyfromESP8266tocloud.IwillsoonputupanInstructable

showinghowtouseESP826601asapassthroughWificonnectionfor
ArduinoconnectedviaSerial(orSerial1)
P.S.UsingtheATcommandsetisaskingfortrouble(althoughIhavea
librarythatworks,seewww.pfod.com.au)

poltu12345667(/member/poltu12345667/) AlessandroP
3monthsago

Hey,

Reply

(/member/poltu12345667/)

Iamtooworkingonthistypeproject.Insteadof
arduinoIamusingAtmel8051.Itwillbeveryhelp
fullifyougivemesomeinformationonthesame.
Thanksinadvance

jmpm4619(/member/jmpm4619/)

2monthsago

Reply

Hiwouldyoubeabletoassistinmakingaschematicwiththeesp8266?
(/member/jmpm4619/)

Ambrogio(/member/Ambrogio/)

2monthsago

Reply

2monthsago

Reply

(/member/Ambrogio/)

priyam170(/member/priyam170/)

Howcaniaccessmyesp8266fromanywhereintheworld..??
(/member/priyam170/)

priyam170(/member/priyam170/)

2monthsago

Reply

howcanimaketheesp'sIPstatic(assignedbyrouter,somethinglike
(/member/priyam170/)
192.168.1.17).

SeanM9(/member/SeanM9/)

3monthsago

Reply

Greatjob!ForthosewantingtotalkfromtheirPC,youcanusethisbreakout
(/member/SeanM9/)
boardtoconvertfromUSBtoTTL:https://www.sparkfun.com/products/9873.

(https://www.sparkfun.com/products/9873.)
ThereisaprogramcalledCoolTermWinthat'sfreethatletsyoucommunicate
totheboard:http://freeware.themeiers.org/.Besuretosetyourbaudto115K
intheoptions.

ReneS1(/member/ReneS1/)

3monthsago

Reply

CanyouusethemoduleinaframeworklikeTemboo&grovestreams
(/member/ReneS1/)

fhovin(/member/fhovin/)

4monthsago

Reply

Hi.Mymoduleseemstobeactingstrangeanddifferentlyfromboththis
(/member/fhovin/)
exampleandallothersI'vefound.

Icanconnecttomyaccesspoint.Butforsomereason,AT+CIFSRshowsmy
devicehavingTWOipaddresseswhenIuseAT+CWMODE=3Oneactualy
IPaddressinmyLAN(10.0.0.52),andanother(192.168.4.1)whichiddoesn't
getfrommyrouter.
IfIuseCWMODE=1,IonlygettheactualIPaddressinmyLAN.
But,ineithercase,I'munabletopingthedevice.Ijustget"Destinationhost
unreachable",alsoaftersettingAT+CIPMUX=1andAT+CIPSERVER=1,80.
AndIcannotconnecttoport80withaterminalprogrameither.>
Anyideas?

A.Paul.Frost(/member/A.Paul.Frost/) fhovin

3monthsago

Reply

ThepingcommandissentoveryourEthernetnetworktothedevice,a
(/member/A.Paul.Frost/)
couplethingscouldbegoingon.

1.Youareseeingaresponsefromyourdeviceoverserial,butit'snot
actuallyconnectedtothenetwork.
2.Thedeviceisonthenetwork,butyourIPaddressand/orsubnet
maskarecausingcommunicationissues.Trytomakesurethefirst
threeoctetsofyourIPaddressandsubnetmaskmatchonboth
devices(pingerandpingee).
3.Afirewallorotherpieceofsoftwareisblockingcommunications.
Ididn'twritethisinstructablebutIhopethathelpsifyouhaven'tgotten
itworkingalready.

radamesajna(/member/radames+ajna/)

5monthsago

Reply

4monthsago

Reply

Heyguys,checkthisout!
(/member/radames+ajna/)

Aluabasedfirmwareforwifisocesp8266
https://github.com/nodemcu/nodemcufirmware
(https://github.com/nodemcu/nodemcufirmware)

aav1(/member/aav1/) radamesajna

yeahitisacoolfirmwareHere'sanexampleforaprojectwiththis
(/member/aav1/)
firmwareifyouareinterested

http://www.whatimade.today/esp8266andthewaterheater/

radamesajna(/member/radames+ajna/)

5monthsago

Reply

hey,isitpossibletosettheitupasanaccesspoint?i.emakeitdiscoverable
(/member/radames+ajna/)
byanSSID?

KevinC10(/member/KevinC10/) radamesajna

5monthsago

Reply

Yesitis.Ihave6namedGEOCACHE1,2,3andsoonforvarious
(/member/KevinC10/)
geocacheshiddeninthearea,Iamworkingonsometypeofsolarfor

thesupply,wastriggeringbyinfraredtostartthedevice,thenmoved
ontosolar.Inapmode,youcanlookatthewifisettingsonyourphone
ordownloadanappforrangeofwifi'sandasyougetclosertothe
geocachethesignalgetsbetteretc.Thisistheprimaryuseatthistime
forme.Ihave2othercontrollingrelaysandamusinganotherforrgb
ledmixing.ThergbcolormixingIamgoingtoexpandtouseonamini
remotecontrolcar,colormixingwillbethecontrolvoltageforright,left

andfoward[noreverseyet]bufferedoffa3transisters.Thisisjustfor
funandwhereIamnow.Ihaditconnectedtothewebwithnoother
interest.Iamapplyingthemtosurgestripsandoutletsnamingthem
outletone,orTVorkitchenlightetcusingadifferentcodetocontrol
theonoffofeachdevice,yesIknowsmartswitchsandplugsareout
theirbutwhenyoumakeityourselditisfun.

radamesajna(/member/radames+ajna/) KevinC10

5monthsago

Reply

5monthsago

Reply

Heygreat!thanksfortheinformation
(/member/radames+ajna/)

BugBlaster(/member/BugBlaster/) KevinC10

Iwasthinkingofdoingthesamewithtegeocachesbutthenperhaps
alsolettingpeoplegetcordsfromthewebpagesorevenhaveapizzel
(/member/BugBlaster/)
builrintothepagethatthencouldopenthelockedcache

KevinC10(/member/KevinC10/) KevinC10

5monthsago

Reply

AlsohereisalinktosomeKUHNsmartsocketsforabout$21.00fre
(/member/KevinC10/)
shipping.http://www.ebay.com/itm/SmartWifiPlugSocketRemote

ControlPowerSocketforAndoidiPhoneAppUSPlug
/181588872808?pt=LH_DefaultDomain_0&hash=item2a478a4e68

GNoorP(/member/GNoorP/)

5monthsago

Reply

WoW!ExcellentTutorial.Ilikeditverymuch.Easytofollow,andIjust
(/member/GNoorP/)
connectedmyESPmodulein15minutes.GreatWork.

wholliday1(/member/wholliday1/)

6monthsago

Reply

howdoweenabledDHCP?imtryingtoconnectmymobilephonetoit......or
(/member/wholliday1/)
doesthisonlyallowinfrastructuretootheresp8266's?

ihavemadeasuccessfullTCPMessengers!

KDMcMullan(/member/KDMcMullan/) wholliday1

6monthsago

Reply

DHCPservingisafeatureofyourrouter/modem.Areyoutryingtoget
(/member/KDMcMullan/)
your8266toacquireanIPaddressbyDHCP?Ifyouweretoallowthis,

thentheotherdevicesonyournetwork(egyourphone)wouldn't
"know"theaddressofthe8266andcouldn'tcommunicatewithit.It's
bestfor"servers"(likethe8266)tohavefixedIPnumbers.

wholliday1(/member/wholliday1/) KDMcMullan

6monthsago

Reply

wellthecodeinsidethe8622hasDHCP,andwhybeanaccesspointit
(/member/wholliday1/)
cantassignedIPstootherconnections?

yousayingthatyoucanonlyconnecttothese8622softAPifother
connectionsTOthedeviceisusingpresetIPs?
(imnotusingarouteriwanttoconnectmymobiletocommunicateto
myrobot)
myphoneismeanttoaskforanIPfromthe8622DHCP,saysthatit
hasone

KDMcMullan(/member/KDMcMullan/) wholliday1

6monthsago

Reply

I'mcompletelyunawareofthefunctionalityofthecodeinthechip.Ifind
(/member/KDMcMullan/)
ithardtobelieveitcanbeaDHCPserver.

Iabsolutelydidnotsaythatonecanonlyconnectthese8266ifother
deviceshavefixedIPs.I'msayingthatifyouwantthe8266tobea
"server"IcannotseesenseinithavinganaddressallocatedbyDHCP

asotherdeviceswouldbeunabletotalktoitastheywouldhaveno
meansofknowingitsaddress.
Ifthe8266is,indeedaDHCPserver,thenyourphoneshouldbeable
toobtainanIPaddressfromitandcommunicatewithit.Idoubtithas,
though.
Irritatingly,themoreIreadaboutthedevice,themoreconvincedIam
thatthereisnowwaytogiveitafixedIPaddress!Cananyone
confirm?Howcanweportforwardiftheaddressisallocatedby
DHCP?

wholliday1(/member/wholliday1/) KDMcMullan

6monthsago

Reply

Okey,ithinkifoundsomething,oddlythesoftAPworkswhen
(/member/wholliday1/)
anotherdeviceisalreadyconnectedtoitsuchasanother8266after

thatthephoneconnectedandgotanipfromthesoftAPDHCP
service...
AmicorrectthattheDHCPforthesedevicesstartat100254?
Prettycoollittledevices!!DEFINATELYagamechanger

KevinC10(/member/KevinC10/) wholliday1

5monthsago

Reply

TrythisoutasIhavebeenexp.withthedevicesforabout3months.
(/member/KevinC10/)
Placethe8266inmode3,downloadtheesp8266smartswitchfromthe

playstroe,justruntheapp,itwillgiveyouthefollowingjustrunningthe
appwiththeespoff:
androidip:0.0.0.0
esp8266ip:0.0.0.0.
afterpoweringuptheespandifyouhaveitprogramedasanap,
searchforitinthewifimenuandconnecttoit,,thenhitstatusagainon
thesmartswitchapp,itwillgiveyousomthingdifferentnow,mineisthe
following:
androidip:192.168.4.100andtheesp8266ip:192.168.4.1hopethis
somehelp.Youcandownloadthecodeforeachappfromthe
developeryontsasyouwillseefromtheapp.Moreinfkeepscomming
everyday.Theirwasalmostnothingaboutthischipandnowitisalot
moreinfoouttheir.Havefun.

JamesCaska(/member/JamesCaska/)

5monthsago

Reply

ThisarticleinspiredmetoincludeabreakoutfortheESP8266moduleas
(/member/JamesCaska/)
standardpartoftheVZBUSmakingitsnaptocreateyourownPCB'sthatuse

thesemodules.
https://www.kickstarter.com/projects/683231209/virtualbreadboardpcbdirect
(https://www.kickstarter.com/projects/683231209/virtualbreadboardpcb
direct)

thenecroscope(/member/thenecroscope/)

5monthsago

Reply

6monthsago

Reply

Nicesimplewriteup!Thanks
(/member/thenecroscope/)

dhanishvijayan(/member/dhanishvijayan/)

Hello,t
(/member/dhanishvijayan/)

Thanksforanicetutorial.
IsthereawaytoPingotherdevicesconnectedtothesamenetworkof
ESP8266.?

zxlee(/member/zx+lee/)

8monthsago

Greatinstructables.ItjustgivememostoftheinfoIneedforESP8266,
(/member/zx+lee/)
networkingandportforwarding.Thanks

Reply

KDMcMullan(/member/KDMcMullan/) zxlee

6monthsago

Reply

www.portforward.comhasinstructionsonhowtosetupportforwarding
(/member/KDMcMullan/)
frommanydifferenttypesofrouter.

Vincent19(/member/Vincent19/) zxlee

6monthsago

Reply

6monthsago

Reply

6monthsago

Reply

workingonit?
(/member/Vincent19/)

WillarF(/member/WillarF/)

Excelenteexplicacionlosfelicito
(/member/WillarF/)

rk_garg(/member/rk_garg/)

HereisacodetocontroltheIOPinsofarduinoUNOovertheweb.
(/member/rk_garg/)

#include<SoftwareSerial.h>
#defineDEBUGtrue
#defineSSID"uourSSID"
#definePASSWORD"password"
SoftwareSerialesp8266(2,3)//makeRXArduinolineispin2,makeTX
Arduinolineispin3.
//ThismeansthatyouneedtoconnecttheTXlinefromtheesptothe
Arduino'spin2
//andtheRXlinefromtheesptotheArduino'spin3
voidsetup()
{
Serial.begin(9600)
esp8266.begin(9600)//youresp'sbaudratemightbedifferent
pinMode(11,OUTPUT)
digitalWrite(11,LOW)
pinMode(12,OUTPUT)
digitalWrite(12,LOW)
pinMode(13,OUTPUT)
digitalWrite(13,LOW)
sendData("AT+RST\r\n",2000,DEBUG)//resetmodule
sendData("AT+CWMODE=3\r\n",1000,DEBUG)//configureasaccesspoint
booleanwifi_connected=false//notconnectedyet...
for(inti=0i<5i++)//attempt5timestoconnecttowifithisisagoodidea
{
if(connectWiFi())//areweconnected?
{
wifi_connected=true//yes
break//getouttahere!
}
}
sendData("AT+CIFSR\r\n",1000,DEBUG)//getipaddress
sendData("AT+CIPMUX=1\r\n",1000,DEBUG)//configureformultiple
connections
sendData("AT+CIPSERVER=1,80\r\n",1000,DEBUG)//turnonserveronport
80
}
voidloop()

{
if(esp8266.available())//checkiftheespissendingamessage
{
Serial.print("available")
if(esp8266.find("+IPD,"))
{
delay(1000)//waitfortheserialbuffertofillup(readalltheserialdata)
//gettheconnectionidsothatwecanthendisconnect
intconnectionId=esp8266.read()48//subtract48becausetheread()
functionreturns
//theASCIIdecimalvalueand0(thefirstdecimalnumber)startsat48
esp8266.find("pin=")//advancecursorto"pin="
intpinNumber=(esp8266.read()48)*10//getfirstnumberi.e.ifthepin13
thenthe1stnumberis1,thenmultiplytoget10
pinNumber+=(esp8266.read()48)//getsecondnumber,i.e.ifthepin
numberis13thenthe2ndnumberis3,thenaddtothefirstnumber
digitalWrite(pinNumber,!digitalRead(pinNumber))//togglepin
//makeclosecommand
StringcloseCommand="AT+CIPCLOSE="
closeCommand+=connectionId//appendconnectionid
closeCommand+="\r\n"
sendData(closeCommand,1000,DEBUG)//closeconnection
}
}
}
/*
*Name:sendData
*Description:FunctionusedtosenddatatoESP8266.
*Params:commandthedata/commandtosendtimeoutthetimetowaitfor
aresponsedebugprinttoSerialwindow?(true=yes,false=no)
*Returns:Theresponsefromtheesp8266(ifthereisareponse)
*/
StringsendData(Stringcommand,constinttimeout,booleandebug)
{
Stringresponse=""
esp8266.print(command)//sendthereadcharactertotheesp8266
longinttime=millis()
while((time+timeout)>millis())
{
while(esp8266.available())
{
//Theesphasdatasodisplayitsoutputtotheserialwindow
charc=esp8266.read()//readthenextcharacter.
response+=c
}
}
if(debug)
{
Serial.print(response)
}
returnresponse
}

booleanconnectWiFi()
{
Stringcmd="AT+CWJAP=\""//formeg:
AT+CWJAP="dynamode","55555555555555555555555555"
cmd+=SSID
cmd+="\",\""
cmd+=PASSWORD
cmd+="\""
esp8266.println(cmd)
delay(5000)//giveittimemyaccesspointcanbeveryslowsometimes
if(esp8266.find("OK"))//healthyresponse
{
Serial.println("ConnectedtoWiFi...")
returntrue
}
else
{
Serial.println("NotconnectedtoWiFi.")
returnfalse
}
}
Usethewifiipaddress(NOTthe192.168.4.1)inhtmlpage.
FollowthisURLfordetailshttp://allaboutee.com/2015/01/02/esp8266arduino
ledcontrolfromwebpage/

atiq136(/member/atiq136/)

6monthsago

Reply

NiceWork!!!
(/member/atiq136/)

DoesanybodyworkedonSTM32F4DiscoveryboardwiththisESP8266WiFi
module...?????

aakash1995bansal(/member/aakash1995bansal/)

6monthsago

Reply

9monthsago

Reply

(/member/aakash1995bansal/)

Scargill(/member/Scargill/)

LackoffixedIPandthatpesky"busy"messagearethetwothingscurrently
(/member/Scargill/)
seriouslyimpedingtheuseoftheESP8266whichisotherwisesomethingofa

gamechanger.

Bullfrogerwytsch.(/member/Bullfrogerwytsch./) Scargill
7monthsago

Reply

tomas.rudolf1(/member/tomas.rudolf1/) Bullfrogerwytsch.
6monthsago

Reply

IthastohaveaMacaddressright?Cantyouset
(/member/Bullfrogerwytsch./)
yourroutertogivethatmacaddressacertainIP
everytime?

Yesyoucan,butyouwouldmustprogramthe
(/member/tomas.rudolf1/)
smartthingbehindthistoaskaDHCPserverfor
addressandthensettheIPtoaddressfromits
response(permanentorevendynamicIP,but
alwaysfromDHCPresponse).Thiswillworkonly
ifthiscancommunicateonMAClevelof
communication(afterjoiningthewifinetwork)
whichIdon'tknow(yet).

rkhope(/member/rkhope/)

7monthsago

Reply

Nicework.
(/member/rkhope/)

Takealookatmywork!
OpenSource,StandaloneESP8266Webserverwithgreatresponsive,mobile
friendlyGUI
TurnGPIO0onoffremotely
Domore...explore..!
Alsoincludescompiledfirmwarefortest.
https://github.com/IOCare/esp8266GUI
(https://github.com/IOCare/esp8266GUI)
Basedonoriginalworkbysprite_tm(thanks)

arpruss(/member/arpruss/)

7monthsago

Reply

IfIconfigurethe8266moduletoconnecttomyhomeWiFi,willitafterwards
(/member/arpruss/)
automaticallyconnecteachtimeit'spoweredup,ordoessomeserial

commandneedtobesentforiteachtimetoconnect?
Ifitconnectsautomaticallyonpowerup,thenonecanuseitasasupersimple
wirelesssensor(withsignificantlatency,butthat'sirrelevantformy
application).I'mthinkingofusingitinconjunctionwithaLeakfrogwaterleak
detector.TheideaisthatIwouldwire8266modulestoLeakfrogunits,sothat
whenawaterleakisdetectedthe8266ispoweredup,andconnectstoWiFi.
Someotherdevicerunningonmynetwork(e.g.,anoldAndroidphoneor
tablet,ormaybearouterwithcustomfirmware)willbepollingthenetworkand
willemailandtextmetotellmewhich8266modulehaspoweredup,andwill
againemailandtextwhenthemodulehaspowereddown.
Butifthe8266requiresaserialcommandtoconnect,thenamicrocontrolleris
neededtogeneratethatserialcommand,andthatcomplicatesthehardware.

140of
58

Next(http://www.instructables.com/id/UsingtheESP8266module/?
&sort=ACTIVE&limit=40&offset=40#DISCUSS)

Wehaveabenicecommentpolicy.
Pleasebepositiveandconstructive.

IMadeit!

AboutUs

AddImages

MakeComment

FindUs

WhoWeAre(/about/)

Facebook(http://www.facebook.com/instructables)

Advertise(/advertise/)

Youtube(http://www.youtube.com/user/instructablestv)

Contact(/about/contact.jsp)

Twitter(http://www.twitter.com/instructables)

Jobs(/community/PositionsavailableatInstructables/)
Help(/id/howtowriteagreatinstructable/)

Pinterest(http://www.pinterest.com/instructables)
Google+(https://plus.google.com/+instructables)
Tumblr(http://instructables.tumblr.com)

Join our newsletter:

enteremail

Join!

Resources

Mobile

TermsofService(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |

ForTeachers(/teachers/)

PrivacyStatement(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |

ArtistsinResidence(http://www.autodesk.com/artistinresidence/home)

DownloadournewappsforiOS,
AndroidandWindows8!

LegalNotices&Trademarks(http://usa.autodesk.com/legalnoticestrademarks/) | MobileSite(http://m.instructables.com)

GiftProAccount(/account/give?sourcea=footer)

(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)

Forums(/community/)
2015Autodesk,Inc.
Answers(/tag/typequestion/?sort=RECENT)
Sitemap(/sitemap/)

Android
(https://play.google.com/store/apps/details?
id=com.adsk.instructables)
iOS
(https://itunes.apple.com/app/instructables/id586765571)
Windows
(http://apps.microsoft.com/windows/en
us/app/7afc8194c771441a9590
54250d6a8300)

GoProToday(/account/gopro?sourcea=footer)

We'reHiring!(/community/PositionsavailableatInstructables/)

Vous aimerez peut-être aussi