No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This is a note for rpi-robotic-arm@cavedu

1. Basic Setup

OS: using Raspbian

I2C config

Install i2c-tools.

sudo apt-get install -y python-smbus i2c-tools

Load i2c modules automatically after boot.


Raspi-config -> Advanced Options -> I2C -> Enable automatically load I2C module.

sudo raspi-config

Reboot and test wether I2C is working.

sudo i2cdetect -l

Setup vnc (optional)

Install vnc server and start it with port 5901 (:1), display resolution 1920x1080 (-geometry), pixel depths 16 (-depth).

sudo apt-get -y install tightvncserver
vncserver :1 -geometry 1920x1080 -depth 16

Launch vncserver at startup, create a script, change its mod to 755, and then add it to startup process.

Create a script /etc/init.d/tightvncserver.

export USER='pi'
eval cd ~$USER

case "$1" in
    su $USER -c '/usr/bin/vncserver :1 -geometry 1920x1080' 
    echo "Starting vncserver for $USER"
    pkill Xtightvnc
    echo "vncserver stopped"
    echo "Usage: /etc/init.d/tightvncserver {start|stop}"
    exit 1
exit 0

Change mode and add it to startup process. Remember reboot for work.

sudo chmod 755 /etc/init.d/tightvncserver
sudo update-rc.d tightvncserver defaults

Monitor ports of vncserver.

netstat -nutlp

Log in on client and config the environment variable $DISPLAY to vncviewer (under ssh login).

vncviewer <ip address of rpi>:5901
export DISPLAY=":1" 

Python Setup

Install wxPython, opencv(python).

sudo apt-get install -y python-wxgtk2.8 libopencv-dev python-opencv