Tuesday, April 3, 2018

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:

1. Raspberry Pi .



2.  HDMI Cable connected to a TV/ Monitor.

3. A Raspberry Pi , Pi NoIR V2 Camera.


4. A  wired keyboard.



5. A wired USB mouse.




Connecting Pi camera with Raspberry Pi:


1. Follow the steps on my previous blog on how to connect a Raspberry Pi with Smart TV here .

2.  Open up your Raspberry Pi Camera module. Be aware that the camera can be damaged by static electricity. Before removing the camera from its grey anti-static bag, make sure you have discharged yourself by touching an earthed object (e.g. a radiator or PC Chassis).

3.  Install the Raspberry Pi Camera module by inserting the cable into the Raspberry Pi. The cable slots into the connector situated between the Ethernet and HDMI ports, with the silver connectors facing the HDMI port.


4. Boot up your Raspberry Pi.

5. From the prompt, run "sudo raspi-config". If the "camera" option is not listed, you will need to run a few commands to update your Raspberry Pi. Run "sudo apt-get update" and "sudo apt-get upgrade".

6. Run "sudo raspi-config" again - you should now see the "camera" option.


7.  Select Interfacing Options.



8. Select Camera



8.  Enable the Camera.



9.  Select “Finish” and reboot your Raspberry Pi.

Launching camera to take pictures:


Pictures can be taken via two ways:

      1.  By command  line interface "raspistill".(Needs no programming knowledge)

This is inbuilt command interface that can be used to take pictures wthout any prior knowledge of any programming language. To capture an image in jpeg format, type "raspistill -o image.jpg" at the prompt, where "image" is the name of your image.

      2.  By python script.

Steps:


      a.)  From the Pi Home screen launch the terminal.

      b.)  Run "cd Desktop/" and then "nano cameraexample.py"

      
      c.)  Type the below code into the editor and save it.


import time import picamera camera = picamera.PiCamera() camera.Capture('image.jpg')

Note: Follow the link https://wiki.gentoo.org/wiki/Nano/Basics_Guide if you are a newbie to nano editor.

  d. ) Save the file and from terminal Run "python cameraexample.py". You will now see a image file created with the name "image.jpg" on the Desktop. Open this file. This is your captured image.



Raspberry Pi with Samsung Smart TV

Raspberry Pi with Samsung Smart TV


In this blog, I will cover about steps to connect  Samsung Smart TV with Raspberry Pi .

Requirements:

 1. Samsung Smart TV with connected HDMI cable.

2.  Raspberry Pi module 

3.  A 5V micro USB power supply to power your Raspberry Pi. Be careful that whatever power supply you use outputs at least 5V; insufficient power will cause your Pi to behave in strange ways.

4. A USB wired keyboard.

5. A USB wired mouse.


Set Up:

  1. Download the NOOBS software from here.
  2. Extract the folder . It should look something like this:
        
       3. Format your SD Card with  SD Memory Card Formatter . (Note: You can  use any                 SD Card formatting tool or do it manually via Windows/Mac/Linux disk 
           management tool.)

      4. In the formatted SD Card, copy all the contents (as seen above) , in the SD Card.

      5. Insert the SD Card into the card slot on the Pi .

      6. Connect the HDMI cable (from the TV) to Pi HDMI slot.

      7. Switch on the TV and select Source as the HDMI cable connected. You might see a               "Unknown"next to the HDMI slot. This is your Raspberry Pi. Select this HDMI as        
          source.

      8. The complete Setup should look like this:



If you have any queries or issue in above issues. please add your comment below in the comment section



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 !!

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: ...