Skip to content

Python script to control a robot using Raspberry Pi and OpenCV

Notifications You must be signed in to change notification settings

stha4us/robotics

Repository files navigation

Robotics Projects

A collection of basic scripts to get started with robotics, coding, automation, and image processing. Each folder contains a project with its main script and setup instructions.


Project Index

Arduino & Electronics


Python & Raspberry Pi


C/C++ Games


Setup Instructions

Each project folder contains a README.md with setup steps.
Typical workflow for Python projects:

pip install virtualenv
virtualenv .venv
pip install -r [requirements.txt](http://_vscodecontentref_/0)
python [scripts.py](http://_vscodecontentref_/1)


## Configs and Setups

### First boot setup and LAMP installation
#### >> raspi-config
#### expand root partition
#### set timezone
#### in advanced options: enable ssh server
#### in advanced options: update Raspberry Pi
#### reboot
#### >> sudo apt-get update && sudo apt-get upgrade 
#### Apache: >> sudo apt-get install apache2 php5 libapache2-mod-php5
#### In case of error: >> sudo groupadd www-data && sudo usermod -g www-data "
#### Restart: >> sudo service apache2 restart
#### Access hosted page: >> sudo nano /var/www/html/index.html 

#### MySQL: >> sudo apt-get install mysql-server mysql-client php5-mysql

#### Phpmyadmin: >> sudo nano /etc/apache2/apache2.conf
#### Scroll all the way bottom and add: >> include /etc/phpmyadmin/apache.conf

#### Install FTP


### To check network

#### sudo nano /etc/network/interfaces
#### iface eth0 inet static
#### address 192.100.1.107
#### netmask 255.255.255.0
#### gateway 192.100.1.5
#### Here eth0 would be for Pi

#### Checking my IP address: >> hostname -I
#### Get process number: >> ps aux | grep /home/pi/final.py
#### Kill a process: >> sudo kill <process_number>

#### Check UDB port: >> ls /dev/ttyACM *


### Autorun Using Cronjob:
#### >> sudo crontab -e
#### >> 2
#### >> @ reboot /home/pi/file.py &
#### hit enter and exit

### Autorun Scripts in Linux system: 
#### >> Set boot option to "Desktop/CLI"
#### >> Other config set to "Console Autologin"
#### >> sudo nano /etc/profile
#### >> sudo python /home/file.py

### Autorun 

About

Python script to control a robot using Raspberry Pi and OpenCV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •