|
このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。 |
This PAGE is poor.... not 井戸/弁護士席 edited, bits 未開発の.
Also, it is a very の近くに cousin to my page about a $16+sensor 環境の 監視する server based on the SHT_15 湿度 and 気温 sensor.
And the ソフトウェア is only "fair". It WORKS, though, and it is 解放する/自由な. And it runs in a Sparkfun ESP8266 (about $16), and if you don't like the sensor I've used, you can 取って代わる that element of the 一括.
What I was trying to do: I 手配中の,お尋ね者 a SIMPLE (reliable!), INEXPENSIVE (井戸/弁護士席, 比較して) 装置 which could sit on a WiFi, be accessible across the internet, and 報告(する)/憶測 a few 環境の sensor readings. The 装置 I 想像するd (and 現在の here) doesn't do "clever things", like draw graphs, or tell you the hottest or coldest readings in the past 24 hours, etc.
It doesn't do those things because I 想像する a separate computer automatically, periodically, "収穫ing" readings from one or more of the simple 装置s 述べるd here. That computer can スピードを出す/記録につける and 現在の and 分析する the data. (I have in fact written programs for this... usually in Lazarus... but they are still more fit for my 注目する,もくろむs than public scrutiny. My tutorial on fetching a page of html is all you need to get started with your own 見解/翻訳/版 of what I 想像する, if you are in a hurry.)
Usually in my tutorials, I look at one 過程 per tutorial. And I usually do a more 徹底的な 職業 of "explaining".
In this tutorial I have mashed together, rather crudely, two デモ programs from Sparkfun, for the ESP8266 and a sensor, the Si7021. (You can 取って代わる the sensor bits with whatever you need for YOUR sensor やめる easily.)
You can download the sourcecode for my ESP8266 環境の 監視する Webserver with Si7021. Be advised: It WILL NOT RUN 正確に/まさに as downloaded. You need to tweak the code AT LEAST to tell it your WiFi's SSID and 重要な ("password"). And you may 井戸/弁護士席 want to change the IP 演説(する)/住所 the server comes up on. (It is configured to use a static IP 演説(する)/住所, because it must have one (one way or another) if you want to 接近 the 装置 from outside your LAN. If you get it working from INSIDE your LAN, the 残り/休憩(する) is "平易な", and won't depend on anything about the ESP8266 webserver that the 供給(する)d code, with the little tweaks について言及するd, creates.)
I should 分裂(する) bits of this out. It tells two stories, 味方する by 味方する...
a) Getting started with ESP8266. I will give the 詳細(に述べる)s for a 明確な/細部 one, the Sparkfun Thing Dev Board (WRL-13711.. a 製品 際立った from their very 類似して 指名するd "Sparkfun Thing"). I have other pages, much tidier, more 完全にする, about this. But THIS page, at 8/18, is my 最新の "run through" the steps for a beginner, and may have peculiar charms.
b) Using the SparkFun 湿度 and 気温 Sensor Breakout based on the Si7021 (SEN-13683)... don't worry... if you don't want to use this sensor, there is still LOTS that will be useful to you, as you adapt what is here to manage a different sensor.
の中で other things, I hope you will notice how a lot of "stuff" was "wrapped up" in the "ReadSensor" 手続き. (Good). Even if the code uses some 全世界の variable 不正に. (Bad... but we all do it, and this is one of those circumstances where the practice can be 許容するd, I feel.)
The 8266 is not "an Arduino", 厳密に speaking... but it is very like one... with 特別手当 features! And only about $16! If you want to ignore the 8266 parts of this you can. 事実上 everything relating 特に to the Si7021 should work just 罰金 with a more basic Arduino.
The Si7021 is 厳密に a 3v3 装置. If you want to use it with a 5v 装置, you can, I am やめる 確信して (though I 港/避難所't tried it) as long as you put a level shifter (Sparkfun BOB-12009 ($3)) between them. Happily, the Thing is a 3v3 装置 too, so no problems for me.
It uses I2C, but is "locked" to one 演説(する)/住所... 0x40... so you can only have one Si7021 in a given string of I2C 装置s. (This was a 決定/判定勝ち(する) by the 半導体素子 製造者, not Sparkfun.)
I've done 簡潔な/要約する 公式文書,認めるs on using the Si7021 with an Arduino (or ESP82666, etc). Below here,there are more 広範囲にわたる 公式文書,認めるs, after the "get your webserver running" 公式文書,認めるs.
My 実験(する)ing done on a 勝利,勝つ 10 PC which had done Arduino work in the past. It had the vers 1.8.5 Arduino IDE on it. It didn't seem that I'd done any 8266 work on the machine 以前... there was no 入ること/参加(者) for the 8266 in the "道具s/Board" menu.
Always 始める,決める the "Board" before connecting a 装置 to the IDE..
I went off to the Sparkfun intro to the 8266. 引用する: "任命する/導入するing the 追加する-on With the Arduino Boards 経営者/支配人: With the 解放(する) of Arduino 1.6.4, 追加するing third party boards to the Arduino IDE is easily 達成するd through the board 経営者/支配人."
This has been my experience.
1 Sep 2018, Sparkfun pointed me to the に引き続いて, which you use as follows.
http://arduino.esp8266.com/stable/package_esp8266com_index.json
In the Arduino IDE, open up とじ込み/提出する/ Preferences.
追加する the URL ("http://arduino.esp8266...") to the "付加 Board 経営者/支配人 URLs" section. click 承認する.
Again, shamelessly just copy/pasting from Sparkfun, now you "navigate to the Board 経営者/支配人 by going to 道具s > Boards > Boards 経営者/支配人. Look for esp8266. Click the "more info" under that 入ること/参加(者), then select 任命する/導入する."
(If you put "8266" in the filter at the 最高の,を越す of the Boards 経営者/支配人 dialog, you'll find the 権利 入ること/参加(者) faster! The 権利 thing to 任命する/導入する 1 Sep 2018 was "esp8266 by ESP8266 Community"). I was 申し込む/申し出d vers 2.4.2, clicked 任命する/導入する, and it was DONE almost before I finished this paragraph.
If you went off to 最高の,を越す up coffee while the 任命する/導入する proceeded, look closely. There's no big "DONE!" 旗,新聞一面トップの大見出し/大々的に報道する... but now, up at the 最高の,を越す of the 構成要素 about the 一括, in a nice color and all caps, you should see "任命する/導入するd". If you know to look!
の近くに the Boards 経営者/支配人 dialog. (You'll only have to do this "任命する/導入する 一括" thing once.
Use "道具s/Board" to configure the IDE for creating code for the ESP8266 you are using. 公式文書,認める that there are separate 入ること/参加(者)s for the Sparkfun ESP8266 Thing and ESP8266 Thing Dev Board.
NOW you can plug in your Thing.
始める,決める the IDE to "talk" to Thing on 訂正する port. (道具s/ Port")
Check to see if there was code already in the Thing that gives info 経由で the serial 監視する when Thing boots.
Try a quick instance of "Blink" to see all is 井戸/弁護士席 so far. the "ordinary" blink is NEARLY what you want, but toggle the D5 line, instead of the usual D13. ('原因(となる) that's where the Thing's LED is.) If you want to get fancy you can use "ESP8266_LED" for "5"! (A good practice, 現実に... but a bit "clever" for "Blink@!)
On my Sparkfun ESP8266 Thing Dev Board (WRL-13711) (やめる old... from c. 1/17?) There are at least 3 tiny LEDs on the board. A red "力/強力にする 現在の" LED, a faint yellow LED that flickers during code upload, and a nice 有望な blue LED, "outside" the 力/強力にする LED, that is the one you can turn on or off with D5.
So... 含むing 令状ing this, doing all of the above, it has taken me 35 minutes to get this far.
Four 関係s are needed to the Arduino/8266:
The last two are the I2C communication wires. I should について言及する that I've done very little before now with I2C! The 名簿(に載せる)/表(にあげる) above is from the point of 見解(をとる) of the Sparkfun Si7021 breakout board.
For 中継, go to...
Sparkfun page about hooking up Si7021
The Sparkfun 8266 Thing has two pins 献身的な to SDA, SCL. The Sparkfun 8266 Thing Dev Board makes pins 2 and 14 "work overtime... serving the needs of I2C serial data (SDA) and I2C serial clock (SCL) それぞれ.... in 新規加入 to serving other 役割s, depending on the ソフトウェア running on the 装置.
支援する to work...
In the 以前 特記する/引用するd hook-up guide from Sparkfun, there was, 9/18, a link to a library you can download and 任命する/導入する to make working with the Si7021. (If "libraries" bother you, download it anyway, and look into it, 逆転する engineer what is in the library... if you are feeling energetic. I 株 your 恐れる of libraries, but いつかs they are Just The Way To Go... 特に if they come from a reputable source.)
It is just an "ordinary" library. 任命する/導入する it in the "ordinary" way. (The Sparkfun and github pages have 公式文書,認めるs for you.)
Be careful when using libraries... you want to stay on 最高の,を越す of what 装置s use which libraries, and where the libraries (機の)カム from. And probably keep your own 古記録 copies of the library downloads.
There are probably 多重の Si7021 libraries. The one I'm using in this comes up in the IDE as "Saprkfun Si7021 湿度...", and is by "Joel@Sparkfun.com". I was using vers 1.0.1
公式文書,認めるs on just reading the sensor are 利用できる at Sparkfun, and at a short page from me about reading the 安価な Si7021 湿度 and 気温 sensor.
We've got the ESP8266 to read the sensor. Now how about making it a webserver, with data from the sensor in the page served up?
Not a BIG 取引,協定, but there are a few tricky 面s... not least getting it to read the sensor often enough, but not too often, or at wrong time.
I'm more than out of time. Sorry I can't give you all the 詳細(に述べる)s... there ARE 公式文書,認めるs in the code... And it is 解放する/自由な!....
Most of what I am going to 現在の I learned from Sparkfun's good explanation of setting up an ESP8266 as a webserver.
a) Arduino IDE has to be 始める,決める up for the 8266... see the...
http://arduino.esp8266.com/stable/package_esp8266com_index.json
... step in previous, if you skipped to here, and 港/避難所't done that yet.
The code that follows is a messy "mash-up" of the two Sparkfun examples. (Webserver and sensor reader.) Lots of Bad Stuff... but some good, too. And it does work!
公式文書,認める the "unnecessary" 内部の documentation... it 報告(する)/憶測s both to the Serial 監視する and to the served webpage the 指名する of the "Sketch" and a 見解/翻訳/版 ID.
To make connecting it to the WAN easier, it has been 修正するd to sit at a static IP 演説(する)/住所 on the LAN. (At one point I was using 218... but I won't 約束 to keep code and text in step. That could have changed) (This approach assumes you do NOT want your DHCP to "put" it at an IP 演説(する)/住所 based on MAC. Which also 暗示するs setting aside some IP 演説(する)/住所s outside of the DHCP pool. Stories covered at length どこかよそで. Get this working on LAN first. Then "go for" WAN 接近.
For the 環境の 監視する, bits of the Sparkfun server デモ... the turning on and off of LED, the reading of the two inputs... not necessary. The 捨てるs of that not fully weeded from the code.
Sorry! Not my usual 基準 of "polish"... but 価値(がある) what you paid for it? I hope it helps, however messy it may be.
Besides the に引き続いて, remember that the code can be downloaded.
[code] //ESP8266WebServerSparkfunWiSi7021 //TKB 公式文書,認めるs- WORKED.. and played nicely with router at 7NC, Sept 18 //Knobbled Sparkfun webserver デモ and moved to a static IP //加える reading, 報告(する)/憶測ing Si7021, also derived from Sparkfun sources. //Sensor breakout: Sparkfun 製品 SEN-13763 //eSet saw as "" //From Sparkfun, 7 Sep 2018 //https://learn.sparkfun.com/tutorials/esp8266-thing-開発-board-中継-guide/example-sketch-web-server //*** TAKE OUT SSID/ WiFiPW IF PUBLISHING *** #含む
場所/位置 地図/計画する What's New Search
The search engine is not intelligent. It 単に 捜し出すs the words you 明示する. It will not do anything sensible with "What does the 'could not 収集する' error mean?" It will just return 言及/関連s to pages with "what", "does", "could", "not".... etc.
In 新規加入 to the tutorials for which this page serves as (米)棚上げする/(英)提議する of Contents, I have other 場所/位置s with 構成要素 you might find useful.....
Sequenced 始める,決める of tutorials on Arduino programming and electronics interfacing.
Tutorials about the 解放する/自由な database 供給(する)d with Open Office/ Libre Office.
Some pages for programmers.
Using the 平行の port of a Windows computer.
If you visit 1&1's 場所/位置 from here, it helps me. They host my website, and I wouldn't put this link up for them if I wasn't happy with their service.
広告 from page's editor: Yes.. I do enjoy 収集するing these things for you... hope they are helpful. However.. this doesn't 支払う/賃金 my 法案s!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and 循環させる it for me? Links on your page to this page would also be 高く評価する/(相場などが)上がるd!
Click here to visit editor's Sheepdog ソフトウェア (tm) freeware, shareware pages.. 構成要素 on this page © TK Boyd qDATE
And if you liked that, or want different things, here are some more pages from the editor of these tutorials....
Click here to visit the homepage of my biggest 場所/位置.
Click here to visit the homepage of Sheepdogsoftware.co.uk. 陳謝s if the "?FrmAht" I 追加するd to that link 原因(となる)s your browser problems. Please let me know, if so?
To email this page's editor, Tom Boyd.... Editor's email 演説(する)/住所. Suggestions welcomed!
Page 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org
Why does this page 原因(となる) a script to run? Because of the Google パネル盤s, and the code for the search button. Why do I について言及する the script? Be sure you know all you need to about spyware........ P a g e . . . E n d s .....