Saturday, March 31, 2018

7 Segment 4 digit display using Arduino MEGA 2560

In this blog we are going to demonstrate how to use 7 segment 4 digit display with a arduino Mega 2560 board.

Parts required:

1. Arduino MEGA 2560 board

2. Bread board















3. 7 Segment 4 digit with 12 pins.






4. Jumper wires.















5. A-Male to B-Male cable















6. 4 220 Ohms resistors (4)
















Step 1: Download the Seven segment display controller library for Arduino : https://github.com/DeanIsMe/SevSeg/archive/master.zip
After downloading place it inside the library folder of your arduino IDE.
Make sure you will see content as follows.


Step2 : Please have a look at the pin diagram of 7 segment display – 4 digit (This is specific to the model i have mentioned above)
  


Really hard to find these details in net.
Now make the circuit as below

Note : Digit Pins
Pin 12 of 7 segment – D1 => pin 13 of arduino
Pin 9 of 7 segment –  D2 => 12 of arduino
Pin 8 of 7 segment -D3 => 11 of arduino
Pin 6 of 7 segment -D4 => 10 of arduino
Pin 11 of 7 segment -a => 2 of arduino
Pin 7 of 7 segment -b=> 3 of arduino
Pin 4 of 7 segment -c=> 4 of arduino
Pin 2 of 7 segment -d=> 5 of arduino
Pin 1 of 7 segment -e  => 6 of arduino
Pin 10 of 7 segment -f => 7 of arduino
Pin 5 of 7 segment -g => 8 of arduino
Pin 3 of 7 segment -p => 9 of arduino
Make sure to add 220 ohms of resistor for D1, d2, d3, d4 pins to regulate the current flow.
open arduino IDE and paste below code. If you need to know how to setup arduino IDE for first time , refer my previous post
/* SevSeg Counter Example
 Edited by Haneef Puttur to match SMA420564 (www.haneefputtur.com)
 Copyright 2014 Dean Reading
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at 
 http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 
 
 This example demonstrates a very simple use of the SevSeg library with a 4
 digit display. It displays a counter that counts up, showing 10 deci-seconds.
 */

#include "SevSeg.h"

SevSeg sevseg; //Instantiate a seven segment controller object

 void setup() {
 byte numDigits = 4; 
 byte digitPins[] = {10, 11, 12, 13};
 byte segmentPins[] = {2, 3, 4, 5, 6, 7, 8, 9};

sevseg.begin(COMMON_CATHODE, numDigits, digitPins, segmentPins); 
// If your display is common anode type, please edit comment above line and uncomment below line
// sevseg.begin(COMMON_ANODE, numDigits, digitPins, segmentPins);
sevseg.setBrightness(90);
}

void loop() {
 static unsigned long timer = millis();
 static int deciSeconds = 0;
 
 if (millis() >= timer) {
 deciSeconds++; // 1000 milliSeconds is equal to 10 deciSecond
 timer += 1000; 
 if (deciSeconds == 10000) { // Reset to 0 after counting for 1000 seconds.
 deciSeconds=0;
 }
 sevseg.setNumber(deciSeconds, 1);
 }

 sevseg.refreshDisplay(); // Must run repeatedly
}

/// END ///
Now compile and upload the program to arduino

upload

Thursday, September 8, 2011

Personal Life in Proffesional Life

This is what I have experienced in the last four to five months. The life of an I.T professional is among the most hectic life on the earth. When you are a fresher , you are like a kite...flying high in the sky...with no limit.You are quite enthusiastic about your new job. Do every thing possible to make impression on ur seniors.Spending most of the time in Canteen and least in the ODC. Planning high for the weekend and then spending ur salary in visiting new places. This is what that remains for the first few months..

Then slowly the scenario changes. One of ur friend gets a project and now he can be no more free to spend time with u. Slowly each of the friend gets into a different project and each one has his PL controlling over him. If they share a flat, then they can luckily share their thoughts at the end of the day...however talks never remain the same. The talks that one consisted of the most beautiful girl in ur office or in ur project...now shift to project module in which they are working , complaining about their PL etc.

The timings too get affected! Gone were the days when you use to come at eleven and leave around five....now you have to come early, and u don't know when u will leave.!Your Strength can be ur biggest weakness. If you performed well in ur project...then that good....but not that good also. This will make an impression that u can handle a lot of work and now u have more work to look into!!Slowly this work makes u frustrated and you are no more the same person that ur friends knew.The frustration happens more coz it cant be expressed on the person on which it should be...moreover ur friends become the victims of that. Then slowly differences starts between friends and good friends now turn to be just friends.Weekends are now only meant for sleeping and paying bills and rent.You plan sumthing big for the coming weekend and then one of ur friend tells that he cannot be with there coz he has to come to office on weekends too!

Sunday, December 26, 2010

Stepping out !!

Till the time you were with your parents, nothing appears to be impossible for you. But the moment you step outside the baby strolly, real picture appears. Food that you use to always complain to ur mom , now you would pay anything to get it. The scolding of parents now appears to be the real lessons of life. You wont have anyone to always scream at you to take ur lunch and dinner at time.

