2. Enable the SSH server using raspi-config:
Type in the terminal:
sudo raspi-config
Select 'Advanced Options'.
Select 'A4 SSH'.
Select 'Enable'.
3. Get the IP address with the ifconfig command.
You will get the IP address such as 192.168.10.183.
4. Download and run PuTTY with a Windows PC.
5. Key in the IP address as the host name and keep the port as 22:
6. Click YES.
7. Login to Raspberry Pi.
7. Enter the commands below to control the LED to be ON/OFF:
sudo python
>>> import RPi.GPIO as GPIO
>>> GPIO.setmode(GPIO.BCM)
>>> GPIO.setup(4,GPIO.OUT)
>>> GPIO.output(4,1)
LED is turned on!
>>> GPIO.output(4,0)
No comments:
Post a Comment