Here download the UF2 file , which is USB Flashing Format by Microsoft.
UF2 files can be opened and edited using a variety of Microsoft MakeCode editors.
To transfer a UF2 file to a microcontroller, developers plug their microcontroller into their PC’s USB drive. Their PC then recognizes the microcontroller as a FLASH DRIVE, allowing the developer to drag their UF2 file to the microcontroller and install their MakeCode program.
Drag and Drop the UF2 file on to RPI-RP2.
RPI-RP2 now disappears indicating Micropython installation is complete.
If you open the Device Manager , PICO appears as USB SERIAL DEVICE and a COM port is allotted.
7 HDMI display with capacitive touchscreen is now available with resolution 1024 x 600 pixels.
The touch panel supports up to 5 touch points. And it adopts free-driver technology, no special requirement of drivers.
There is no need for external power supply for the screen, it can be powered by USB port and HDMI port from Raspberry PI.
Operating Voltage: 5V
Operating Current: 160mA
Maximum Operating current: 1200mA (with HDMI connection)
Refresh Frequency: 43Hz – 60Hz
Screen Resolution: 1024×600
Video Interface: HDMI
Supports Raspbian,Raspberry PI OS ,5-points touch, driver free.
Previous models are TFT displays.TFT stands for the thin-film transistor, which is just another kind of liquid crystal display.One of the major shortcomings of using TFT is that it does not offer a good level of visibility.
This new display is IPS . In-Plane Switching
IPS panels seek to solve TFT panels’ issues of poor color reproduction and viewing angles. In this regard, IPS panels have largely succeed. Not only do they offer a higher contrast ratio (superior blacks), high color accuracy , but IPS panels also have very little color shift when changing the viewing angles.
Hence, with this technology, you can view the screen from much wider angles and sides without experiencing unwanted blurriness and grayscale.
The negative point about IPS panel is their poor response rates and lower possible refresh rates, IPS panels are generally not considered for competitive gameplay
WAVESHARE make is original
On the back side left top is the HDMI connector.Below that is the micro USB socket for power and touch.This USB can be connected to one of the USB ports of RPI.
A mini slide switch is there for display ON / OFF.
A HDMI cable , USB to micro usb cable and a HDMI micro converter ( used for RPI 4 models)
are provided with the display.
Clone or Copy models similar to Waveshare are also available in the market.
Clone display has 2 micro usb sockets , one for power & the other for both power & touch.
WaveShare original has EMI and ESD protection near the HDMI socket
Also the original one has USB protocol translator, converting the touch signal into standard multi-points touch protocol to achieve smooth multi-points touch control.
Before connecting the display to Raspberry PI , prepare the Operating System for PI.
Download the latest RASPBERRY PI OS ( previously called Raspbian) from
Once the image is written on SD card , if you re plug the card reader to pc, you can see the BOOT partition . The ROOT partition is not visible on Windows machine.
Right click on empty space and create a new TEXT document.Name it as ssh.txt
Then delete the .txt extension , so that only a file named ssh exists without any extension.
On next boot on RPI , the SSH is enabled and the file named ssh will be deleted automatically.
Next we need to modify the config.txt file to enable view on display.
Open config.txt file.
Scroll to the end of file and add following commands.
As we power the display from USB of RPI , we need to boost the current source capacity of USB port of RPI.
This is achieved by
max_usb_current=1
which makes USB current source to maximum of 1.2 amp
Setting a specific HDMI mode is done using the hdmi_group and hdmi_mode config.txt entries.
The group entry selects between CEA or DMT, and the mode selects the resolution and frame rate.
hdmi_group=2
hdmi_mode=87
To set a custom display mode we use 87 for mode.
HDMI output group is set to 2 which represents DMT (Display Monitor Timings, the standard typically used by monitors)
Then define a custom CVT — Coordinated Video Timings
enables the ignoring of EDID/display data if your display does not have an accurate EDID. It requires this unusual value to ensure that it is not triggered accidentally.
HDMI_BOOST increases the amplitude and/or pre emphasis of the HDMI signal.
For long HDMI cables use value 7 or 11.
Save the CONFIG.TXT file.
Remove the SD card and plug it to RPI.
Connect HDMI cable between HDMI ports.
Connect the micro usb cable to touch port of display and the other end to one of the USB ports of RPI.
Use a power adapter of 5v and ampere more than 2 amps
Switch on the power to see the display booting up to welcome screen of RPI.
TOUCH functions work without any installation of drivers.
You can also set the SD card for auto connect with WIFI , and also you can install Match box keyboard for on screen keyboard.
Node-RED is an example of a flow-based programming model .NODE RED is a powerful tool for building Internet of Things (IoT) applications by simply connecting & wiring together of code blocks & carry out tasks.It uses a visual programming approach that allows developers to connect predefined code blocks, known as ‘nodes’, together to perform a task.
The connected nodes, usually a combination of input nodes, processing nodes and output nodes, when wired together, make up a ‘flows’. Flows consist of multiple nodes wired together, with output tabs linked to input tabs of the next node in the flow. Messages flow along the nodes carrying data from node to node.
Today there is a vibrant user and developer community, with a core group working on the Node-RED code itself and most developers contributing nodes or flows to the flow library.
In this post we use Raspberry PI 4 as hardware with Rasbian BURST OS & demonstrate a flow to control an LED connected to a GPIO pin of RPI.
Node RED is PRE-installed in Raspbian operating system by default.
I’m accessing RPI from my Windows machine over WI-FI.
Both RPI & Windows PC are connected over WIFI to same Router.XRDP is installed on RPI & from Windows machine access is through Remote Desktop.
You can check out my previous blog on how to do this.
This script will remove the pre-packaged version of Node-RED and Node.js if they are present &
install the current Node.js LTS release using the NodeSource.
It also installs the latest version of Node-RED using npm ,setup Node-RED to run as a service and provide a set of commands to work with the service
This action will take around 10 minutes.
Auto start on boot
——————–
If you want Node-RED to run when the Pi is turned on, or re-booted, you can enable the service to autostart by running the command:
sudo systemctl enable nodered.service
To disable the service, run the command:
sudo systemctl disable nodered.service
To start NODE RED by clicking on NODE RED under Programming.As it starts running you can see an IP address link ending :1880 which is the default port of Nodered.
Once Node-RED is running you can access the editor in a browser.
If you are using the built in browser on the Pi desktop, you can open the address:
Now the NODE RED Window opens with colored NODES on the left side Palette.Center portion is the Flow Canvas where you create the flow by dragging in the nodes.Right side pane is for INFO & dEBUG MESSAGES.
Scroll down the nodes to locate Raspberry PI.
rpi gpio node is frequently used to control GPIO Pins of RPI , which has 2 options.
One with the RPI icon to left of node is INPUT node (like button input) & the other with icon to Right is for OUTPUT node (like LED control).
Input nodes allow you to input data into a Node-RED application or “flow”. They have at least one output endpoint represented by the small grey square only on their right side. You use input nodes to connect data from other services, for example the Twitter, Google, serial, websockets or tcp nodes, or to manually input data into a flow using the inject node.
Output nodes allow you to send data outside of a Node-RED flow. They have a single input endpoint on their left side. You use output nodes to send data to other services, for example via Twitter, tcp, serial or email nodes, or to use the debug node to output to the debug pane
In this demo we control an LED connected to GPIO pin17 of RPI.
For this task we need an OUTPUT Node.
Drag an Output Node to the canvas.
The output node with name PIN: is displayed with one RED triangle & a BLUE Circle over RPI icon.
The red triangle indicates that the properties are not yet set & the blue circle indicates that the node is not yet deployed to server.
Double click on the Node to get PROPERTIES window.
As we have connected an LED at GPIO 17 (PIN 11) , select this pin.
Select the type as DIGITAL OUTPUT.
Leave the Initial level of pin as LOW & provide a name as Red Led
Click on DONE to see the RED Triangle disappear.
As we have not yet Deployed the node , the Blue circle remains.
To feed a message we need an Input node like INJECT.
Drag and drop Inject node.It appears as timestamp node with a Grey button on left folloed by an Arrow.
Double click on this Inject node to set properties.
Under PayLoad select String.
Provide value of Payload as 1 & give a name as ON.
This is to inject 1 to RPI output node to make LED ON.
Click Done.
Now drag on the small grey circle seen to the right of our ON inject node & connect to the RPI node Red Led.
The nodes for switching ON the LED are ready now.
Next we need to create a node to switch OFF the LED.
Drag an input INJECT node again.
Double click on this node and set the PayLoad String to 0.
Provide a name , like OFF.
Connect the OFF node to Red Led node .
Now the FLOW is ready to be DEPLOYED.
Click ON the red DEPLOY button on top right corner.
The blue circles on Nodes disappear & you get Successfully Deployed message.
Click on the Grey square button seen to the left of ON node.
This injects a String 1 to Red Led node , making the LED at gpio17 ON.
To make the LED OFF , click the grey button of OFF node.This injects string 0 , switching OFF the LED.
You can see the string o at the bottom of Red Led node when it receives the payload.
Next drag a DEBUG node from Output list.
No properties setting for this node.Just connect both the ON & OFF nodes to the
debug node (msg payload)
At the right top click on the DEBUG icon to see the debug messages.
Clicking on the ON or OFF nodes will control the LED , as well display the debug messages.
Next we shall add a BUTTON to control LED.
Remove the ON & OFF nodes we created earlier , by selecting the node and hitting Delete button.
Drag and drop an Input GPIO node from Raspberry PI list.
Double click on node to set properties.
Select GPIO 13 , as we connect a button to this GPIO pin.
The LED is connected to GPIO 17 as shown below.
A 2 leg reset button is used , one end of button goes to 3.3v & the other end through a resistor to GND.
The junction point is connected to GPIO 13.
Under properties select PULL DOWN , which applies an internal resistor to GND to the button.For safety we use an external resistor too.
Select Read initial state of pin & provide a name as Button.
Connect the node to Red Led node & Click on Deploy.
When the button is pressed a HIGH is applied to GPIO 13 , which in turn switches ON the LED ta GPIO 17.
To import new NODES or to install DASHBOARD click on settings button next to Deploy button & select MANAGE PALETTE.
To search for new nodes , you can click on NODES & download.
To install dashboard , click the install button & search for dashboard.
Select node red dashboard & install.
Node-RED Dashboard is a module that provides set of nodes to create a live data dashboard.
To open the Node-RED UI, type your Raspberry Pi IP address in a web browser
followed by :1880/ui
With Dashboard you can select your own nodes and create your own User Interface.
To access the settings file of Node Red
use command
ls –a
to list hidden files.
Then change directory to .node-red
Here you can see the settings.js file where you can provide password for access to node red.
In Raspberry PI 3 & 4 the physical UART at GPIO14/GPIO15 is disabled.
In new machines the mapping is as follows.
/dev/ttyAMA0 -> Bluetooth
/dev/ttyS0 -> GPIO serial port (referred to as the “mini uart”) disabled by default.
The powerful ttyAMA0 is assigned to Bluetooth & the limited frequency ttyS0 is assigned to UART.
Board pin 8 (GPIO14) Tx
Board pin 10 (GPIO15) Rx
older Raspberry Pi it will point to the hardware UART and /dev/ttyAMA0
In this post , let us see how to enable UART and then overcome the Permission denied problem by swapping the ttyAMA0 & ttyS0.
While connecting the GSM with RPI use level shifter, as the TTL level of PI is 3.3 volt & that of GSM is 5v.
The Tx of PI (physical pin 8) goes directly to Rx of GSM. As GSM accepts 3.3v as High, you can connect this straight .
But the Rx (physical pin 10) pin needs alevel shifter before connecting to Tx of GSM
A simple 1k resistor in series and a 2k2 to GND will solve the purpose.
To enable the serial0 edit config.txt file using nano editor.
Navigate to the end of file and add
enable_uart=1
ctrl+x & Yes to save the file
use command
ls –l /dev
to read the devices.You can see serial0 is now enabled and mapped to ttyS0.
Open picocom to communicate with GSM
picocom –baud 9600 /dev/ttyS0
Permission is Denied.
You can change permissions with sudo chmod command.But on next reboot this will change.
Also assigning groups dialout & tty to user PI does not help.
In Raspberry Pi , you can use the serial port as a terminal to log in.
Even if you don’t have a network connection,you can connect to another computer via their serial ports and run a terminal software like putty on the other computer to get a login prompt.
By default the Raspberry Pi uses the serial port for this “console” login
and via a software service called “getty”.
if we want to use the serial port to get data from a GPS or GSM, we need to disable
the console login so that gsm/gps alone get control of the port.
In this article we will explore the ways to auto connect Raspberry PI to WIFI and control it from a Windows machine.
In this demo I use RASPBERRY PI 4 2 GB board , but the method applies to all versions with WIFI ,
RPI 3 B , B+ & RPI Zero W.
There is no need to connect any Ethernet cable to PI .The keyboard , display of Windows machine are used to control RPI. This is called HEADLESS MODE of operation.
This post will get you up and running with a Raspberry Pi, connected to your WIFI network and accessible over SSH, without ever needing to connect anything to it, besides power source.
RPI 4 comes in 3 variables with 1GB , 2GB or 4GB RAM. This has 2 USB 3.0 & 2 USB 2.0 ports , a Gigabyte Ethernet port & 2 micro HDMI 4k support ports.
The power cable to be used is C type which can handle more current .
To start with download the latest Raspbian OS image from the official website:
You now have the latest Raspbian image ( BUSTER at the time of this blog) which is ready to boot, but not yet ready to fully work headless!
Remove the card reader with SD card and plug it again .The Windows system can display only the BOOT partition . The ROOT partition is not visible.
Prepare to Connect WIFI
To make the Pi connect to your Wifi access point at first boot, store the wifi connection details on the Pi’s boot drive.
Following to be done on Windows system.
Under boot partition of SD card , you need to create a file named wpa_supplicant.conf.
Before this , click on View & put a tick mark against File Name Extensions.
This enables to view the extension of filenames.
Right click on empty space and create a new Text document.
Rename the text document to wpa_supplicant.conf.txt.
Double click the file to open in Notepad.Remember , the file name is now with .txt extension , so that it is open with Notepad.Later you need to delete this .txt extension .
Visit this official site to copy and paste the WIFI code.
Relay module boards play an important role in Home automation projects. Generally we connect the load ( fan,light,etc…) to be controlled through the Relay contacts . While is the relay is controlled ON/OFF , IN TURN the load is controlled through the relay contacts.
Different types of relay modules are available .
In this post we explore the best Relay module suitable to use with Raspberry PI.
Relay modules are available in 12v & 5v .The best one for RPI is 5V Relay Module with Opto coupler drive.
This type of relay boards have opto coupler & NPN transistor to control the relays. Each relay is controlled by an opto+transistor combInation.
When a LOW is applied to INPUT , say IN1 , the photo diode inside optocoupler conducts which in turn activates the photo transistor inside the opto.
The NPN TRANSISTOR after the opto coupler is triggered which in turn switches ON the relay.
On board a Jumper is provided between JD_VCC & Vcc .While the jumper is ON & Vcc is provided with 5v , the board operates normally. When LOW is at input , the relay is ON. The problem arises when connected to RPI whose GPIO pins are at 3.3v level.
When a HIGH is applied from RPI , THERE WILL BE POTENTIAL DIFFERENCE OF 5V – 3.3V = 1.7V which causes the board relay to chatter or malfunction.
So while using with Raspberry PI always remove the jumper & provide 5V to JD_VCC & 3.3V to Vcc.
Both these voltages can be directly connected from the RPI itself. No separate power source required for Relay board. In RPI 3.3V is capable of only 50 milli amp sourcing current.
This 3.3v is connected to Vcc of Relay board which drives only the photo diode of opto coupler.So a small current is enough.
The 5V rail of RPI is capable of sourcing much more current. It depends on the power adapter used for RPI less the current consumed by the RPI itself . 500MilliAmps can be easily sourced at this 5v point of RPI.
Let us now connect PI with 4 channel relay board.
RELAY BOARD RPI
JD_VCC 5v
VCC 3.3V
IN1 Pin 32
GND GND
Ethernet cable is connected between PC & RPI,& PI is accessed from PC through SSH client PUTTY
Refer my previous blog on how to access PI from PC
LOG IN using default user name pi &password raspberry
To test python commands start the python interpreter by typing command
python3
By default, Raspbian Stretch version uses Python 2. However, versions 2 and 3 come installed by default. We just have to make 1 minor change so that the Pi uses Python 3 whenever we type python into a terminal.
In a terminal window, enter the following command:
nano ~/.bashrc
Scroll down to the bottom, and add the following command to the file:
alias python=’/usr/bin/python3′
Exit out of nano by pressing ctrl+x, press the y key when prompted if you want to save the file, and press the enter key.
you can run the contents of the .bashrc script by entering:
source ~/.bashrc
Now check the version of Python
python –version
Just type in python to get the INTERPRETER symbol >>>
Now you can test python commands one by one.
First import RPi.GPIO module
import RPi.GPIO as GPIO
Functions are called Modules in Python. Note the casing of letters used RP in capitals & i in small case .We also use alias name GPIO , so that further in code you just need to mention GPIO instad of RPi.GPIO
To specify which pin configuration you are using type
GPIO.setmode(GPIO.BOARD)
There are two ways of numbering the IO pins on a Raspberry Pi within RPi.GPIO. The first is using the BOARD numbering system. This refers to the pin numbers on the P1 header of the Raspberry Pi board. The advantage of using this numbering system is that your hardware will always work, regardless of the board revision of the RPi. You will not need to rewire your connector or change your code.
The second numbering system is the BCM numbers. This is a lower level way of working – it refers to the channel numbers on the Broadcom SOC. You have to always work with a diagram of which channel number goes to which pin on the RPi board. Your script could break between revisions of Raspberry Pi boards.
To detect which pin numbering system has been set (for example, by another Python module):
mode = GPIO.getmode()
The mode will be GPIO.BOARD, GPIO.BCM or None
Physical pin 32 is set as OUTPUT using
GPIO.setup(32,GPIO.OUT)
Pin 32 is initially made HIGH so that relay is OFF
GPIO.output(32,GPIO.HIGH)
To make the Relay ON , set pin 32 to LOW
GPIO.output(32,GPIO.LOW)
At the end any program, it is good practice to clean up any resources you might have used.
To clean up at the end of your script:
GPIO.cleanup()
Note that GPIO.cleanup() also clears the pin numbering system in use.
Now let us connect other Relay inputs to RPI
PIN 36 to IN2
PIN 38 to IN3
PIN 40 toIN4
Open NANO editor by typing
sudo nano relay.py
Feed in the following code.
Note the usage of Indentation for try block.
You can press TAB key to introduce blank space indentation whichis equal to braces in PYTHON.
This post is on interfacing GSM with Raspberry PI 3 B or B+.
UART is commonly used on the Pi as a convenient way to control it over the GPIO, or access the kernel boot messages from the serial console (enabled by default).
It can also be used as a way to interface GSM / GPS /Arduino / ESP8266, etc with your Pi.
Be careful with logic-levels between the devices , for example the Pi is 3.3v and the GSM is 5v.
In the previous versions of PI GPIO Serial port is mapped to /dev/ttyAMA0
(COM1 equivalent is found on pins 14 and 15 of the GPIO header and is called /dev/ttyAMA0 )
But in PI 3 B or B+ this hardware port has been utilized for the BLUETOOTH Functionality.
/dev/ttyAMA0 is a hardware , high performance serial port (uart) & used for the Bluetooth
A second port is partly software /dev/ttyS0 & is assigned to GPIO Serial port.
So , the ports on a Raspberry Pi 3 are
——————————————————–
/dev/ttyAMA0 -> Bluetooth /dev/ttyS0 -> GPIO serial port (referred to as the “mini uart”).
————————————————–
Thus on a Raspberry Pi 3 serial0 will point to GPIO pins 14 and 15 and use the “mini-uart” ( /dev/ttyS0).
On older Raspberry Pi’s it will point to the hardware UART and /dev/ttyAMA0.
To start with write the RASPBIAN image OS on a class 10 memory card using ETCHER
Use the SD card on RPI 3 & log in
To know the Serial ports enabled , type in
cd /dev & then ls –l
You can see only the ttyAMA0 is enabled & not the mini uart ttyS0
The GPIO serial port is disabled by default. In order to enable it, edit config.txt:
$ sudo nano /boot/config.txt
and add the line (at the bottom):
enable_uart=1
Reboot for the changes to take effect.
Restart the Putty SSH
Now check the cd /dev , ls –l again
You can see both the ports enabled. Note that this can be done through raspi-config also.
Let us connect the GSM with PI now.
The logic levels of PI are at 3.3 volts & it is risky to connect directly with a 5v level GSM pin.
The Tx pin (pin 8 , GPIO14) of PI can be directly connected to Rx of GSM. As GSM accepts 3.3volt level as high , this connection is straight without level shifting.
However the Rx pin (pin 10, GPIO 15) of PI cannot be connected directly to Tx of GSM.
A simple level shifter using a signal diode 1N4148 & a 10k resistor is used in between as shown below
LOGIC LEVEL SHIFTER
When the level at GSM Tx is LOW , the diode is forward biased & the Rx of PI gets LOW.
When the level at GSM Tx is HIGH ,the diode is Reverse biased & the 3.3v is available at Rx of PI through the resistor.
A separate power source 12v 1 amp is required for GSM , and the GND pins of PI & GSM are made common.
Be cautious while connecting with PI pins , as any wrong connection will render the PI defective.
After powering the GSM wait for the network. The network LED blinks fast initially & after getting Network it blinks slowly.
You can also call to the SIM number used on the GSM to get a ring back tone.
Now the set upis ready.
Let us install a Serial monitor called picocom on PI to test the AT commands.
Start the picocom with baud rate 9600 & at portttyS0
picocom –baud 9600 /dev/ttyS0
Note the double hyphen before baud .
You get Terminal Ready
after which you can type in AT to get an OK response.
If you cannot seewhat you type,or if no response then check the GSM for network &also check the port name you’ve typed.
It must be /dev/ttyS0 . S is capital letter & then zero.
Now you can make a call using ATDxxxxx; command , terminate a call using ATH
Send SMS using AT+CMGF=1 , & test other AT commands
Now let us use PYTHON to make a call.
Open a file named dial.py using
sudo nano dial.py
Type in following code & then CTRL+X , to exit & Yes to save.
While using AT command inside Python code , notice the usage of carriage return
\r after each command like ATDxxx; \r
To execute the file
python dial.py
You can see the number being called & then hangs up using ATH command.
Now let us create a python code for sending SMS.
Notice the usage of double quotes for sending AT commands
Also, note that single quotes used if the AT command needs to send double quotes
as in AT+CMGS command
To execute type in
python sms.py
You can see the sms being sent to the phone number used in code.
At times , the PI is not recognized , or unable to contact over SSH in this method.
Let us see the DIRECT NETWORK LINK method In this post which is 100% reliable.Cons is that network internet is not shared.But this is not an issue , as PI3 is WIFI capable through which you can connect to internet.
To start with , place the SD card ( class 10 type recommended ) with Raspbian OS on to a Card Reader
The card will be shown as boot drive.Open it.
Under View , un tick the option “ File Name Extension”
Now Right click on empty space & create a new text document.
Rename it to ssh & save it.
Now a file named ssh is created without any file extension
When the card is now used on RPI, on first boot the OS will look out for the ssh file name.If it finds one , it enables secure shell & then delete the file named ssh.
This is how SSH is enabled in a Headless mode operation of RPI.
Place the SD card on to PI & power it up.
Now Open Network& Sharing center on your Windows PC.
Connect the Ethernet port of RPI to the Ethernet port of your PC using a STRAIGHT RJ45 Cable.
An Unidentified Network is created for the Ethernet adapter where PI is connected .
Click on the Network connection type ,( here mine is WIFI.)
Click properties
Under SHARING Tab un tick the options so that Network sharing is DISABLED.
Click on the ETHERNET connection & then Properties on next window.
Double click Internet Protocol 4 & ensure that DHCP is enabled i.e, Obtain IP address automatically is selected.
For a network link to work between two computers they need to be using the same address range.
The allowable address range is determined by the subnet mask.
255.255.0.0 means all octets in addresses should be same except for the last two in the IP address,otherwise they will be filtered.
Most PCs connected directly to another computer will allocate an IP address in the range 169.254.x.x ( with subnet mask of 255.255.0.0)
For RPI to be able to communicate through the direct link it needs to have a fixed IP address in the same address range 169.254.x.x
We can set this in the cmdline.txt file
To know the IP allotted to the ETHERNET adapter
Open Command Prompt ,CMD
Type in ipconfig /all
Scroll down to find the IP under Ethernet adapter.
Here it is 169.254.192.43
which is the Gateway IP of Ethernet adapter.Any device connected to this port should have the IP in range 169.254.192.x
As we’ve connected the PI to Ethernet adapter let us assign the IP toPI as
169.254.192.150
Note that the last octet can be anything up to 255.
The static IP to PI is assigned as follows :
Switch off power to PI ,remove SD card & place it on a card reader.
Generally Raspberry PI is connected to a Router as an individual computer.In case you do not have access to your Router you can very well connect PI to Laptop through an ETHERNET STRAIGHT Cable.
The available RJ45 cable in the market is mostly STRAIGHT cable & not CROSS OVER one.
Before connecting the PI to Laptop , open your Network & sharing center & click on your Internet connection.Mine is on Wireless Network
On the next screen click on the properties button.
Under SHARING tab Tick mark “Allow other network users…..”
Click OK to enable Network SHARING.
Now let us enable SECURED SHELL – SSH on Raspberry PI OS , so that it can be accessed over network.
This can be done by connecting RPI to a HDMI TV & a keyboard.
Under terminal open RASPI-CONFIG & enable SSH under Advanced options.
But in this post I consider a Headless mode , presuming that you do not have access to a TV or keyboard.You need a CARD READER for this purpose.
Place the SD card with Raspbian OS on to the card reader & plug it to ypur laptop.
Note down the Drive letter allotted.Here it is I:\ in my case
Run CMD & type in following
echo >I:\ssh
Now a file named ssh without any extension is created under \boot.
While PI is booted up then , it looks out for the file named ssh.
If it finds one , it enables SSH & then deletes the file you created.
This is how SSH is enabled in the new Raspbian OS.By default SSH is disabled in new OS for security reasons.
Plug the SD card on to PI & connect the ETHERNET cable to Laptop’s RJ45 slot.
Power up the PI to see a new Unidentified network .
Click on that new Local Area Connection that appears & then click properties.
On the next screen , double click on Internet Protocol Version 4(TCP/IPv4)
Now you see the IP address of the new Network created.
Here it is 192.168.137.1 which is the GATEWAY IP of the new Network.
PI will be allotted IP within this range 192.168.137.xxx
To know the IP of RPI we make use of ADVANCED IP SCANNER
TOUCH screen LCDs are now available for use with Raspberry PI.
7 Inch LCDs work straight from the box as soon as you plug it onto your PI.No driver is required , but the touch response is poor & screen width is not full.
This post walks you through the steps of installing proper Drivers for touch to work smoothly & also installation of virtual keyboard is introduced.
The 7 inch LCD used here has a resolution of 800 x 480 pixels & the screen is Capacitive Touch.
HDMI interface is provided for Display & USB interface for touch control. Both the HDMI & USB cables are provided in the box.
Connect the HDMI cable to the HDMI port of Raspberry PI & THE USB cable to any one port of the RPI.Slide the mini switch to ON position.
Provide a 5v 2Amp power source to the RPI , no separate power is required for the LCD
Connect the RJ45 cable from the Internet providing Router to the RJ45 jack of Raspberry PI.In case of PI3 also this internet connection is a must for driver download & setup.Later you can switch on the WIFI on PI3 to connect with internet.
Insert the micro SD card with the latest RPI3 RASPBIAN Image on to the PI & switch ON the power.
You can see the initial screen is not Full screen. But interestingly , the touch will work.
step 1 : CONFIG.txt editing to get FULL Screen Display :
To get the full screen display , you need to edit the CONFI.TXT file inside /boot folder.You can remove the SD card & plug it to PC using a card reader.
Open the folder & look out for the CONFIG.TXT file .Open this file using Wordpad or Notepad++.
Scroll down to the end of the file & append these lines :
Setting max_usb_current=1 sets the available current over USB to 1.2A (default is 600mA)
This can help if you have a decent power supply (2A, at least) and need to power the external Touch screen display.
For supporting HDMI modes that aren’t from the official CEA/DMT list of modes
use hdmi_mode=87
& then define the CVT – Coordinated Video Timings
The hdmi_cvt 800 400 60 6 0 0 0
defines the timings of the component video signal
hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace> <rb>
width width in pixels
height height in pixels
framerate framerate in Hz
aspect aspect ratio 1=4:3, 2=14:9, 3=16:9, 4=5:4, 5=16:10, 6=15:9
margins 0=margins disabled, 1=margins enabled
interlace 0=progressive, 1=interlaced
Save this changes.Remove the SD card & plug it to RPI.
On rebooting you can find the FULL SCREEN display , but sadly the TOUCH performance will degrade. The touch selection will not be the one you insisted on touch.
To solve this problem you need to install the drivers.
step 2 : TOUCH DRIVER DOWNLOAD & Preparation
To install the Drivers , open the browser on PI & browse to