Showing posts with label Raspberrypi. Show all posts
Showing posts with label Raspberrypi. Show all posts

Wednesday, 12 July 2017

Raspberrypi setup

Prerequisite:

1) Raspberry Pi device with data cable.
2) Card reader
3) Micro SD card. Here is the compatible documentation
4) A monitor with an HDMI interface
5) HDMI cable
6) USB keyboard
7) USB Mouse
8) Ethernet Cable [Optional]

Following are the steps to move with: 

1) Format SD card:
    Recommended way to format  by SD Card Formatter, you can download it from here

2) Let say we have to load RASPBIAN image onto SD Card, download image from here
 
3) Now its time to load image on SD Card

4) Open a MAC terminal window and then run command: diskutil list

5) Identify your removable drive device address, it will probably be look like the ones below:



/dev/disk0

#: TYPE NAME        SIZE       IDENTIFIER

0:GUID_partition_scheme *500.3 GB   disk0


/dev/disk2

#: TYPE NAME         SIZE     IDENTIFIER

0: Macintosh HD  *378.1 GB   disk1
 Logical Volume on disk0s2
   DAB8DF9E23-A4RR-420D-00R1-FRT67WE
Unlocked Encrypted

/dev/disk3
  #:       TYPE NAME     SIZE       IDENTIFIER
  0:  FDisk_partition_scheme *7.9 GB     disk3
    1:   DOS_FAT_32 AJ     7.9 GB     disk3s1


Note that your removable drive must be DOS_FAT_32 formatted. In this example, /dev/disk3 is the drive address of an 8GB SD card.

6) Unmount your SD card via command: diskutil unmountDisk <drive address>

7) When successful, you should see a message similar to this one:

Unmount of all volumes on <drive address> was successful

8) You can now copy/load the image onto SD card, using the following command:

sudo dd bs=32m if=<image file path> of=<drive address>

Thereafter you will see the following message output and also by pressing Ctrl+t you can see like below records in/out bytes

3420+1 records in
3420+1 records out
286665744 bytes transferred in 524.761215 secs (5069924 bytes/sec)

9) Now you can eject your removable drive. You are ready to install RASPBIAN image on your device.

In Part Two we will learn about how to use SSH and VNC as a virtually desktop on MACOSX.


Friday, 9 June 2017

Raspberry Pi : SSH and VNC : Virtual Desktop on your mac

In previous tutorial we have learnt How to raspberrypi setup?

Now its time to see its display for Raspberry Pi with Laptop. Below steps are with Macbook

1) Open a Terminal in RaspberryPi
   Enable SSH and VNC either from sudo rasp-config or Preferences=>Raspberry Pi Configuration => Interfaces

2) ifconfig and find ip address

3) Open Mac Terminal
  Connect via SSH ssh pi@192.168.1.236
  password: raspberry (by default)

  Now you will see you are connected to pi@raspberrypi:~ $

4) Now its time to get update packages, tightvnc server
   sudo apt-get update
   sudo apt-get install xrdp
   sudo apt-get install tightvncserver

5) cd .config

6) mkdir autostart
   nano tighvnc.desktop

   [Desktop Entry]
   Type=Application
   Name=TightVNC
   Exec=vncviewer :1
   StartupNotify=false

  save contents with above lines in same file.

7) cd /home/pi

8) Run tightvncserver

9) Download Chicken VNC client on macosx & connect with
    host:192.168.1.236
    Display: 1
    Password: raspberry(by default)

Now you are able to see Macintosh as Display for a Raspberry Pi.

Cheers!