GETTING ACQUAINTED IN USING ARDUINO.

in STEMGeeks3 years ago

Recently, I joined an automation training class which promises to train us to the point of learning to build drones ourselves but before getting to that point, we would go through different practicals and topics in which this is once of them.

<p dir="auto">Yesterday we delt with putting on an LED with Arduino and was given some codes on how to do it on the Arduino software. <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23w2cow6j9meQYeAbjdeZugGVqsCR9Ua2JUe5hzKATcq1kAbonbjsYVogVUePfwHdm752.jpg" alt="IMG_20220307_124011.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23w2cow6j9meQYeAbjdeZugGVqsCR9Ua2JUe5hzKATcq1kAbonbjsYVogVUePfwHdm752.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23w2cow6j9meQYeAbjdeZugGVqsCR9Ua2JUe5hzKATcq1kAbonbjsYVogVUePfwHdm752.jpg 2x" /> <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQfqKSfEQBEKjc4tr5fB8E9s9j6zYypaugPxAxA9Rwf2q6FintDh1hvtCWA91CFNFvu.jpg" alt="IMG_20220307_124004.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQfqKSfEQBEKjc4tr5fB8E9s9j6zYypaugPxAxA9Rwf2q6FintDh1hvtCWA91CFNFvu.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQfqKSfEQBEKjc4tr5fB8E9s9j6zYypaugPxAxA9Rwf2q6FintDh1hvtCWA91CFNFvu.jpg 2x" /> <p dir="auto">From the screen of my laptop above, the code written is <pre><code>Int led=13; void setup () { // put your code here to run once; pinMode (led, OUTPUT); } void loop () { // put your main code here to run repeatedly; digitalWrite (led, HIGH); delay(1000); digitalWrite (led, LOW); delay(1000); } <p dir="auto">The code written above is to set the led to be coming on and off every second. That's the first practical we did as of yesterday. <p dir="auto">An assignment was given to use that we should make a traffic light setting using a RED, YELLOW, GREEN led lights. <p dir="auto">Presently, I don't have my own Arduino kit and it cost for a price of $50 in my country. So, I would be saving up towards getting that amount so I can do my assignments and also practice up everything. <p dir="auto">Also luckily for me, before I get my own Arduino kit, I have a friend who I recently called the said he would borrow me his kit to practice. After I get them in hand, I would be able to make more practice and make better blogs on Arduino. <h4>ARDUINO WITH LCD <p dir="auto">Today, we were introduced to LCD using Arduino. We were taught how to display a name on the LCD and let it move. <p dir="auto">But due to the fact that we were a group project and the materials could not reach everyone, it was tough for me to totally understand how it was done; but I would put some time later into it for better understanding. <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23xUgku9vBbdNvY1xKdpQvf95kyKdFPc36RL2PjBibFTfpHaufnCEz4KzoVbWk4yet2eh.jpg" alt="IMG_20220308_155942.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23xUgku9vBbdNvY1xKdpQvf95kyKdFPc36RL2PjBibFTfpHaufnCEz4KzoVbWk4yet2eh.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23xUgku9vBbdNvY1xKdpQvf95kyKdFPc36RL2PjBibFTfpHaufnCEz4KzoVbWk4yet2eh.jpg 2x" /> <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQGQTM5sRDee5WvZrGtkvwTMdPv4CVumXwfegNZPLLy28vZzWXcNrMJXtyxmqh2gY8Q.jpg" alt="IMG_20220308_155850.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQGQTM5sRDee5WvZrGtkvwTMdPv4CVumXwfegNZPLLy28vZzWXcNrMJXtyxmqh2gY8Q.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQGQTM5sRDee5WvZrGtkvwTMdPv4CVumXwfegNZPLLy28vZzWXcNrMJXtyxmqh2gY8Q.jpg 2x" /> <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQpV6jnXZTMCgfQTXjRkyYoyMs42Su8ZUwgu3FWfetNTquDu3mA8YSg2ohrtPNtvVfF.jpg" alt="IMG_20220308_155917.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQpV6jnXZTMCgfQTXjRkyYoyMs42Su8ZUwgu3FWfetNTquDu3mA8YSg2ohrtPNtvVfF.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQpV6jnXZTMCgfQTXjRkyYoyMs42Su8ZUwgu3FWfetNTquDu3mA8YSg2ohrtPNtvVfF.jpg 2x" /> <p dir="auto">I had to wait behind still everyone to leave to get to do this myself. I didn't have all the time with the kit but had the materials to my self but unfortunately, the instructor was no longer available to help me out. <p dir="auto">So I had to do some recap to what was taught and made the connections of the LCD to the Arduino and wrote down the codes on the Arduino software application. <p dir="auto">The LCD has 16 pins in the 16 by 2 LCD display module and each have their names. <p dir="auto">Pin 1: GND<br /> Pin 2: Vcc<br /> Pin 3: Contrast Voltage<br /> Pin 4: Register Select<br /> Pin 5: Read/Write<br /> Pin 6: Enable<br /> Pin 7-14: Data pin 0-7<br /> Pin 15: LED positive<br /> Pin 16: LED negative <p dir="auto"><em>I feel this posts would be best made in vlogs and hopefully, I would try raise some funds to get equipments to shoot videos on my practical experience and the necessary items needed. <p dir="auto">To connect the LCD to my Arduino, I used this configuration. <div class="table-responsive"><table> <thead> <tr><th>LCD PINS<th>ARDUINO <tbody> <tr><td>Register Select<td>12 <tr><td>Enable<td>11 <tr><td>Data pin 4<td>5 <tr><td>Data pin 5<td>4 <tr><td>Data pin 6<td>3 <tr><td>Data pin 7<td>2 <p dir="auto">After making the connections, It was left to make the code on the Arduino which I did in the image below. <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23yJ7ri5Mw1U57CB8QWbjC7Mhp63qskMWektYzG35psrJxhoaLZUsYqoAtMokVNHVWkpg.jpg" alt="IMG_20220308_155843.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23yJ7ri5Mw1U57CB8QWbjC7Mhp63qskMWektYzG35psrJxhoaLZUsYqoAtMokVNHVWkpg.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23yJ7ri5Mw1U57CB8QWbjC7Mhp63qskMWektYzG35psrJxhoaLZUsYqoAtMokVNHVWkpg.jpg 2x" /> <p dir="auto">Below is the code written in the screen above. <pre><code>#include <LiquidCrystal.h> LiquidCrystal lcd (12, 11, 5, 4, 3, 2) void setup () { // put your setup code line to run once; lcd.begin (16,2); lcd.setcursor (0,0); lcd.print ("SPEEDVIBE"); } void loop () { // put your main code here, to run repeatedly; lcd.setcursor (5,1); lcd.print ("SPEEDVIBE"); delay (500); } <p dir="auto">After writing down the codes, all I just needed to do was to verify and compile then upload the code to the Arduino which resulted the LCD display of SPEEDVIBE. <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQGQTM5sRDee5WvZrGtkvwTMdPv4CVumXwfegNZPLLy28vZzWXcNrMJXtyxmqh2gY8Q.jpg" alt="IMG_20220308_155850.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQGQTM5sRDee5WvZrGtkvwTMdPv4CVumXwfegNZPLLy28vZzWXcNrMJXtyxmqh2gY8Q.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uQGQTM5sRDee5WvZrGtkvwTMdPv4CVumXwfegNZPLLy28vZzWXcNrMJXtyxmqh2gY8Q.jpg 2x" /> <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uFTgf58fNejmiiZ5JEHvysqjEahFJ6GawtKaBXibvWAFrEnY7g8Sx9p12gN3fDfRK7p.jpg" alt="IMG_20220308_155903.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uFTgf58fNejmiiZ5JEHvysqjEahFJ6GawtKaBXibvWAFrEnY7g8Sx9p12gN3fDfRK7p.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23uFTgf58fNejmiiZ5JEHvysqjEahFJ6GawtKaBXibvWAFrEnY7g8Sx9p12gN3fDfRK7p.jpg 2x" /> <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23vhudEPfpq3v9FUnPWEbbnLHVXTfBgsutWxrBSYWFahwhaGkhaJehurh85kXHXdgKp3K.jpg" alt="IMG_20220308_155933.jpg" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/23vhudEPfpq3v9FUnPWEbbnLHVXTfBgsutWxrBSYWFahwhaGkhaJehurh85kXHXdgKp3K.jpg 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/23vhudEPfpq3v9FUnPWEbbnLHVXTfBgsutWxrBSYWFahwhaGkhaJehurh85kXHXdgKp3K.jpg 2x" /> <p dir="auto">That's all for now, thanks for reading through. <hr /> <h3><center> WHO IS STARSTRINGS01 <hr /> <div class="pull-left"> <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/AJpjYgmLLMHEf33QLuKszQxejJNusbBgCznXMfE873iuW6D4qQPaKMhywmYvpe4.png" alt="image.png" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/AJpjYgmLLMHEf33QLuKszQxejJNusbBgCznXMfE873iuW6D4qQPaKMhywmYvpe4.png 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/AJpjYgmLLMHEf33QLuKszQxejJNusbBgCznXMfE873iuW6D4qQPaKMhywmYvpe4.png 2x" /> <p dir="auto"><sub><em>Starstrings01 AKA Giftedhands is a Hive lover, a Nigeria musician (Guitarist) and also a student who studies Mechatronics Engineering in the Federal University of Agriculture, Abeokuta. <p dir="auto"><sub><em><a href="https://hive.vote/dash.php?trail=newbies-hive&i=1" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">here<span>His goal on Hive is to be more than a regular blogger but something more; someone with a purpose. That’s one of the reasons why he founded the newbies initiative <a href="/@newbies-hive">@newbies-hive to help guide and support newbies. Kindly click <span> to follow <a href="/@newbies-hive">@newbies-hive curation trail. <p dir="auto"><sub><em>He battles and struggles with balancing education and being active on the chain but yet his love and passion for Hive keeps him on balance. <hr /> <p dir="auto"><center><em>All images are mine except indicated otherwise <hr /> <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/nvnkde2T-54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png" alt="54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/nvnkde2T-54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/nvnkde2T-54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png 2x" /><br /> <center> <h4>IF YOU LOVE THIS POST, YOU CAN KINDLY SUPPORT BY YOUR COMMENTS, REBLOG AND UPVOTE. IT WOULD BE MUCH APPRECIATED <p dir="auto"> <p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/nvnkde2T-54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png" alt="54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/starstrings01/nvnkde2T-54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/starstrings01/nvnkde2T-54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png 2x" /> <h5>THANKS FOR VISITING MY BLOG 😇💕
Sort:  

It is a great improvement and good start @starstrings01. And I pray and hope that you get the best out of the automation training as you were promised.

Also regarding the use of LCD with Arduino, I observed that it's a 16x2 LCD display screen as we have bigger LCD like the 20x4 too, to reduce the number pins the LCD takes on the Arduino board and also the use of lots of jumpper wires and variable resistor for adjusting brightness and constract of the LCD, I would suggest u use or checkout I2C LCD driver module which makes it possible to use just 4 pins to interface your LCD with Arduino board which consists of 2 power pins and 2 communication pins easily.

I'm very much open to assisting you in this journey when the need arises. And probably use it as a way of repaying u for the love and support you bestowed me and more.

I wish u success and more developmental growth towards this path 👍.

Yeah exactly, we were told about that driver module with only just two pins.

It's even true that you are in stuffs like this and Moreover, you live in Obantoko. I would like to know your place and even meet your family. I am willing to learn more.


The rewards earned on this comment will go directly to the person sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

nice one boss

Beautiful innovation. Wishing you the best. Well done

Wow, it is a good idea to use the break meaningfully. I was about to ask you how much tou bought it sef. This is the painful part - hardware is just expensive although just as the reward, but before yoi are able to learn the essential parts, monetary power has gone down. Infact, that is what is still delaying me from starting. That is why I delved back to my web scraping classes.