{"id":8081,"date":"2019-08-15T19:19:32","date_gmt":"2019-08-15T18:19:32","guid":{"rendered":"https:\/\/stevepedwards.today\/quad\/Electronics\/?p=8081"},"modified":"2019-08-15T19:19:32","modified_gmt":"2019-08-15T18:19:32","slug":"arduino-lcd-screen-and-thermistor","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/ElectronicsStuff\/arduino-lcd-screen-and-thermistor\/","title":{"rendered":"Arduino LCD Screen and Thermistor"},"content":{"rendered":"<p><iframe loading=\"lazy\" title=\"How to Control LCD Displays | Arduino Tutorial\" width=\"1778\" height=\"1000\" src=\"https:\/\/www.youtube.com\/embed\/85LvW1QDLLw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><br \/>\n<iframe loading=\"lazy\" title=\"Arduino Kit\" width=\"1333\" height=\"1000\" src=\"https:\/\/www.youtube.com\/embed\/-z5CVlyQTr8?start=306&feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-8100\" src=\"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-content\/uploads\/2019\/08\/TempLCD-1024x768.jpg\" alt=\"\" width=\"840\" height=\"630\" \/><br \/>\nUno (12, 11, 5, 4, 3, 2) PWM<br \/>\nLCD-\u00a0 (4, 6, 11, 12,13,14) so pin 12 to pin 4 etc.<br \/>\nFrom Uno: 5v pin2, gnd pins 1,5<br \/>\nbacklight : eg from external PSU : 4V to pin 15 via 220 ohm resistor, and 0V to pin 16.<br \/>\nLCD contrast pin3, a 3.6k ohm to gnd<br \/>\n10k thermistor with 10k resistor divider, 5v to gnd; sig to pin A0<\/p>\n<pre class=\"lang:default decode:true\">CODE:\n#include &lt;LiquidCrystal.h&gt;\nint ThermistorPin = 0;\nint Vo;\nfloat R1 = 9900;\nfloat logR2, R2, T;\nfloat c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;\nLiquidCrystal lcd(12, 11, 5, 4, 3, 2);\nvoid setup() {\nSerial.begin(9600);\n}\nvoid loop() {\nVo = analogRead(ThermistorPin);\nR2 = R1 * (1023.0 \/ (float)Vo - 1.0);\nlogR2 = log(R2);\nT = (1.0 \/ (c1 + c2*logR2 + c3*logR2*logR2*logR2));\nT = T - 273.15;\nT = (T * 9.0)\/ 5.0 + 32.0;\n\/\/conv C\nT = (T - 32) \/ 1.8;\nlcd.print(\"Temp = \");\nlcd.print(T);\nlcd.print(\" C\");\ndelay(5000);\nlcd.clear();\n}<\/pre>\n<p>&nbsp;<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-8098\" src=\"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-content\/uploads\/2019\/08\/tempc-1-1024x768.jpg\" alt=\"\" width=\"840\" height=\"630\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Uno (12, 11, 5, 4, 3, 2) PWM LCD-\u00a0 (4, 6, 11, 12,13,14) so pin 12 to pin 4 etc. From Uno: 5v pin2, gnd pins 1,5 backlight : eg from external PSU : 4V to pin 15 via 220 ohm resistor, and 0V to pin 16. LCD contrast pin3, a 3.6k ohm to gnd <a href=\"https:\/\/stevepedwards.today\/ElectronicsStuff\/arduino-lcd-screen-and-thermistor\/\" class=\"more-link\">...<span class=\"screen-reader-text\">  Arduino LCD Screen and Thermistor<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,2],"tags":[],"class_list":["post-8081","post","type-post","status-publish","format-standard","hentry","category-tech-studies","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/posts\/8081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/comments?post=8081"}],"version-history":[{"count":0,"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/posts\/8081\/revisions"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/media?parent=8081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/categories?post=8081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/ElectronicsStuff\/wp-json\/wp\/v2\/tags?post=8081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}