NOOBS OS installation in Raspberry Pi:
I will explain my first experience with Raspberry Pi. I got my kit, opened it and took out all the different things from box. I understood most of things that are included in the box and their functionality. I started reading first 2 chapters from users Manuel understood history, purpose, basic organization, usage of Raspberry Pi. Installed NOOBS operating system in Raspberry Pi. Procedure for installation:
Equipment:
Raspberry Pi kit
HDMI Monitor
Keyboard and Mouse
SD card with NOOBS OS
Procedure:
Connect the Raspberry Pi kit to TV/Monitor using HDMI cable, insert SD card into the kit. Connect power cable and turn it on. Screen will be displayed with options, select first option which is Raspbian for NOOBS os installation. It will take a while for installing os, after 100% procedure is completed it will display Finish message on screen. Enter startx command and give username and password to get GUI for current os. This will take you to Graphical User Interface which means installation is completed.
How to connect to WIFI???
Connect WIFI dongle to Raspberry Pi. You can see the network connectivity symbol on the right top of the screen. Select the option, we will get the list of all the available connections, connect to WIFI by entering the password.
Remote desktop connection for Raspberry Pi:
I used very interesting and simple protocol "XRDP" for remote desktop connection.
Install package in Raspberry Pi by following command: sudo apt-get install xrdp
First we need to find Physical address of Raspberry Pi so that we can find out IP Address from windows system and connect to Raspberry Pi using remote desktop connection.
We can search IP address for corresponding Physical address using command: arp -a
Open Remote desktop connection from windows and enter IP address obtained using Physical address. This will take you to login page where you have to enter username and password this will take to Raspberry Pi GUI on the windows system.
Experiment 1:
Standalone light and Blinking light
Equipment:
Raspberry Pi kit
1 LED
1 330 ohms Resistor
Connectors
Breadboard
Connect the T board on the breadboard and make connection in such a way that LED, resistor, Raspberry Pi are all connected in series. Pic below shows all the connections. Used GPIO2 and Ground pins for connecting LED output pin and the other circuit. I followed instructions from chapter 7 and made connections. This is very easy to do the setup. I did this successfully, finally I was able to programmatically make the light blinking.
Experiment 2:
3 LED lights whose frequency of blinking can be changed by push down button
Equipment:
Raspberry Pi kit
3 LED
3 330 ohms resistor
Push down button
Connectors
Breadboard
Connect 3 LEDs with same GPIO and different resistors, connect one push down button to the breadboard. In this experiment we will read input from button and then change the blinking frequency of the lights. This is a process of taking input from user and changing the frequency of output. By default LED will blink at a frequency of 0.25 seconds. When the button is pushed down then the blinking frequency will increase to 2 seconds. Till you keep pressing the button output will remain same. Once the button is released again the frequency changes to 0.25 seconds. This remains blinking until the program is interrupted. Attached code of project.
I will explain my first experience with Raspberry Pi. I got my kit, opened it and took out all the different things from box. I understood most of things that are included in the box and their functionality. I started reading first 2 chapters from users Manuel understood history, purpose, basic organization, usage of Raspberry Pi. Installed NOOBS operating system in Raspberry Pi. Procedure for installation:
Equipment:
Raspberry Pi kit
HDMI Monitor
Keyboard and Mouse
SD card with NOOBS OS
Procedure:
Connect the Raspberry Pi kit to TV/Monitor using HDMI cable, insert SD card into the kit. Connect power cable and turn it on. Screen will be displayed with options, select first option which is Raspbian for NOOBS os installation. It will take a while for installing os, after 100% procedure is completed it will display Finish message on screen. Enter startx command and give username and password to get GUI for current os. This will take you to Graphical User Interface which means installation is completed.
How to connect to WIFI???
Connect WIFI dongle to Raspberry Pi. You can see the network connectivity symbol on the right top of the screen. Select the option, we will get the list of all the available connections, connect to WIFI by entering the password.
Remote desktop connection for Raspberry Pi:
I used very interesting and simple protocol "XRDP" for remote desktop connection.
Install package in Raspberry Pi by following command: sudo apt-get install xrdp
First we need to find Physical address of Raspberry Pi so that we can find out IP Address from windows system and connect to Raspberry Pi using remote desktop connection.
We can search IP address for corresponding Physical address using command: arp -a
Open Remote desktop connection from windows and enter IP address obtained using Physical address. This will take you to login page where you have to enter username and password this will take to Raspberry Pi GUI on the windows system.
Experiment 1:
Standalone light and Blinking light
Equipment:
Raspberry Pi kit
1 LED
1 330 ohms Resistor
Connectors
Breadboard
Connect the T board on the breadboard and make connection in such a way that LED, resistor, Raspberry Pi are all connected in series. Pic below shows all the connections. Used GPIO2 and Ground pins for connecting LED output pin and the other circuit. I followed instructions from chapter 7 and made connections. This is very easy to do the setup. I did this successfully, finally I was able to programmatically make the light blinking.
Experiment 2:
3 LED lights whose frequency of blinking can be changed by push down button
Equipment:
Raspberry Pi kit
3 LED
3 330 ohms resistor
Push down button
Connectors
Breadboard
Connect 3 LEDs with same GPIO and different resistors, connect one push down button to the breadboard. In this experiment we will read input from button and then change the blinking frequency of the lights. This is a process of taking input from user and changing the frequency of output. By default LED will blink at a frequency of 0.25 seconds. When the button is pushed down then the blinking frequency will increase to 2 seconds. Till you keep pressing the button output will remain same. Once the button is released again the frequency changes to 0.25 seconds. This remains blinking until the program is interrupted. Attached code of project.
Code :
import RPi.GPIO
import time
RPi.GPIO.setmode(RPi.GPIO.BCM)
RPi.GPIO.setup(2,RPi.GPIO.OUT)
RPi.GPIO.setup(3,RPi.GPIO.IN, pull_up_down=RPi.GPIO.PUD_UP)
while True:
input_state = RPi.GPIO.input(3)
if input_state == True :
RPi.GPIO.output(2, True)
time.sleep(0.25)
RPi.GPIO.output(2, False)
time.sleep(0.25)
else :
RPi.GPIO.output(2, True)
time.sleep(2)
RPi.GPIO.output(2, False)
time.sleep(2)
No comments:
Post a Comment