|
このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。 |
This 部隊, seems to me, is a pretty good balance between price/ 力/強力にする/ challenge. Not beyond the reach of a novice.
I like the LCD 陳列する,発揮する sold by Sparkfun... $37 in the "small" 見解/翻訳/版, LCD-09351, 128x64, 支配する of this review, ($70 for the large 見解/翻訳/版 (LCD-08884- 160x128 pixels). (Prices as at 4/17, excl p&p.)
For that you get a monochrome, 支援する-lit LCD パネル盤 which can 陳列する,発揮する text, graphics, or a mixture of the two. You can 支配(する)/統制する the backlight with ソフトウェア. Update: At 2/18, Sparkfun still sold the backpack, and two LCD 陳列する,発揮するs suitable for it. You now have to connect them yourself. (A simple 事柄 of a straight line of 20 pads.)
But the big selling point, as far as I am 関心d, is that you "運動" the 陳列する,発揮する with just one bit from the controlling microprocessor. It has to be a 5v signal. (3v3 fans can use level shifters.. not expensive.)
For many years, the 広大な/多数の/重要な Peter Anderson, sadly now 死んだ, sold a nice little PCB which worked more or いっそう少なく as the module in the Sparkfun 部隊. I was very sad when that left the marketplace. Now something 類似の, "改善するd" as is the way of these things, is 支援する! Hurrah! (Oh! And in 研究ing this, I 設立する that Sparkfun also sell even いっそう少なく expensive 部隊s, even closer to what Peter sold. More on them another time... or maybe it is その上の 負かす/撃墜する the page.)
AND! I'm delighted to say that ModernDevice.com sell the 装置 Peter designed! $35 / $41 + p&p, 2/18 WITH LCD 陳列する,発揮する... 2 lines of 16 characters or 4 lines of 20 characters. (That's why two prices.) For 5v or 3v3 signals and 力/強力にする from the controlling microprocessor. The Anderson/ ModernDevice.com 装置 is character oriented... not as "graphics 有能な" as the Sparkfun and Hobbytronics 装置s. But you can send te cursor to a particular place on the 審査する... useful! (The 場所/位置 has good documentation of the 命令(する) 始める,決める. 問題/発行するing 命令(する)s, "(疑いを)晴らす 審査する" for instance, is 平易な.)
Below: An image of the Sparkfun 製品 in 操作/手術.
If that isn't やめる what you 手配中の,お尋ね者, maybe the TFT 陳列する,発揮する from Hobbytronics will 控訴 you? Color. Higher 決意/決議. Very pretty! (Also driven by a simple serial data steam, "負担" on host: Just one 数字表示式の 生産(高).) Not a large 陳列する,発揮する- just under 2 インチs across... but only about $20/$30, and 160x128 (very small!) pixels.
The 陳列する,発揮する can 現在の text. Eight 列/漕ぐ/騒動s of twenty-one characters. They won't be "pretty", like text on a fancy modern smartphone... but the 陳列する,発揮する won't cost what a smartphone costs, either.
You can update the text on the 審査する selectively... that is to say you can go to a particular character, or 封鎖する of text, and change that... without having to refresh other parts of the 審査する to do it.
You can draw lines, boxes, circles. You can (疑いを)晴らす a rectangular 部分 of the 陳列する,発揮する. You can 陰謀(を企てる) or (疑いを)晴らす individual pixels. (So, with a little ソフトウェア, you can draw graphs, etc.) You can erase 以前 drawn stuff.
The essence of it is as follows...
You give the module 力/強力にする (5v will do. 6v ideal. Not more than 7v. You can "go fancy", or, if you're willing to be a little "sloppy", you should be able to get away with 製図/抽選 5v from the 5v 力/強力にするing your Arduino, Pi, whatever. (Be sure it is a 十分な 5v... some USB 供給(する)s are a little under that, and the Arduino still 機能(する)/行事s, but you may find that the 陳列する,発揮する flakes out at, say, 4.5v. There are 公式文書,認めるs on "doing it pukka" at the Sparkfun page. Not hard.)
And then you connect one 生産(高) line from the Arduino (or Pi, etc. (Assume I say that every time I say "Arduino" in this)) to the 陳列する,発揮する module. Send "stuff" 負かす/撃墜する that line as a stream of serial data, and the "stuff" appears on the 陳列する,発揮する. You send text as text, and there are 命令(する)s to draw graphics.
In passing: It will Just Be Easier if you use 数字表示式の line 3 for the 生産(高) from the Arduino. It's not impossible to use a different line, but use 3 for now.
平易な! 井戸/弁護士席... mostly. I must 収容する/認める I 港/避難所't tried ALL the 約束d features, and that I've had a few "問題/発行するs" along the way. But I have no 疑問 that the 部隊 would work just 罰金 as a modest 陳列する,発揮する for anything needing a 陳列する,発揮する, 需要・要求するing very little from the Arduino (or other 運動ing "知能"). The one 保留(地)/予約 I would make to that is that I think the update 速度(を上げる) may be a little "slow". Nothing you'd care about in some 使用/適用s, but it wouldn't, maybe, make a good 審査する to 陳列する,発揮する what a レーダ system was seeing, for instance.
It may be 価値(がある) the very 限られた/立憲的な "hassle" and "downside" of using the library Sparkfun has 供給するd. I will turn to that soon. First, two things...
The world, sigh, is moving on from Windows XP. I 港/避難所't had the problem before, and I 嫌疑者,容疑者/疑う it is a coincidence, but I had the very annoying and intermittent "collect2.exe: error: ld returned 5 出口 status" problem while I was getting to 支配するs with the Serial LCD Backpack. I was using an XP computer with the Arduino 1.8.0 IDE. I had "collect2" problems even when using the LCD 部隊 in the very simplest manner, with nothing more than SoftwareSerial. (It didn't need to 伴う/関わる the SparkFunSerialGraphicLCD library.) As soon as I moved the work to a Windows 7 PC, running 1.8.2, the problems stopped. Throughout, I have been using a Sparkfun Arduino プロの/賛成の 小型の, 5v, 16MHz, Atmega328.
So... another "勝利" for Gates, and his "改良s". Sigh. N.B.: I didn't ALWAYS get the "collect2.exe" problem... but it (機の)カム and (mysteriously) went. Life is too short to fight that sort of fight. (Read what's been written online about the problem before you ignore that advice!)
(Ironically, having written the previous paragraph, I then went on to use the 装置 on my old XP machine for about two hours, 令状ing the 残り/休憩(する) of this on that, and I didn't 攻撃する,衝突する the "collect2.exe" problem again in that period! Which made my life much easier, as I could copy/ paste code examples 直接/まっすぐに from the Arduino IDE to the text behind this, without having to sneakernet them across from the 勝利,勝つ 7 machine. Go figger. Not that I am complaining!!)
Update: Feb 2018 I was using a the vers 1-8-1 Arduino IDE, 勝利,勝つ 7 computer, a Sparkfun Arduino プロの/賛成の 小型の (5v/ 16Mhz) and a Modern 装置 USB BUB II.... and all went very 井戸/弁護士席.
(Doing It, continued...)
As I について言及するd before, you only have three 関係s to make. I'll repeat them in a moment, but, as いつかs these pages are read by novices, I will cover a general point...
Unless you only ever work with one sort of Arduino, be careful when you start a new 事業/計画(する). BEFORE you connect your Arduino, go into the IDE, click on the "道具s" menu item, and use the Board and 加工業者 settings to configure the IDE to work with the 金物類/武器類 you are going to use. THEN you can connect the Arduino. And at that point you will かもしれない have to 明示する the port it is on.
Then put in at least a "骸骨/概要" of what you what for the program for what you are setting out to do today, and 収集する it, and upload it to the Arduino.
You do all that BEFORE you connect anything to the Arduino! Step by step... always best. Why this "hook up, 力/強力にする up, program Arduino" before connecting anything else?
The GPIO pins on the Arduino can be programmed to operate as inputs or as 生産(高)s. If you have a pin programmed, from a previous use of the Arduino, as an 生産(高), and then connect 金物類/武器類 for "today's" 事業/計画(する) which is, in 影響, an 生産(高) from the outside world's 金物類/武器類 to the Arduino, it can be Bad For The Arduino!! (Very bad. Bad enough to fry the pin, or, いっそう少なく likely but not to be 危険d: The Arduino!)
So get the pins configured, as input or 生産(高), and then make your 外部の 関係s.
For the "getting to know you" 段階 of working with the Serial LCD Backpack 部隊, you don't need any fancy connectors... a simple 原型ing board can do the 職業....
The left 手渡す image shows the 前線 of the LCD, with no 力/強力にする, no text or graphics 存在 陳列する,発揮するd. See the blue proto board, under my thumb? It is at 権利 angles to the LCD module. And you can just see, though you wouldn't know that is what it is, the Arduino プロの/賛成の 小型の, 辛勝する/優位 on, to the 権利 of the proto board.
Now look at the 権利 手渡す image. The large red area is the 支援する of the LCD module. It's four pins have been 挿入するd into the last three columns of 穴を開けるs of the blue proto board. The Arduino プロの/賛成の 小型の is now seen easily. At the lower 権利 is the ModernDevice "BUB" which is how I connect my Arduinos to my PC, for programming. Again, there's a pin/socket 関係 between that and the Arduino プロの/賛成の 小型の.
Moving on....
First, somehow or other, connect the 部隊's ground (GND) to a ground pin on the Arduino. (黒人/ボイコット wire, in the images above.) Then connect the LCD 部隊's "Vin" to a source of 5v... you can use the Vcc pin of an Arduino プロの/賛成の 小型の. (Yellow) And lastly, connect the LCD 部隊's "Rx" (stands for "receive", not "prescription"!!) to the Arduino's (D)3. (Green wire.)
(Novices: Don't be 混乱させるd by the old demon: An OUTPUT from the Arduino is going to go to an INPUT of the LCD 部隊. From the Arduino's point of 見解(をとる), what should go on the 審査する is 生産(高), something it sends. From the point of 見解(をとる) of the LCD 部隊, the same stream of data, the same 電気の signal, is received. It is input to the LCD 部隊. (疑いを)晴らす? No, it muddled me for a while too. But that's how it is!)
That's it! 金物類/武器類 done! The backlight should come on. If you watch it during the first second after receiving 力/強力にする, you will see the Sparkfun logo in the middle of the 審査する.
(Unless the "陳列する,発揮する Sparkfun logo during boot" 行為 has been turned off... it can be... Or maybe the contrast setting got 乱すd. Both ありそうもない. Troubleshooting help for both on the Sparkfun website.
Contrast is adjusted by the tiny... やめる 極度の慎重さを要する... little マリファナ on the 支援する, in the lime colored square (追加するd to illustration, not 現在の in real life) on the left in the image to the 権利.) If the 供給(する) voltage changes, the contrast setting will need changing.
The に引き続いて image is what you see if you run the program below it. 公式文書,認める: This doesn't use the library. It also shows you that the font is "mono-spaced", i.e. every character always takes the same space. AND it shows you that the 陳列する,発揮する 許すs eight 列/漕ぐ/騒動s of text, 21 characters per 列/漕ぐ/騒動. This, remember, is the small 見解/翻訳/版 of the Serial LCD Backpack 陳列する,発揮する 部隊. (I believe, but have not 実験(する)d, that the large 部隊 would 許す 16 列/漕ぐ/騒動s of 26 characters.)
Remember... the 部隊 is also 有能な of graphics. (See below.)
Here, I am only going to show you a small taste of using the LCD 部隊 without using the library. If you want to use it without the library, see my more 最近の page about this 装置, or see the "Ascii 命令(する)s" section in The Sparkfun Serial Graphic LCD 中継 guide. (My more 最近の guide also covers some "gotchas" not covered here.) And don't let the ぎこちない text about 非,不,無-printing character (decimal ASCII 124) which is the "escape character" to 示す that what follows is a 命令(する) put you off too much. Nor the ぎこちない text about 生成するing some of the characters needed for ASCII 命令(する)s. Do it all as done in the program below, where we send 124 and 0 to (疑いを)晴らす the 審査する, and life is not hard.
Read the 構成要素 in the comments in the code, too, please...
#含む <SoftwareSerial.h>
SoftwareSerial mySerial(2,3); // RX, TX
//We're not going to use line 2. I would 普通は "waste"
// it, for "the simple life". If I needed "just one more"
// INPUT, I would 危険 using line 2... but reluctantly.
//We NEED the serial 生産(高) created by the above, and it
// doesn't come in a "just create an 生産(高)" 見解/翻訳/版.
//I would NOT use line 2 for an 生産(高) 経由で other code
// in the program.
//(You can change the lines used for the serial input
// and 生産(高). Just change the "2" and/or the "3" in
// what I put, above.
無効の 体制/機構() {
//This next not "needed"... but I think it is a Good Thing
//to have in any program. It sends a message to the
//serial 監視する. Again, you don't "need" the message...
//but it costs little, and you may find it useful in
//さまざまな ways.
Serial.begin(9600);
//Now initialize the channel over which we will send messages
//to the LCD 部隊
mySerial.begin(115200);
延期する(1800);
Serial.println("SimpleSerialLCD, ver 27 Apr 17, started 26 Apr 17");
Serial.println("推定する/予想するs Sparkfun LCD-09351 on D3.");
//(疑いを)晴らす the LCD 審査する
mySerial.print(char(124));//cmnd follows...
mySerial.print(char(0));//(疑いを)晴らす 審査する
延期する(800);
//The text in what follows is やめる carefully chosen.
//I 示唆する you try it 正確に/まさに as 現在のd, before
//実験ing with 代案/選択肢s.
mySerial.print("123456789012345678901");
延期する(1200);
mySerial.print("2--------------------");
延期する(100);
mySerial.print("3---- Welcome to ----");
延期する(100);
mySerial.print("4- Sparkfun Serial --");
延期する(100);
mySerial.print("5--- LCD Backpack ---");
延期する(100);
mySerial.print("6--------------------");
延期する(100);
mySerial.print("7--------------------");
延期する(100);
mySerial.print("8--------------------");
}//end of 体制/機構()
無効の 宙返り飛行() {
}//end of 宙返り飛行()
No prizes for subtle to the programmer of the above! Pretty "stodgy". But it shows the 部隊 controlled without using the library.
Notice the 延期する 声明s after each mySerial.print. It seems to take a little time for the message to be transmitted, and/ or the LCD module 過程s 命令(する)s a little more slowly than we might 推定する/予想する. It isn't "slow" in human 条件, but you need to put the 延期するs in, to give a little "breathing room" beyond the unimaginable pace normal inside the silicon. If you get gibberish at a point where you're 推定する/予想するing something different, the first thing to try is a longer 延期する after whatever the last thing to 遂行する/発効させる 適切に was.
If you choose to use the library... which is probably a good idea... a simple program would look like what you'll see in a moment.
I should first について言及する... as I have in funking 演説(する)/住所ing other 問題/発行するs!... that Sparkfun gives you some help with "libraries", too!
If you'd rather eschew the 問題/発行するs of libraries, you can just "talk" to the module 直接/まっすぐに with ASCII 命令(する)s. I 嫌疑者,容疑者/疑う that the library 単に "包むs" the ASCII 命令(する)s in a 使用者 friendly interface. As I said earlier, more recently I've written an 代案/選択肢 stand-alone introduction to this splendid text and graphics LCD 陳列する,発揮する 運動ing 金物類/武器類 which 調査するs the "use ASCII 命令(する)s" approach in greater 詳細(に述べる). (It also covers some "gotchas" that I 港/避難所't gone into here.) The photos which appear on the page you are reading illustrate the things you can do either with the library or with the ASCII 命令(する)s.
You don't have to go to GitHub to get the library, as you might infer from the Sparkfun guide. (Or maybe you do, "under the covers", go to Github, but the Arduino IDE makes it very, very 平易な...
解雇する/砲火/射撃 up the Arduino IDE. Invoke "Sketch/ 含む Library/ Manage Libraries"
That should open a window with a bunch of libraries on 申し込む/申し出. Put "serial LCD" in the "filter your search" edit box. That should 崩壊(する) the number of libraries on 申し込む/申し出 to "Sparkfun Graphic LCD Serial Backpack by マイク Hord", and one other library.
In the "Sparkfun... Hord" 入ること/参加(者)'s box, there should be a link for "more (警察などへの)密告,告訴(状)". (My pc was online, which, for this 行う/開催する/段階 is, I think 必須の... but not needed later)
Click the link, and a choice of 見解/翻訳/版s should open up, and an "任命する/導入する" button appear. Selected the 最新の 見解/翻訳/版 (1.0.1 when I did this), and click "任命する/導入する".
It took only a moment. The 審査する flickered... but after the flicker, "INSTALLED", in teal, was 追加するd to the 入ること/参加(者) about the Sparkfun library, which hadn't been there before.
の近くに out of the Library 任命する/導入する 過程.
Now, if you invoke "Sketch/ 含む Library", then in the section for "与える/捧げるd Libraries", you should see...
SparkFunSerialGraphicLCD
...which wasn't there a moment ago... and which you can now use in your programs. (It even put its とじ込み/提出するs where I would have 手配中の,お尋ね者 them... the "Libraries" folder of MY folder for my Arduino program code folders!)
Whew! A palaver. Harder to 述べる than to do. And you only need to do it once. After that, the に引き続いて should work!...
The cyan box does NOT appear on the LCD 陳列する,発揮する! It is there to show you where I (疑いを)晴らすd an area of the 審査する with myLCD.eraseBlock(15,45,70,50); after 製図/抽選 the two rectangles. The eraseBlock explains why the bits are 行方不明の from the vertical 味方するs of the smaller rectangle.
I わびる for the fuzziness in this and some other images. ALL of the 陳列する,発揮する was as bold and crisp as the "Sparkfun" in this image happens to be.
Besides doing text and boxes, you can do circles, or even 陰謀(を企てる) individual pixels (or (疑いを)晴らす them). So, with a bit of ソフトウェア in the Arduino, you could 陰謀(を企てる) graphs or draw pictures.
Again... there are important hints, tips and Things You Need To Know in the rems below. 公式文書,認める in particular the first two...
#含む <SparkFunSerialGraphicLCD.h>
//公式文書,認める: As above. Not as in the example on the Sparkfun page
//referred to below. (In the example, the "Sparkfun" was absent... at least it was, 20 Apr 17.
//Sparkfun moved quickly to 訂正する that, when they were 通知するd. But left
//the に引き続いて. Maybe it is needed? But I don't think so.
//#含む <SoftwareSerial.h> << This is PRESENT, 27 Apr 17, in
//example on https://learn.sparkfun.com/tutorials/serial-graphic-lcd-中継
//in the "Arduino Library Example" section... and will STOP
//the program 収集するing.
//KEEP IT REMMED OUT, or 除去する it, when you are happy you don't
//need to be reminded not to be led astray by the Sparkfun
//example.)
const String strPrgmName("SimpleSerialLCD");
const String strPrgmVers("ver 27 Apr 17, started 26 Apr 17");
無効の 体制/機構() {
//This next not "needed"... but I think it is a Good Thing
//to have in any program. It sends a message to the
//serial 監視する. Again, you don't "need" the message...
//but it costs little, and you may find it useful in
//さまざまな ways.
Serial.begin(9600);
Serial.println(strPrgmName);
Serial.println(strPrgmVers);
LCD myLCD;
延期する(1200);//Wait for the one second splash 審査する to go by
myLCD.restoreDefaultBaud();//This should result in text on 審査する: "Baud 回復するd to 115200".
//公式文書,認める: All of the 命令(する)s, as usual in Arduino work, are
//事例/患者 極度の慎重さを要する. I.e. "restoreDefaultbaud" will not do. (Needs
//to be Baud, not baud.)
//You can 挿入する a myLCD.clearScreen(); here, which will
//"erase" the 返答 from the module, 確認するing baud 率
//reset. It isn't 必須の. (See the Sparkfun pages for a way to reset the baud 率
//to the default which 作品 when you are unable to send
//命令(する)s. You won't be caught in the obvious Catch-22!
myLCD.clearScreen();
//Next takes a 重要な time to appear for some 推論する/理由,
//even without the myLCD.nextLine();
myLCD.nextLine();
myLCD.printStr("Hello Sparkfun LCD");
延期する(100);
myLCD.drawBox(10,40,117,53,1);//long box
//drawBox args: x0,y0,x1,y1, then a parameter which is supposed
// to 決定する whether box "drawn" in background
// color or foreground color... but -1,0,1 and 255 all
// seem to result in "draw in foreground color".
延期する(100);
myLCD.drawBox(32,38,60,55,0);//short box, わずかに to
//権利 and below first box. If both can be made to draw,
//and the 権利 value 設立する for "draw in background 設立する,
//"gaps" SHOULD appear in the lines of the long box when
//this one is drawn after because this is SUPPOSED to be
//in "background color"... but doesn't seem to be. Sigh
延期する(100);
myLCD.eraseBlock(15,45,70,50);
延期する(100);
}
無効の 宙返り飛行()
{
//nothing in 宙返り飛行
}
Where you see "LCD myLCD;" above, Sparkfun had "LCD LCD;"... which "作品", but I think 追加するing something to the 指名する of the 反対する you are instantiating helps keep classes and instances 際立った. Not that どこかよそで, Sparkfun had things like LCD.nextLine(); which had to be changed to myLCD.nextLine(); because of my earlier tweak.
The little programs I've shown you above are trivial, just meant to give you some of the basics. Don't let them make you think the 装置 is trivial.
It would be a 比較して small 事業/計画(する), for instance, to 始める,決める up a home 天候 監視する (with a few extra features), the 監視する built in an Arduino with this 陳列する,発揮する for 報告(する)/憶測ing the data to the 使用者. The 陳列する,発揮する could look like...
(The actual 陳列する,発揮する I was photographing was crisp with good contrast everywhere. All of it was like the "20mph". The fuzziness at the ends of lines in particular is just an artifact of my amateur photography.)
The mocked up 陳列する,発揮する is telling the 使用者 indoor, outdoor 気温 etc. Also, on the 5th line, you see "lights: ON". I'm imagining a large house in a remote 場所 with some 安全 lights which turn themselves on at dusk. The 使用者 can turn them off again... or on 早期に... by 圧力(をかける)ing the button (not shown), beside the 陳列する,発揮する, 示すd "A".
In my imaginary system, there are other buttons, one of them 示すd "M". 圧力(をかける) that, as 誘発するd by the last line on the usual 陳列する,発揮する, and the 陳列する,発揮する would change, with some text to remind you what other buttons would do.
非,不,無 of that is hard... but 非,不,無 of it is really the 問題/発行する, here. Here I just want you to be aware of a neat little 装置... not perfect, but perfectly 有能な of making a 出資/貢献 to a 事業/計画(する)!
The search engine 単に looks for the words you type, so....
* (一定の)期間 them 適切に.
* Don't bother with "How do I get rich?" That will 単に return pages with "how", "do", "I"....
Please also 公式文書,認める that I have two other 場所/位置s, and that this search will not 含む them. They have their own search buttons.
My 場所/位置 at Arunet.
My Sheepdog ソフトウェア pages, another of this page's editor's 場所/位置s.
Here is how you can 接触する this page's editor. This page, and the ソフトウェア it 言及/関連s, ©TK Boyd, 8/2015.
Tried to 実験(する) page for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org. (Two unknown せいにするs 予定 to Google+ button.).. but 敗北・負かすd by the 非,不,無-compliant code in the listings.