Raspberry Pi Programming



Version Control System

we use git in combination with github.

sudo apt-get install git



Preparation

set push.default

try

git push

read error message and fix accordingly


Basic usage of git via command line


On github.com, create repository with readme.md so that it wil be ready for cloning.

clone remote:

git clone https://github.com/atmelino/bananapi.git

cd bananapi

git command line daily workflow


change into directory of local repository

When you start working on your computer, update local repository from remote repository:

git pull

When you are done programming, send changes to remote repositoy:

git add (your filename)

git commit
(enter your comments)

git push

Python


A python program is automatically started (via crontab) when the Pi boots. How do we stop it?

1. find process ID

ps -ef | grep python

output:
UID        PID  PPID  C STIME TTY          TIME CMD

UID or USER    Username of the process's owner
PID                    Process ID number
PPID                  ID number of the process's parent process
C or CP              CPU usage and scheduling information


2. kill the according process

sudo kill 1234

http://superuser.com/questions/446808/how-to-manually-stop-a-python-script-that-runs-continuously-on-linux

No comments:

Post a Comment