If you are fortunate than u might be posted in the same region where u were born , and if not than get ready for some AWWWWWful experience. Especially if u are a north Indian and u have been posted to a southern part of the Country than its even worse. The next very thing that may trouble you is the language. Believe me , I spend two and a half hour just to buy a sim card. He didn’t knew hindi and his English was nothing less than that of queen Victoria!! At the end I had to get my mobile recharged from one another shop becoz that person was making me completely mad. People in south , are very much in promoting in their mother language. Even if you try to speak in English to an educated person , he would speak one or two Keral word which may lead you to think that was there any such word in English ?

Whenever you go a restaurant , the first thing that you ask for is water. But here also there is something in store for u . They present before you hot pink coloured water. Ya but one thing that’s good here is that NoN-VEG here is really cheap. Though the quality is not as good as Nawabon ka Shehar(Lucknow) , but atleast better than the veg preparations !!. The rice here consumed is called Sortex rice. It is much thick than the usual basmati rice. So before you take it , think twice. The paratha here is called as parotha….made from maida and very similar to laccha paratha .

Now moving to people and there behavior. People here are quite honest and very punctual . If you are posted together with ur friend than it’s the right time to test their friendship. When the real world problems would appear, then only you would be able to find who is your real friend and who is friend only for the name. People may appear to be ur friend in college days , have good time in roaming here and there but were they really with you when u really needed them ? If yes than is the the only friend that u may always trust, otherwise its better to keep a distance with such people.

So , always act as you have been alone in this world. Have trust but never trust blindly on anyone. This would not only make you responsible , but also help you to survive better in the world.

Hi Everyone !!
This is my first blog after comming to Trivandrum. Nice place situated in God's own country , Kerala. The first week started with the visit holiday at Eid. Me along with my friends went to Kovallam beach. My first visit to beach. Enjoyed it a lot .

Tuesday, September 28, 2010

Joining

Last but not the least ....my joining has finally arrived!! Now the thing to notice is that am I happy with it or am I sad !! Happy bcoz after sem. result this is the next very thing that I have been waiting for a long time . And the reason for my sadness accounts to is the final depart from the college friends , My Parents , Colony Friends , School friends , special friends , irritating friends and the lovely people who always thought that I was always the cause of a conflict. Will be missing a lot...Lucknow ka nono-veg , Mummy ki daat , doston ka saath , My dear Julie n Bruno , Apna College, Wo taechers............apna School . Its like after 23 yrs u are ask to start your life again from a scratch ! I have always been tried to be a nice person but hamesha trageday ho jaati hai....I may also be remembered for those tragedies.!! I always use to pray ki kuch bhi ho but lko joining na aye...tab ye soch kar khush tha ki ab yahan se bahar niklane ko milega...but ab chhodne ka dil nahin kar raha hai !! Bas gum is baat ka rahega ki I was not able to express myself to the right person at right time....aur kiya bhi to wo samjhe nahin....now this topic ends here . Me getting a little bit senti.!! wait for my next post !!

Monday, September 27, 2010

Learning leads to success

The first step to success...the learning. Weather its ur studies or any other activity, all it requires is the Learning. Many a times we just find the learning a tiering job and give in between coz we are not use of putting so much effort in our work . I f that happens with u , then all u need is a little bit of dedication. Just think of the environment after you have achieved for what u have been working so hard . It might just bring a smile on ur face . Now your that very smile is the ADRENALIN that boost you to perform better . " SUCCESS IS A JOURNEY NOT A DESTINATION " I just dont know who said this but whoever said it is absolutely true . But whats a journey without a destination ? The journey is very hard , in ur way u will meet people who are there to misguide u , to make ur Morale down , but you should be firm in believing urself . At times you will also meet people who might just motivate you . Its like we all are the wheels that are moving on the road called life . Evey wheel is capable of moving by its own . But if two Wheels(people) are together , they not just balance each other but provide an extra pace too. The person can be ur friend or ur loved ones. This very person now becomes the reason of ur Success. Every time you achieve something..the smile would be not only on ur face but on her/his face too. I happens with me also. Its always been her that really motivates me to do better . Ups and down are like sumthing that all of us face early or later . But we should always m,ake it a reason for ur success not for a failure .

Always remember that life is beautiful and Success is simple. Do what's right, the right way, at the right time.

"Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success, that is the way great spiritual giants are produced." - Swami Vivekananda

Sunday, August 22, 2010

The Work

Finally the college is over, and u are in the job. No more roaming with the friends , watching movies , attending lectures n no more sleeping till late in the morning !! And if its a Night shift ..its like bell in the hell. Its not like u cant sit infront of ur system for whole night , but sitting idle for hours and waiting for one single call that starts ur sale is like something horrible. Who says man that a BPO job is the easiest one and any one can get int it. It takes 3 bloody shit interviews for u to finally be on the floor and after that waking up till the morning until ur shift is over. While spending money never thought that it was earned with such a effort. Hanging up the calls from ur mobile network sales executive is such a easy but u are in his place then u get the real pictures of what he faced . People say that being in a BPO job is such a cheap thing ....but what I say is that a person become cheap by the way he thinks and not by the work he do. No work is small or big....its ur thinking that distinguishes into them....Seen a person earning Rs 14000 in a Technical field and a BPO person cashing Rs 35000 in a month !!HUh !!

Raspberry Pi with Pi Camera

Raspberry Pi with Pi Camera In this module, I will describe on how to connect and use Pi Camera with Raspberry Pi. Requirements: ...