Вы находитесь на странице: 1из 28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

ESP8266ThingHookupGuide
CONTRIBUTORS:
FAVORITE

JIMB0
1

Introduction
Overthepastyear,theESP8266hasbeenagrowingstaramongIoTorWiFirelatedprojects.Itsan
extremelycosteffectiveWiFimodule,thatwithalittleextraeffortcanbeprogrammedjustlikeany
microcontroller.Unfortunately,theESP8266hasmostlyonlybeenavailableinatiny,modularform,
which,withlimitedI/Oandafunkypinout,canbedifficulttobuildaprojectaround.

TheoriginalESP8266WiFimodule.GreatforpiggybackingontoanArduino,hardtobuildaproject
around.
SparkFunsnewdevelopmentboardfortheESP8266breaksoutallofthemodulespins,andcomes
equippedwithaLiPocharger,powersupply,andalloftheothersupportingcircuitryitrequires.We
lovinglycallittheThingitstheperfectfoundationforyourInternetofThings.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

1/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

CoveredinthisTutorial
ThistutorialwillfamiliarizeyouwithallthingsSparkFunThing.Itssplitintosections,whichcover:
HardwareOverviewAquickrundownoftheThingscomponentsandpinout.
PoweringtheThingTheThingcanbepoweredthrougheitherUSBoraLiPobattery.
ProgrammingtheThingInterfacea3.3VFTDIBasicwiththeThingtoprogramit.
HardwareAssemblyTipsandrecommendationsonwhattosoldertotheThingsI/Opins.
InstallingtheESP8266ArduinoAddonTheThingcanbeprogrammedusingArduino!Justfollow
theinstructionsheretoinstalltheboarddefinitions.
ExampleSketch:PostingtoPhantOurfirstexampleshowshowyoucanusetheThingtopost
datatodata.sparkfun.com.
ExampleSketch:APWebServerSettheThingupasanaccesspointanduseittoserveweb
pages.
ExampleSketch:GoodnightThing(SleepMode)PuttheThingtosleeptosavethatsweet
batteryjuice.
UsingtheArduinoAddonThereareafewkeydifferencesbetweenprogrammingtheThingand
anyotherArduinoboard.

RequiredMaterials
Tofollowalongwiththistutorial,andgetupandrunningwiththeThing,youmayneedafewextratools
andmaterials.ThiswishlistincludeseverythingweuseinthistutorialtoprogramandusetheThing:

ESP8266ThingHookupGuideSparkFunWishList
SparkFunESP8266Thing
WRL13231

TheSparkFunESP8266ThingisessentiallyabreakoutanddevelopmentboardfortheESP8266WiFiS

SparkFunCerberusUSBCable6ft
CAB12016

You'vegotthewrongUSBcable.Itdoesn'tmatterwhichoneyouhave,it'sthewrongone.Butwhatifyo

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

2/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

SparkFunFTDIBasicBreakout3.3V
DEV09873

