Popular Raspberry Pi Commands - Summary
raspistill -o Desktop/[Link]
-> Captures a still image using the Raspberry Pi Camera Module.
raspistill -o Desktop/[Link] -w 640 -h 480
-> Captures a smaller-sized image by specifying width and height.
raspivid -o Desktop/video.h264
-> Records a video using the Camera Module.
from picamera import PiCamera
-> Imports the PiCamera library in Python.
camera = PiCamera()
-> Initializes the camera object.
camera.start_preview(), camera.stop_preview()
-> Starts and stops the camera preview window.
[Link]('/home/pi/Desktop/[Link]')
-> Captures a still image and saves it to Desktop.
[Link] = 180
-> Rotates the camera preview/image.
camera.start_recording('video.h264'), camera.stop_recording()
-> Starts and stops video recording using Python.
import [Link] as GPIO
-> Imports the GPIO library for Raspberry Pi.
[Link]([Link]) or [Link]([Link])
-> Sets pin numbering mode (BCM or BOARD).
[Link](pin, [Link] or [Link])
-> Sets a GPIO pin as input or output.
[Link](pin, state)
-> Sets a GPIO pin to HIGH or LOW.
[Link](pin)
-> Reads input value from a GPIO pin.
[Link](False)
-> Disables GPIO warnings.
[Link]()
-> Creates a socket for client/server communication.
[Link]((host, port))
-> Binds server to a host IP and port.
[Link](5)
-> Listens for incoming client connections.
[Link]((host, port))
-> Client connects to the server.
[Link](1024), [Link](data)
-> Receives or sends data over network sockets.