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.
-
bluetooth_robot
Control a robot via Bluetooth using Arduino.
Main script:bluetooth_control.ino -
line_following_robot
Follow a colored line using digital IR sensors.
Main script:script.ino -
mini_weather_station
Measure temperature, windspeed, humidity, and more.
Main script:script.ino -
height_measurer
Measure height using ultrasonic sensor and display on LCD.
Main script:HeightMeasurement.ino -
homeautomation_system
Control devices over Ethernet with Arduino.
Main script:scripts.ino -
[GPS tracking system](GPS tracking system/README.md)
Read GPS data via serial communication.
Main script: [scripts.ino](GPS tracking system/scripts.ino)
-
snake_game
Classic Snake game using Pygame.
Main script:scripts.py -
calculator
Simple calculator GUI with Tkinter.
Main script:scripts.py -
color_tracker_robot
Track and follow colored objects using OpenCV and PiCamera.
Main script:opencv_motor_control.py -
face_recognizer
Face recognition using OpenCV.
Scripts: -
talking_tree
React to environment with ultrasonic sensor and play sounds.
Main script:script.py -
sku_reader
Read barcodes and check stock using Raspberry Pi and MySQL.
Main script:scripts.py
- ludo_game
Simple Ludo game using C++ graphics.
Main script:graphics_game.CPP
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