Thisisthenewestrevisionofour[FTDIBasic](http://www.sparkfun.com/commerce/product_info.php?pro

(2)ArduinoStackableHeader10Pin
PRT11376

Thisisa10pinfemaleheader,withextralonglegsgreatforstackingR3compatibleArduinoshields!

PolymerLithiumIonBattery850mAh
PRT00341

Theseareveryslim,extremelylightweightbatteriesbasedonthenewPolymerLithiumIonchemistry.T

SuggestedReading
Beforecontinuingonwiththistutorial,youmaywanttofamiliarizeyourselfwithsomeofthesetopicsif
theyreunfamiliartoyou:
HowtoPoweraProject
LogicLevels
SerialCommunication
HowtoSolder

HardwareOverview
TheESP8266Thingisarelativelysimpleboard.Thepinsarebrokenouttotwoparallel,breadboard
compatiblerows.USBandLiPoconnectorsatthetopoftheboardprovidepowercontrolledbythe
nearbyON/OFFswitch.AndLEDstowardstheinsideoftheboardindicatepower,charge,andstatusof
theIC.
HeresaquickoverviewoftheThingsmaincomponents:

ThePinout
TheThingsI/Oheaderscanbebrokendownintothreesections:

SerialProgrammingHeader
ThissixpinheaderwillbethemainpointofcontactbetweentheThingandyourdevelopmentcomputer.
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

3/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

ThepinoutofthisheadermatchestheextremelycommonFTDIheader.Thatmeansyoucaninterface
itwitheithera3.3VFTDIBasicora3.3VI/OFTDICabletoprogramanddebugtheThing.
Foraquickbreakdownofthepinsonthisheader,consultthetablebelow.Ifapinisdirectlytiedtoan
ESP8266I/O,itllbenoted:
Pin
Label

ESP8266
I/O#

DTR

Notes

Performsautoreset,andputstheESP8266intobootloadermode.Connects
throughacapacitortoRESET,andabuffertotheESP8266'sGPIO0.

TXO

ESP8266UART1dataoutput.

RXI

ESP8266UART1datainput.

3V3

Bydefault,thispindoesnotsupplytheESP8266directly(ajumperontheback
canchangethat).

NC

NotconnectedtoanythingontheThing.

GND

Ground(0V).

I2CHeader
I2Cisaverypopularcommunicationprotocolintheembeddedworld.Whetheryouwanttohookthe
Thinguptoamotionsensor,lightsensor,digitaltoanalogconverter,orOLEDdisplay,I2Cisoftenthe
protocolofchoice.
ThisheaderincludesfourpinsallthatshouldberequiredtoconnectanI2CdeviceuptotheThing.
PinLabel

ESP8266I/O#

Notes

GND

Ground(0V).

3V3

3.3V

SDA

CaneitherbeusedasESP8266GPIO2orI2Cserialdata(SDA).

SCL

14

CaneitherbeusedasESP8266GPIO14orI2Cserialclock(SCL).
AlsousedastheSPIclock(SCLK).

ThispinoutmatchesthatofmostofourI2Cbasedbreakoutboards,soyoucanpiggybackthemrighton
topoftheThing.
IfyouneedtheextraI/O,insteadofI2C,theSDAandSCLpinscanbeusedasGPIO2and14
respectively.TheSCLpinalsoservesastheclock(SCLK)fortheESP8266sSPIinterface.

GeneralI/OHeader
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

4/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

Therestofthepower,control,andI/Opinsarebrokenoutontheothersideoftheboard.Theyare:
PinLabel

ESP8266I/O#

Notes

GND

Ground(0V).

VIN

USBconnected:~4.5Voutput
LiPoconnected(noUSB):~3.7Voutput
Nosupply:Canbeusedasavoltagesupplyinputtothe3.3Vregulator.

13

13

HardwareSPIMOSI

12

12

HardwareSPIMISO

XPD

16

CanbeconnectedtoresettosettheESP8266intodeepsleepmode.

ADC

A0

A10bitADCwithamaximumvoltageof1V.

EN

ThispinisalsotiedtotheonboardLED.

ESP8266enablepin.HIGH=on,LOW=off.PulledHIGHonboard.

WhathappenedtotherestoftheGPIOpins?Whytheeclecticpinnumberingscheme?Weretaking
whattheESP8266givesus.Unfortunately,mostoftheremainingGPIOareconnectedtotheonboard
SPIflashmemoryIC,whichstorestheESP8266sprogrammemoryandpotentiallyotherdata.

BackoftheThing
FlippingtheThingoverrevelsafewtracejumpersandtestpoints,whichyoumayfindhandyforyour
application.(PlusafriendlyPhant.iologo,toremindyouaboutourdatastorageserviceon
data.sparkfun.com.)

Jumpers
Jumper
Label

Default
Setting

Notes

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

5/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

DTR

Closed

AllowsforautoresetwhileprogrammingtheESP8266,butmakesserial
debuggingdifficult.

I2CPU

Closed

Connects10kpullupresistorstotheSDAandSCLpins.

FTDIVCC

Open

Connectsthe3V3pinontheserialheaderdirectlytotheESP8266's3.3V
supply.

Ofthesejumpers,theDTRoneisthemostcommonlymodified.TheDTRoutputoftheFTDIBasicis
usedfortwopurposes:toresettheESP8266andpullGPIO0low(puttingthechipinbootloadermode).
Keepingthisjumperclosedenablesprogramming,butmakesdebuggingviatheSerialMonitordifficult,
astheboardwillresetintobootloadermodewhenevertheterminalopens.Usingandmodifyingthis
jumperisdiscussedlaterinthistutorial.
TheFTDI_VCCjumperdefaultstoopentoensurethat,ifa3.3VLogic(5Vpower)FTDICableisusedto
programtheThing,5VisntaccidentallydeliveredtotheIC.Also,most3.3VFTDIboardsdonthavealot
ofjuicetosupplyonthe3.3Vbus(theyoftensupplyabout50mAmax).

TestPoints
Thesepinsaremadeavailablejustincasetheybecomenecessarytoyourproject.Thesixpinsbundled
uptogetherareconnectedtotheThingsonboardSPIflashmemory,butifyoureallyneedtheextra
GPIO,orwanttoexperimentwiththepins,theyreavailable.
TheRSTpinismoreuseful,butwedidntleaveroomtobreakitoutatleastnotdirectly.RSTistied
througha0.1FcapacitortotheDTRpin,toallowforautomaticresetduringprogramming.Formany
applicationsthatneedtheRSTpin,togglingtheDTRpinworksaswell.PuttingtheESP8266intodeep
sleepisonesuchapplication.

SelectingtheAntenna
TheThingsdefaultWiFiantennaisaPCBtraceantennabasedonthisTIappnote.Itscosteffective
andactuallyworksreallywell!
Ifyouneedtoconnectamoresensitiveantennatothechip,aU.FLconnectorisalsoavailableonthe
board,butisntconnectedbydefaulttotheESP8266santennapin.Toconnectthisantennatothechip,
youllneedtoheatupthe0resistorandrotateit90:

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

6/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

An(ugly,uncleaned)resistorswappedfromprintedantennatoU.FLantenna.
Asolderingiron,pairoftweezers,(2)steadyhands,andgoodsetofeyesshouldbeenoughto
accomplishthetask.

WhyAreThereUnpopulatedParts?
WeinitiallysetouttomaketheThingasecure,commonsensorbasestation.Theemptypadsyousee
arelandingspotsforthreeuniqueICs:
ATECC108AAfullturnkeyEllipticCurveDigitalSignatureAlgorithm(ECDSA)engine,which
canbeusedforuniqueserialnumbers,hashing,keystorage,orrandomnumbers.Agreatstartto
securingyourIoTproject!
TMP102TemperatureSensorAsimple,12bit,digitaltemperaturesensor.
TSL2561LightSensorAniftyluminosity/lightsensor.
Plusafewfootprintsfordecouplingcapacitors.
Afteralatechangeofheart,wedecidedtokeeptheboardaslowcostaspossible(thatstheESP8266s
bestfeature!),whileleavingtheoptionforlaterexpansion.Thepadsarestillthere.Ifyouwanttoadd
anyofthesecomponents,hopefullyallyoushouldneedisahotairstation(maybeprobablynota
Heaterizer)andsometweezers.

PoweringtheThing
TheThingprovidesfortwomethodsofpowerdelivery:USBorLiPo.TheUSBconnectorontheThingis
oftheMicroBvariety.AmicroBcablepluggedintoeitheracomputerUSBportora5VUSBWallWart
canpowertheThing.
AnyofoursinglecellLiPobatterieswillalsoworktopowertheThingtheyallhavethesame2pinJST
connector.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

7/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

Addan850mAhLiPoandanLSM9DS09DoFIMUtotheThing,tocreateanIoTmotionsensor.
IfbothUSBandLiPoareconnectedtotheThing,itlltakepowerfromtheUSBportandchargetheLiPo
batteryatupto500mA.

ElectricalCharacteristics
TheESP8266smaximumvoltageis3.6V,sotheThinghasanonboard3.3Vregulatortodeliverasafe,
consistentvoltagetotheIC.ThatmeanstheESP8266sI/Opinsalsorunat3.3V,youllneedtolevel
shiftany5VsignalsrunningintotheIC.
TheinputtothisregulatorcaneitherbedeliveredbyUSB,LiPobattery,orthroughtheVINpin.
MaxInputVoltage:IfyousupplypowertotheboardthroughtheVIN,makesurethevoltagedoes
notexceed6V.That'sthemaximuminputvoltageoftheAP2112K3.3Vregulatortheboarduses.

Alternatively,ifyouhaveanexternal,regulated,supplyyoudliketodeliverdirectlytotheESP8266,you
cansupplythatvoltagethroughthe3V3pin(ontheI2Cheader).Whilethisvoltagedoesnthavetobe
3.3V,itmustbewithintherangeof1.73.6V.

CurrentRatings
Onaverage,theThingpullsabout80mA.WiFitransmitsandreceivescanmomentarilyincreasethat
draw.Heresatable,transcribedfromtheESP8266datasheet,withsomeofthemorecommoncurrent
characteristics.
Parameter

Typical

Transmit802.11b(1Mbps)

215

mA

Transmit802.11b(11Mbps)

197

mA

Transmit802.11g(54Mbps)

145

mA

Transmit802.11n

135

mA

Receive802.11b

60

mA

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

Max

Unit

8/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

Receive802.11g

60

mA

Receive802.11n

62

mA

Standby

0.9

mA

DeepSleep

10

MaximumI/OPinDriveCapability

12

mA

Ifyourapplicationrequiresmaximumbatterylife,youlllikelyneedtomakeliberaluseoftheESP8266s
deepsleepfunctionality.Thatllbecoveredlaterinthistutorial.

ProgrammingtheThing
TheESP8266hasabuiltinserialbootloader,whichallowsforeasyprogrammingandreprogramming.
Youdontneedaspecialized,expensiveprogrammerjustasimple,USBtoSerialconverter.
Weusea3.3VFTDIBasictoprogramtheThing,butotherserialconverterswith3.3VI/Olevelsshould
work(e.g.FTDISmartBasic,FTDICable5VVCC3.3VI/O,FT231XBreakout.Theconverterdoesneed
aDTRlineinadditiontotheRXandTXpins.
TheFTDIBasics6pinheadermatchesupexactlytotheThings6pinserialportheader.Tosetupfor
programming,simplyconnecttheFTDIdirectlytothisporttakecaretomatchuptheDTRandGND
pins!

IfyoureshortonUSBports,theSparkFunCerberusCablemightbejustwhatyouneed.
IfyousolderfemaleheaderstotheThing,plugginga6pinrowofrightanglemaleheadersbetweenthe
FTDIandheaderhelpscreateatemporaryprogramminginterface.

HardwareAssembly
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

9/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

Oh.Weregettingaheadofourselves.ToconnecttheFTDIprogrammertoyourThingyoullneedto
soldersomethingtotheThing.
Ifyouveneversolderedbefore,thisisagreattimetostart!Thesesolderpointsareeasy,throughhole
pins,checkoutourHowtoSolderThroughholeSolderingforhelpgettingstarted.
What,exactly,yousoldertotheboarddependsbothonhowyoulluseitinyourproject,andhowyoull
interfaceitwiththeprogrammer.Whenitcomestoselectingaheader(orwire)tosolder,therearea
varietyofoptions.WevetriedalotofthemwiththeThing:
10pinStackableHeadersmakeitconvenienttobothbreadboardtheThingandjumperwireoutofit.

Oryoucanmixandmatchheaderstobestfityourneeds.Rightanglemaleheadersmayhelpto
interfacebetweentheFTDIandtheThing.Straightmaleheadersareagoodchoiceforlowprofile
connections.StraightfemaleheadersmayhelpwithconnectingtoI2Csensors.And,ofcourse,wirecan
besolderedtoanyofthepinsthathavealongwaytoconnecttosomething.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

10/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

Onceyouvesolderedupatleasttheprogrammingport,yourereadytoloadsomecodeontotheThing.
LetsblinksomeLEDsandIoT(InternetourThing).

InstallingtheESP8266ArduinoAddon
ThereareavarietyofdevelopmentenvironmentsthatcanbeequippedtoprogramtheESP8266.You
cangowithasimpleNotepad/gccsetup,orfinetuneanEclipseenvironment,useavirtualmachine
providedbyEspressif,orcomeupwithsomethingofyourown.
Fortunately,theamazingESP8266communityrecentlytooktheIDEselectionastepfurtherbycreating
anArduinoaddon.IfyourejustgettingstartedprogrammingtheESP8266,thisistheenvironmentwe
recommendbeginningwith,andtheonewelldocumentinthistutorial.
ThisESP8266addonforArduinoisbasedontheamazingworkbyIvanGrokhotkovandtherestofthe
ESP8266community.CheckouttheESP8266ArduinoGitHubrepositoryformoreinformation.

InstallingtheAddonWiththeArduinoBoardsManager
WiththereleaseofArduino1.6.4,addingthirdpartyboardstotheArduinoIDEiseasilyachievedthrough
thenewboardmanager.IfyourerunninganolderversionofArduino(1.6.3orearlier),werecommend
upgradingnow.Asalways,youcandownloadthelatestversionofArduinofromarduino.cc.
Tobegin,wellneedtoupdatetheboardmanagerwithacustomURL.OpenupArduino,thengotothe
Preferences(File>Preferences).Then,towardsthebottomofthewindow,copythisURLintothe
AdditionalBoardManagerURLstextbox:
https://raw.githubusercontent.com/sparkfun/Arduino_Boards/esp8266/IDE_Board_Manager/packa
ge_sparkfun_index.json

IfyoualreadyhaveaURLinthere,andwanttokeepit,youcanseparatemultipleURLsbyplacinga
commabetweenthem.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

11/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

HitOK.ThennavigatetotheBoardManagerbygoingtoTools>Boards>BoardsManager.There
shouldbeacouplenewentriesinadditiontothestandardArduinoboards.LookforSparkFunESP8266
Boards.Clickonthatentry,thenselectInstall.

TheboarddefinitionsandtoolsfortheESP8266Thingincludeawholenewsetofgcc,g++,andother
reasonablylarge,compiledbinaries,soitmaytakeafewminutestodownloadandinstall(thearchived
fileis~110MB).Oncetheinstallationhascompleted,anArduinoblueINSTALLEDwillappearnextto
theentry.

SelectingtheESP8266ThingBoard
WiththeBoardaddoninstalled,allthatslefttodoisselectESP8266ThingfromtheTools>Boards
menu.

ThenselectyourFTDIsportnumberundertheTools>Portmenu.

UploadBlink
Toverifythateverythingworks,tryuploadingtheoldstandard:Blink.Insteadofblinkingpin13,likeyou
maybeusedtothough,togglepin5,whichisattachedtotheonboardLED.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

12/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

#defineESP8266_LED5
voidsetup()
{
pinMode(ESP8266_LED,OUTPUT);
}
voidloop()
{
digitalWrite(ESP8266_LED,HIGH);
delay(500);
digitalWrite(ESP8266_LED,LOW);
delay(500);
}

Iftheuploadfails,firstmakesuretheESP8266ThingisturnedontheredPWRLEDshouldbe
illuminated.
Therearestillsomebugstobefleshedoutoftheesptool,sometimesitmaytakeacoupletriesto
successfullyuploadasketch.Ifyoucontinuetofail,tryturningtheESP8266Thingonthenoff,orunplug
thenreplugtheFTDIin.Ifyoustillhavetrouble,getintouchwithouramazingtechsupportteam.

ExampleSketch:PostingtoPhant
OurmaingoalforcreatingtheESP8266Thingwasfindingagoodplatformtointeractwithourfree
onlinedatastorageservice:data.sparkfun.com.
Heresasimpleexamplesketchthatpostsfourvaluestoateststream.Feelfreetousethatstream
temporarilytomakesureyourThingisworking(dontabuseitplease!).
Copythecodebelow,ordownloadtheexamplesketch.
BeforeuploadingyourcodetotheThing,makesureyoumodifythe WiFiSSD and WiFiPSK variables,
settingthemtotheSSIDandpasswordofyourWiFinetwork.Therestofthesketchshouldjustwork.
//IncludetheESP8266WiFilibrary.(Worksalotlikethe
//ArduinoWiFilibrary.)
#include<ESP8266WiFi.h>
//IncludetheSparkFunPhantlibrary.
#include<Phant.h>
//////////////////////
//WiFiDefinitions//
//////////////////////
constcharWiFiSSID[]="WiFi_Network";
constcharWiFiPSK[]="WiFi_Password";
/////////////////////
//PinDefinitions//
/////////////////////
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

13/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

constintLED_PIN=5;//Thing'sonboard,greenLED
constintANALOG_PIN=A0;//TheonlyanalogpinontheThing
constintDIGITAL_PIN=12;//Digitalpintoberead
////////////////
//PhantKeys//
////////////////
constcharPhantHost[]="data.sparkfun.com";
constcharPublicKey[]="wpvZ9pE1qbFJAjaGd3bn";
constcharPrivateKey[]="wzeB1z0xWNt1YJX27xdg";
/////////////////
//PostTiming//
/////////////////
constunsignedlongpostRate=30000;
unsignedlonglastPost=0;
voidsetup()
{
initHardware();
connectWiFi();
digitalWrite(LED_PIN,HIGH);
}
voidloop()
{
if(lastPost+postRate<=millis())
{
if(postToPhant())
lastPost=millis();
else
delay(100);
}
}
voidconnectWiFi()
{
byteledStatus=LOW;
//SetWiFimodetostation(asopposedtoAPorAP_STA)
WiFi.mode(WIFI_STA);
//WiFI.begin([ssid],[passkey])initiatesaWiFIconnection
//tothestated[ssid],usingthe[passkey]asaWPA,WPA2,
//orWEPpassphrase.
WiFi.begin(WiFiSSID,WiFiPSK);
//UsetheWiFi.status()functiontocheckiftheESP8266
//isconnectedtoaWiFinetwork.
while(WiFi.status()!=WL_CONNECTED)
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

14/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

{
//BlinktheLED
digitalWrite(LED_PIN,ledStatus);//WriteLEDhigh/low
ledStatus=(ledStatus==HIGH)?LOW:HIGH;
//DelaysallowtheESP8266toperformcriticaltasks
//definedoutsideofthesketch.Thesetasksinclude
//settingup,andmaintaining,aWiFiconnection.
delay(100);
//Potentiallyinfiniteloopsaregenerallydangerous.
//Adddelaysallowingtheprocessortoperformother
//taskswhereverpossible.
}
}
voidinitHardware()
{
Serial.begin(9600);
pinMode(DIGITAL_PIN,INPUT_PULLUP);
pinMode(LED_PIN,OUTPUT);
digitalWrite(LED_PIN,LOW);
//Don'tneedtosetANALOG_PINasinput,
//that'sallitcanbe.
}
intpostToPhant()
{
//LEDturnsonwhenweenter,it'llgooffwhenwe
//successfullypost.
digitalWrite(LED_PIN,HIGH);
//DeclareanobjectfromthePhantlibraryphant
Phantphant(PhantHost,PublicKey,PrivateKey);
//Doalittleworktogetauniqueishname.Appendthe
//lasttwobytesoftheMAC(HEX'd)to"Thing":
uint8_tmac[WL_MAC_ADDR_LENGTH];
WiFi.macAddress(mac);
StringmacID=String(mac[WL_MAC_ADDR_LENGTH2],HEX)+
String(mac[WL_MAC_ADDR_LENGTH1],HEX);
macID.toUpperCase();
StringpostedID="Thing"+macID;
//Addthefourfield/valuepairsdefinedbyourstream:
phant.add("id",postedID);
phant.add("analog",analogRead(ANALOG_PIN));
phant.add("digital",digitalRead(DIGITAL_PIN));
phant.add("time",millis());
//Nowconnecttodata.sparkfun.com,andpostourdata:
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

15/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

WiFiClientclient;
constinthttpPort=80;
if(!client.connect(PhantHost,httpPort))
{
//Ifwefailtoconnect,return0.
return0;
}
//Ifwesuccessfullyconnected,printourPhantpost:
client.print(phant.post());
//ReadallthelinesofthereplyfromserverandprintthemtoSerial
while(client.available()){
Stringline=client.readStringUntil('\r');
//Serial.print(line);//Tryingtoavoidusingserial
}
//Beforeweexit,turntheLEDoff.
digitalWrite(LED_PIN,LOW);
return1;//Returnsuccess
}

AfterloadingthecodeontoyourThing,itwillbegintorun.ThestatusLEDconnectedtopin5willinitially
blinkatabout2Hz.AftertheThingconnectstoyournetwork,thegreenLEDwillturnsolidandpostto
theteststream.AtthatpointtheLEDwillgodark,onlyblinkingevery30sorsoastheThingpoststo
Phantagain.
IftheLEDneverstopsblinking,yourThingisprobablyhavingtroubleconnectingtotheWiFinetwork.
MakesuretheSSIDandPSKvariablesaresetcorrectly.
FourvaluesarepostedtothePhantstream:thereadingfromtheADCpin,adigitalreadingfrompin12,
theThingsID(ThingappenddwiththelasttwoMACbytes),andatimevariableloadedfromthe
millis() function.LoaduptheteststreamtocheckforyourThingssignaturethere!

Examplescreenshotfromourcommunaldata.sparkfun.comstream.
Readthroughthecommentsinthecodetogetalinebylinebreakdownofwhatsgoingoninthesketch.

ExampleSketch:APWebServer
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

16/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

NotonlycantheESP8266connecttoaWiFinetworkandinteractwiththeInternet,butitcanalsosetup
anetworkofitsown,allowingotherdevicestoconnectdirectlytoit.Thisexampledemonstrateshowto
turntheESP8266intoanaccesspoint(AP),andserveupwebpagestoanyconnectedclient.
Copyandpastethecodefrombelow,ordownloadithere.
#include<ESP8266WiFi.h>
//////////////////////
//WiFiDefinitions//
//////////////////////
constcharWiFiAPPSK[]="sparkfun";
/////////////////////
//PinDefinitions//
/////////////////////
constintLED_PIN=5;//Thing'sonboard,greenLED
constintANALOG_PIN=A0;//TheonlyanalogpinontheThing
constintDIGITAL_PIN=12;//Digitalpintoberead
WiFiServerserver(80);
voidsetup()
{
initHardware();
setupWiFi();
server.begin();
}
voidloop()
{
//Checkifaclienthasconnected
WiFiClientclient=server.available();
if(!client){
return;
}
//Readthefirstlineoftherequest
Stringreq=client.readStringUntil('\r');
Serial.println(req);
client.flush();
//Matchtherequest
intval=1;//We'lluse'val'tokeeptrackofboththe
//requesttype(read/set)andvalueifset.
if(req.indexOf("/led/0")!=1)
val=0;//WillwriteLEDlow
elseif(req.indexOf("/led/1")!=1)
val=1;//WillwriteLEDhigh
elseif(req.indexOf("/read")!=1)
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

17/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

val=2;//Willprintpinreads
//Otherwiserequestwillbeinvalid.We'llsayasmuchinHTML
//SetGPIO5accordingtotherequest
if(val>=0)
digitalWrite(LED_PIN,val);
client.flush();
//Preparetheresponse.Startwiththecommonheader:
Strings="HTTP/1.1200OK\r\n";
s+="ContentType:text/html\r\n\r\n";
s+="<!DOCTYPEHTML>\r\n<html>\r\n";
//Ifwe'resettingtheLED,printoutamessagesayingwedid
if(val>=0)
{
s+="LEDisnow";
s+=(val)?"on":"off";
}
elseif(val==2)
{//Ifwe'rereadingpins,printoutthosevalues:
s+="AnalogPin=";
s+=String(analogRead(ANALOG_PIN));
s+="<br>";//Gotothenextline.
s+="DigitalPin12=";
s+=String(digitalRead(DIGITAL_PIN));
}
else
{
s+="InvalidRequest.<br>Try/led/1,/led/0,or/read.";
}
s+="</html>\n";
//Sendtheresponsetotheclient
client.print(s);
delay(1);
Serial.println("Clientdisonnected");
//Theclientwillactuallybedisconnected
//whenthefunctionreturnsand'client'objectisdetroyed
}
voidsetupWiFi()
{
WiFi.mode(WIFI_AP);
//Doalittleworktogetauniqueishname.Appendthe
//lasttwobytesoftheMAC(HEX'd)to"Thing":
uint8_tmac[WL_MAC_ADDR_LENGTH];
WiFi.softAPmacAddress(mac);
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

18/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

StringmacID=String(mac[WL_MAC_ADDR_LENGTH2],HEX)+
String(mac[WL_MAC_ADDR_LENGTH1],HEX);
macID.toUpperCase();
StringAP_NameString="ESP8266Thing"+macID;
charAP_NameChar[AP_NameString.length()+1];
memset(AP_NameChar,AP_NameString.length()+1,0);
for(inti=0;i<AP_NameString.length();i++)
AP_NameChar[i]=AP_NameString.charAt(i);
WiFi.softAP(AP_NameChar,WiFiAPPSK);
}
voidinitHardware()
{
Serial.begin(115200);
pinMode(DIGITAL_PIN,INPUT_PULLUP);
pinMode(LED_PIN,OUTPUT);
digitalWrite(LED_PIN,LOW);
//Don'tneedtosetANALOG_PINasinput,
//that'sallitcanbe.
}

Afteruploadingthissketch,findanotherdevicethatyoucanconnecttoaWiFinetworkphone,laptop,
etc.LookforanetworkcalledThingXXXX,whereXXXXisthelast2bytesoftheThingsMACaddress.

Thesketchsetsthenetworkspasswordtosparkfun.
AfterconnectingtoyourThingsAPnetwork,loadupabrowserandpointitto 192.168.4.1/read .The
ThingshouldserveupawebpageshowingyouitsADCanddigitalpin12readings:

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

19/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

Afterthat,give 192.168.4.1/led/0 and 192.168.4.1/led/1 atry,andkeepaneyeontheThingsgreen


LEDwhileyoudo.
Asalways,checkthroughthecodecommentstogetalinebylinebreakdownofwhatsgoingon.

ExampleSketch:GoodnightThing(SleepMode)
OneoftheThingsmostuniquefeaturesistheintegratedsupportforLiPobatteries.Unfortunately,the
ESP8266isstillaprettypowerhungrydevice.Ifyouwantyourprojecttorunoffabatteryformorethan
afewhours,youhavetwooptions:getahugebatteryorcleverlyputtheThingtosleep.
TousetheThingssleepcapability,youllneedtowiretheXPDpinuptotheESP8266sresetline.RST
isntbrokenout,buttheDTRpinwillworkforourapplicationaswell.

WireupfromtheXPDpintoDTRtosetupsleepability.
Watchout!TheESP8266can'tbeprogrammedwhiletheXPDpinisconnectedtoDTR.Makesure
youdisconnectthetwopinsbeforetryingtouploadasketch.

AfteryoutelltheESP8266tosleep,itllwaitaspecifiednumberofmicroseconds,thentriggertheXPD
pintotoggletheresetline.WhentheESP8266wakesup,itllbeginbackatthestartofthesketch.
LetsriffoffthefirstexampleinthistutorialpostingtoPhantbuttakeadvantageofsleepingtogreatly
increasethebatterylife.Heressomeexamplecode(orclickheretodownload):
Onceagain,makesureyoumodifythe WiFiSSID and WiFiPSK variablesnearthetopofthesketch.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

20/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

//IncludetheESP8266WiFilibrary.(Worksalotlikethe
//ArduinoWiFilibrary.)
#include<ESP8266WiFi.h>
//IncludetheSparkFunPhantlibrary.
#include<Phant.h>
//////////////////////
//WiFiDefinitions//
//////////////////////
constcharWiFiSSID[]="WiFi_Network";
constcharWiFiPSK[]="WiFi_Password";
/////////////////////
//PinDefinitions//
/////////////////////
constintLED_PIN=5;//Thing'sonboard,greenLED
constintANALOG_PIN=A0;//TheonlyanalogpinontheThing
constintDIGITAL_PIN=12;//Digitalpintoberead
////////////////
//PhantKeys//
////////////////
constcharPhantHost[]="data.sparkfun.com";
constcharPublicKey[]="wpvZ9pE1qbFJAjaGd3bn";
constcharPrivateKey[]="wzeB1z0xWNt1YJX27xdg";
//Timetosleep(inseconds):
constintsleepTimeS=30;
voidsetup()
{
initHardware();
connectWiFi();
digitalWrite(LED_PIN,HIGH);
while(postToPhant()!=1)
{
delay(100);
}
digitalWrite(LED_PIN,LOW);
//deepSleeptimeisdefinedinmicroseconds.Multiply
//secondsby1e6
ESP.deepSleep(sleepTimeS*1000000);
}
voidloop()
{
}
voidconnectWiFi()
{
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

21/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

byteledStatus=LOW;
//SetWiFimodetostation(asopposedtoAPorAP_STA)
WiFi.mode(WIFI_STA);
//WiFI.begin([ssid],[passkey])initiatesaWiFIconnection
//tothestated[ssid],usingthe[passkey]asaWPA,WPA2,
//orWEPpassphrase.
WiFi.begin(WiFiSSID,WiFiPSK);
//UsetheWiFi.status()functiontocheckiftheESP8266
//isconnectedtoaWiFinetwork.
while(WiFi.status()!=WL_CONNECTED)
{
//BlinktheLED
digitalWrite(LED_PIN,ledStatus);//WriteLEDhigh/low
ledStatus=(ledStatus==HIGH)?LOW:HIGH;
//DelaysallowtheESP8266toperformcriticaltasks
//definedoutsideofthesketch.Thesetasksinclude
//settingup,andmaintaining,aWiFiconnection.
delay(100);
//Potentiallyinfiniteloopsaregenerallydangerous.
//Adddelaysallowingtheprocessortoperformother
//taskswhereverpossible.
}
}
voidinitHardware()
{
Serial.begin(9600);
pinMode(DIGITAL_PIN,INPUT_PULLUP);
pinMode(LED_PIN,OUTPUT);
digitalWrite(LED_PIN,LOW);
//Don'tneedtosetANALOG_PINasinput,
//that'sallitcanbe.
}
intpostToPhant()
{
//LEDturnsonwhenweenter,it'llgooffwhenwe
//successfullypost.
digitalWrite(LED_PIN,HIGH);
//DeclareanobjectfromthePhantlibraryphant
Phantphant(PhantHost,PublicKey,PrivateKey);
//Doalittleworktogetauniqueishname.Appendthe
//lasttwobytesoftheMAC(HEX'd)to"Thing":
uint8_tmac[WL_MAC_ADDR_LENGTH];
WiFi.macAddress(mac);
https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

22/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

StringmacID=String(mac[WL_MAC_ADDR_LENGTH2],HEX)+
String(mac[WL_MAC_ADDR_LENGTH1],HEX);
macID.toUpperCase();
StringpostedID="Thing"+macID;
//Addthefourfield/valuepairsdefinedbyourstream:
phant.add("id",postedID);
phant.add("analog",analogRead(ANALOG_PIN));
phant.add("digital",digitalRead(DIGITAL_PIN));
phant.add("time",millis());
//Nowconnecttodata.sparkfun.com,andpostourdata:
WiFiClientclient;
constinthttpPort=80;
if(!client.connect(PhantHost,httpPort))
{
//Ifwefailtoconnect,return0.
return0;
}
//Ifwesuccessfullyconnected,printourPhantpost:
client.print(phant.post());
//ReadallthelinesofthereplyfromserverandprintthemtoSerial
while(client.available()){
Stringline=client.readStringUntil('\r');
//Serial.print(line);//Tryingtoavoidusingserial
}
//Beforeweexit,turntheLEDoff.
digitalWrite(LED_PIN,LOW);
return1;//Returnsuccess
}

Thissketchaccomplishesthesamefeatasthatinourfirstexampleitpostssomedatatoa
data.sparkfun.comstreamevery30seconds.Buttheresonehugedifference:sleep.
Noticetheresnothinginthe loop() .Theprogramhaltswhenthe ESP.deepSleep(30000000) iscalled.
After30seconds,whentheESP8266wakesup,itllstartrunningcodebackatthebeginningof
setup() .
Ifyouputamultimeterinlinetomeasurethecurrentdraw,theThingwouldpullabout80mAforthe~5
secondsittakestoconnectandposttoPhant.Then,whileitsleepsforabout30seconds,thecurrent
drawwouldbearound8mA.Anaverageofabout18mApersecond.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

23/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

Indeepsleepmode,theThingpullsabout8mA(thatsmostlythepowerLED).
MostofthecurrentdrawinsleepmodeisfromthepowerLEDindicatorifyouwanttosaveevenmore
juice,youmayconsiderremovingtheLED(orcurrentlimitingresistor)orevencuttingatrace.(Hint:cut
thetracerunningthroughmiddleoftheRinPWR.)

UsingtheArduinoAddon
IfyouveusedArduinointhepast,therewillbesomenewprogrammingschemestogetusedtoin
ESP8266land.

PinMappings
AswithanyotherArduino,thepinmappingsprintedontheboardmatchthepinyoureadorwriteto.The
SDAandSCLpinscanbereferencedas2and14respectively.
Theresonlyoneanaloginputpin,labeledADC.ToreadtheADCpin,makeafunctioncallto
analogRead(A0) .Rememberthatthispinhasaweirdmaximumvoltageof1Vyoullgeta10bitvalue
(01023)proportionaltoavoltagebetween0and1V.

Yielding
ThisisoneofthemostcriticaldifferencesbetweentheESP8266andamoreclassicalArduino
microcontroller.TheESP8266runsalotofutilityfunctionsinthebackgroundkeepingWiFiconnected,
managingtheTCP/IPstack,andperformingotherduties.Blockingthesefunctionsfromrunningcan
causetheESP8266tocrashandresetitself.Toavoidthesemysteriousresets,avoidlong,blocking
loopsinyoursketch.
Ifyouhavealongloopinyoursketch,youcanadda delay([milliseconds]) callwithin,toallowthe
criticalbackgroundfunctionstoexecute.TheESP8266s delay() funciton,whileofcoursedelayingfor
asetnumberofmilliseconds,alsomakesaquickcalltothebackgroundfunctions.
TheamazingcreatorsoftheESP8266Arduinolibrariesalsoimplementeda yield() function,which
callsonthebackgroundfunctionstoallowthemtodotheirthing.Asanexample,ifyoursketchiswaiting
forsomeonetopressabuttonattachedtopin12,creatingalooplikethiswillkeeptheESP8266from
crashing:

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

24/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

pinMode(12,INPUT_PULLUP);//Setpin12asaninputw/pullup
while(digitalRead(12)==HIGH)//Whilepin12isHIGH(notactivated)
yield();//Do(almost)nothingyieldtoallowESP8266backgroundfunctions
Serial.println("Buttonispressed!");//Printbuttonpressedmessage.

ESP8266WiFiClass
ThisistheESP8266,sotheWiFiclasswillprobablybeincludedinjustabouteverysketchthereis.If
youveusedtheArduinoWiFilibrarybefore,theESP8266WiFilibrarywillbeverysimilar,theresjusta
fewkeydifferences:
ToincludetheESP8266WiFilibrarycall #include<ESP8266WiFi.h> not <WiFi.h> .
Toconnecttoanetwork,likethenormalWiFilibrary,call
WiFi.begin(NetworkSSID,NetworkPassword) .YoucanalsosettheESP8266upasaWiFiaccess
pointbycalling WiFi.softAP(AP_SSID,AP_Password) .
TosettheESP8266smode,whichcanbeaccesspoint(AP),station(STA),orcombo(the
ESP8266candobothatthesametime!),call WiFi.setMode([mode]) witheither WIFI_AP ,
WIFI_STA ,or WIFI_STA_AP astheparameter.
Theexamplesearlierinthistutorialshouldhavedemonstratedallofthesedifferences.

LibrariesAvailable/NotAvailableandtheDifferences
AlotofthecoreArduinolibrarieshavebeenrewrittentoworkfortheESP8266,including:
WireTheESP8266shouldworkwithanyI2CsensoryoucanthrowatitjustusethesameWire
APIcallsyoureusedto.Thereareafewdifferences:
Pindefinition:TheESP2866doesntactuallyhaveanyhardwareI2Cpinsthoselabeledon
theThingarethedefault,butyoucanactuallyuseanytwopinsasSDAandSCL.Calling
Wire.begin() willassumepins2and14areSDAandSCL,butyoucanmanuallysetthem
toanyotherpinbycalling Wire.begin([SDA],[SCL]) .
SPITheESP8266ThingcancontrolanSPIbususingfunctioncallsmadestandardbythe
ArduinoSPIlibrary.
Anadditionalfunctiontosetthefrequency SPI.setFrequency([frequency]) isadded.
Youmayneedtocallthatinyoursetuptoslowtheclockdownfromitsdefaultvalue.For
example, SPI.setFrequency(1000000) willsettheSPIclockto1MHz.
TheMISO,MOSI,andSCLKSPIpinsarehardcodedandcantbemoved,theyare:
PinNumber

SPIFunction

12

MISO

13

MOSI

14(SCL)

SCLK

15

CS

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

25/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

UsingtheSerialMonitor
GPIO0whileperfectlycapableasadigitalI/Oservesasecondarypurposeasabootload/runmode
controller.WhentheESP8266bootsup,itlooksatGPIO0svaluetoeitherenterthebootloaderorstart
runningthecurrentprogram:
GPIO0Value

ESP8266Mode

HIGH(3.3V)

RunProgram

LOW(0V)

Bootloader

TomakeiteasytoprogramtheESP8266,wevetiedGPIO0toDTR(alongwithRST).Whenyour
programmerbeginstouploadasketch,itllpullDTRlow,inturnsettingGPIO0lowandmakingthe
ESP8266enterbootloadermode.
Unfortunately,whenyouopenaserialterminal,DTRusuallygoeslowagain.Soeverytimeyouopenthe
Arduinoserialmonitor,itllcausetheESP8266toenterbootloadermode,insteadofrunprogrammode.
Ifyouopenuptheserialmonitor,andallyouseeisalineofgibberish,youveprobablybootedthe
ESP8266intobootloadermode.
Thereareafewwaysaroundthis.WeveaddedtheDTRjumperonthebottomoftheboard.Youcan
cutthetraceonthebackandinstalla2pinmaleheadercombinedwitha2pinjumper.Ifthejumperis
present,theboardwillbeabletobeprogrammed.Removingthejumperwillenableserialterminal
mode.

OryoucanfindaserialterminalprogramthatallowscontroloftheDTRpindirectly.RealTermallowsfor
thiscontrolnavigatetothePinstab,andclickClearnexttoDTR.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

26/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

Unfortunately,thisWindowsonlysolutionistheonlyterminalprogramwevefoundsofarwithsuch
control.YourbestbetmaybetotrytoavoidserialdebuggingwheneverpossiblethatswhatLEDsare
for,right?(Tongueonlykindofincheek.)

Resources&GoingFurther
AnastoundinglyawesomecommunityhasgrownaroundtheESP8266.Weowethembigtimeforthe
amazingArduinoaddontheyvecooperativelybuilt.ForallofyourESP8266needs,werecommend
checkingouttheesp8266.comCommunityForum.Inadditiontothat,hereareafewESP8266related
resourceswevefoundincrediblyhelpful:
ESP8266GitHubUserReposTonsofincredibletoolscanbefoundhere.FromCrosstool(to
compileyourownXtensaGCC,G++,etc.)totheESP8266ArduinoGitHubRepo
ESP8266CommunityWikiRelatedtothecommunityforum,theresagoodamountof
informationavailableinthiswiki.
NodeMCUFirmwareandtheNodeMCUFlasherNodeMCUisapopularfirmwareforthe
ESP8266.ItimplementsaLUAbasedinterpreterontheESP8266MCU.
EspressifBoardForumsEspressif,themanufacturersoftheESP8266,haveaforumoftheir
own.Youcansometimesfindupdatedsoftwaredevelopmentkitdownloads,orotherhelpfullinks
here.
EspressifGitHubReposEspressifisalsosomewhatactiveonGitHub.Theyhostacouple
versionsoftheSDKhere.
TheESP8266Thingisopensourcehardware!Ifyouneed,orjustwanttolookat,thePCBdesignfiles,
youcanfindtheminourESP8266ThingGitHubrepository.

GoingFurther
Needalittleprojectinspiration,nowthatyouvegotyourESP8266Thingupandrunning?Maybesome
oftheserelatedSparkFuntutorialswillhelpspursomeideas:

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

27/28

6/8/2015

ESP8266ThingHookupGuidelearn.sparkfun.com

WeatherStationWirelesslyConnectedto
Wunderground

AreYouOkay?Widget

Buildyourownopensource,official
Wundergroundweatherstationthatupdatesevery
10secondsoverWifiviaanElectricImp.

UseanElectricImpandaccelerometertocreate
an"AreYouOK"widget.Acozypieceof
technologyyourfriendorlovedonecannudgeto
letyouknowthey'reOKfromhalfaworldaway.

PushingDatatoData.SparkFun.com

UsingAT&T'sM2XWiththeCC3000

Agrabbagofexamplestoshowoffthevarietyof
routesyourdatacantakeonitswaytoa
Data.SparkFun.comstream.

Asetoftutorialsandexamplestoshowhowto
connectanArduinoandCC3000toAT&T'sM2X
datastreams.Weshowhowtopost,fetch,and
deletedata.ThefinallessoniscontrollinganLED
fromanM2Xstream.

Withitsdeepsleepability,theThingisagreatfoundationforaWiFibasedweatherstation,orafriendly,
huggable,interactiveplushy.

https://learn.sparkfun.com/tutorials/esp8266thinghookupguide/all#introduction

28/28

Вам также может понравиться