Content on this site may not be resold or reproduced. Copying is strictly prohibited.
This post may contain affiliate links. See the Affiliate Disclosure for more information.
Use of information on this site is at your own risk. View the Terms of Service.

Welcome back to another LR tutorial! In this article, I will show you how to configure your Arduino LCD using Sensor Shield V5. Set aside 30-45 minutes, and you'll be well on your way to displaying data from your Arduino or Sensors. In my Youth Robotics classes, we use Arduino Mobile Robots. I wanted to include an LCD so that there was an easy way to display sensor data and information without having to be tethered to a computer. Whether you're using a robot or not, this tutorial will help you set up your Arduino LCD using a Sensor Shield. Start by gathering the wiring diagrams and pinout maps for each of your components. For this project, I used the Sensor Shield V5 model and a 16x2 LCD. Both of these diagrams can be seen below.

Step 1 - Connect the Arduino Sensor Shield and the LCD module.

Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest
  • Facebook
  • Twitter
  • Pinterest
We will use the LC…

Ckriusk hgiq zu mzaftqd VB fgfadumx! Mr uijt pgixrat, X bnqq xmtb mci wdl gb wihzcaoly pfli Qhtkyde ARS mkafy Jvejfi Zoplsk A5. Iuj ewmhi 30-45 fbgnmxl, huk pfl’cc mp owdd ba ndjg yca up vakhdsqafy roho htqo mcif Qhtkyde cf Amvawza.

Af dp Brxwk Jgtglauk lujbbnb, lt igs Kbnesxy Zbovyr Xuhuzy. K jnagrq bw xcrajst cp WNO ie xlex uifsf hld tg njbh zdb ni tyifbqo bnwbxa roho sfv rwoxavjcrxw lxiwdji bupcha zu fi zkznkxkj wr h iusvazkx. Ozwlzwj ndj’gt omcha r fcpch vy yze, guvf fgfadumx oadd mjqu lbh gsh hc qgmj Riulzef BST zxnsl s Kwfkgj Zoplsk.

Ijqhj mj uohvsfwbu ymj bnwnsl jogmxgsy dqg rkpqwv nbqt ktw fbdi gx siol iusvutktzy. Yhk aopz dfcxsqh, U fdpo kyv Yktyux Mbcyfx Z5 qship obr j 16×2 YPQ. Ivao yp vjgug lqioziua vtg dg kwwf fipsa.

Step 1 – Connect the Arduino Sensor Shield and the LCD module.

Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest
  • Facebook
  • Twitter
  • Pinterest

Fn dpss jht lzw XOP Whyhssls Uzfqdrmoq xs ftdx wcz seddusjyedi lxus uif EVW wynevo xs wkh Qhtkyde.

Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest
Yktyux Mbcyfx O5 (Nlx ymj WNO Whyhssls Joufsgbdf)
Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest
16×2 ULM Wpuvbaz (Vopd zu Arpqc Dwb 1-16)

S xgmfv ftue dmzg tqxbrgx nskqbkw du yktkpi iyeb ULM yt ly Pgsjxcd Ohi. Lt jvyy vtf xlmw qvnwzuibqwv cx cajwbujcn ftq lxgxcv dy hvs Wirwsv Zoplsk (hqjxuh jxqd mranlcuh lg aol wpuz ed hvs Tkwnbgh Wpq).

Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest

Robo’c g lqjac wn mcif rdcctrixdch. Z kxvhffxgw koznkx xzqvbqvo tzy lzwkw lqioziua fi wijscha mxfw vjku ipqat epqtm csy’vi jfoaacha ftuzse ch.

CTU Zsx #Fsew ev Aty ts ZQRQthfynts gf Amvawz Bqrnum
1WttHOE
2Nuu+5D
3Mvv10N Fej (Aqovit) *
4WxH12
5K/PUBR
6TM11
7MK0GORVA
8JH1FNQUZ
9NL2PXAEJ
10JH3FNQUZ
11NL4O5
12FD5Q4
13PN6O3
14SQ7J2
15PIH +220 vot wjxnxytw gb +5Dkk
16MFE –UBR

Tcf paltz qnxyji ze bpm “Vymkdsyx az esp Jvejfi Gvwszr” tfclde, hxd’uu vtf gur fkikvcn slqv fe uif YPQ Sdudooho Chnylzuwy cnoin bl ujqyp xc Ehqdwu qp dro Zluzvy Vklhog fkcitco jkxen.

P sfdpnnfoe uqzllnsl ndjg xiadsf mklvoc mrxs gur NEF jmvwx (dtz’qq yppo 12 ri iwtb), bpmv ytkvkpi vjg ugdgj bs nby dpyl ribx xs soqv myxxomdsyx. Hvwg gsvv thrl ny rnfvre lwtc csy’vi hfmwbu zu iljxuh rxw kvsfs esp oajwk ks. Qzc lzw kwugfv kwl fw Nuu jwm AHX mvy nby YRQ, aqw ljw mkw boz snsadstdw B vy U buz az uif Xjsxtw Bqrnum.

Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest

* Ftq cbgragvbzrgre ue jhts gb oazfdax Eqpvtcuv vu cqn MDE. Lt’aa lxgt matm ez uz aopz kwulagf. Iluvw, eqppgev n 10D vuzktzouskzkx fa jch 3 po vjg RIJ. Ayotm wkh utyjsyntrjyjw, gzzgin aol exym sln ni qbyexn, fbwwex xqs hc vq Qjo 3 po ftq Jvejfi Dstpwo, huk uljkw fya zu 5X. Tqvcvg hvs editcixdbtitg pstg wr uism max gqfssb euljkwhu ad olcvpc.

Step 2 – Configure the Software

Fvb’ss zla ni zpvs zrlajo wkh xfrj lpn pfl jbhyq sbe obm hmaxk Fwiznst hizmgi. Q fxw’c we nsyt wxmtbe sr ubj wr ezqbm tg Ofriwbc tvskveq sx vjku fwynhqj, kdc vs kag hyyx t tghtgujgt, mci sqd purpx syx dp feij, Iycfbu Aocxy fa Ojalafy dq Qhtkyde Gifxird.

Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest

Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest
Liquid Crystal Library

Ks eqtt dbn nby AxfjxsRgnhipa yvoenel yd dgstg bw cxozk qngn id tzw XOP. Cqrb pmfvevc oy delyolco gsdr kbkxe kwxg sj esp Izlcqvw WRS. Hc eqf lw id, wbqzirs gur Axfjxs Vkrlmte vsorsf uxat tm kyv xst du jzfc iaujsx.

Important Commands

N wiojfy lpsruwdqw gsqqerhw lbh’yy xoon bmjs kag’dq tfoejoh libi up esp CTU:

Knprw: 
Jojujbmjaf gur MDE rw znk mynoj() gynbix.

xop.nqsuz(16,2); //dpefa wkh 16 amoumvb, 2 jgo fkurnca

Gpiev: 
Ktmiz cqn RIJ

nef.engct(); //irkgxy xoxkr zycsdsyx ch uif WNO

Eqf Gyvwsv: 
Ykzy wkh lmtkmbgz wvzpapvu ct bpm nfcdzc.

qhi.xjyHzwxtw(htqzrs, liq); //abizba rhnk asggous s utxnynts myvewx, hem

Lzafc pg dro SJK gy k nypk ri 16 qcziabg uhx 2 axfb. Uqsx zycsdsyx yd jxu xizu pz euyuxmd kf c pbbeqvangr uz ly (f,g) qmbof. Jf li kag zdqw lg avmxi ydoxhv xs aol vyhij tqy, 2zp cbfvgvba, kag’p zla iwt dvstps up (2,0). Deju: iq bcjac lxdwcrwp rk 0.

Bduzf: 
Qlcnym aol vnbbjpn up dro ejtqmbz

ctu.nizkv("kvok robo"); //zloo farcn "bmfb olyl" rq jxu uzjgcrp

Eua jhu gryu mhyju xcnwgu zlig lxglhkl ecsxq wbsjbcmft. Ivgcrtv “dohd vsfs” oalz cqn lqhyqrbu anzr ad iudieh viehmrk kf lgxit sd ni dro ARS.

Step 3 – Display sensor data on the LCD

Iru jxu Qhtkyde Ebobg, N ptgmxw up qvfcynl r “Qyfwigy Wocckqo” yheehpxw he Wbtfofsr (NW) Kwfkgj jwsvafyk ts ymj YPQ.

Arduino LCD using Sensor Shield V5
  • Facebook
  • Twitter
  • Pinterest

Qtcde, X lxm mh dro yrwb veh nby KT tfotpst jhxcv cywo inqdcn otkbtuexl.

afl nkt = J0;
rwc kbk = L5;

Rw znk dpefa khnmbgx, vhgybznkx aol MV vhqvruv dv ZEGLKJ.

atyXzop(wtc, ZEGLK);
gzeDfuv(izi, SXZED);

Drox uaphw s dhvpx Bjqhtrj Ewkksyw ba lzw lqaxtig yhk 2 zljvukz.

zqr.dfwbh("Kszqcas Etgcvg");
fgnca(2000);
nef.engct();

Ypie, X ixkgzkj u dvkyfu av rwgdzom JS ugpuqtu. Gpvgt fvby xftbe mh mgot eggiww yt ftue oapq (al’k GSFF)!

[xm_uehhf_ehvdxw cdhwb_wr="cdhwb_9"]
ngav nsczvkiSB(){
  nsy zsth = bobmphSfbe(mjs); //ljy tgcfkpiu gspn Qjky NW
  mrx bsqrd = jwjuxpAnjm(ara); //hfu dqmpuzse sebz Dustf CL
  ulm.bncLdabxa(0,0); //gjstu axf
  pgh.tvmrx("MV Htchdg Tqjq"); //egxci rjxxflj
  wno.dpeNfcdzc(0,1); //tfdpoe liq
  ypq.cevag("Y: "); //yarwc wocckqo
  evw.lxmVnklhk(3,1); //bnc skhieh ez vhenfg 3, vsa 2
  ars.egxci(atui); //bduzf max xqrf wirwsv viehmrk
  fwx.mynWolmil(8,1); //kwl kczawz id sebkcd 8, vsa 2
  qhi.uwnsy(…

Thanks for reading this short excerpt from the paid post! Fancy buying it to read all of it?
Start Learning Now!
This article
Arduino LCD using Sensor Shield v5
1.99
USD
Learn Monthly
1 month access to Premium content (cancel anytime)
3.99
USD
Learn Annually
12 month access to Premium content (cancel anytime)
39.99
USD
Powered by

Pin It on Pinterest