RaspBerry PI/PiCam Install

PiCam Installation + 무선인터넷 + StartUp

ElectricShock 2017. 2. 1. 12:16

▼아래 그림처럼 PiCam(=파이캠)을 연결후

you need to enable it. Open up a terminal and execute the following command:

▼터미널을 열고 Command를 타이핑한다.

Accessing the Raspberry Pi Camera with OpenCV and Python
Shell
1
$ sudo raspi-config




RPi Cam 에러 메세지

No data received from sensor.

Check all connections, including the Sunny one on the camera board.

카메라가 잘못된 경우이니 새걸로 교체해야한다.

raspistill -o picture.png

명령어를 terminal에 입력했을때 카메라가 동작하지 않으면 카메라에 문제가 있는 경우이다.



라즈베리파이에 IpTime 설치

sudo apt-get update

sudo apt-get upgrade

uname -a

sudo update-usbids

lsusb



당연히 기본적으로...

sudo apt-get update

sudo apt-get upgrade    (시간이 많이 걸린다.)

...를 수행하고


Raspberry PI Configuration에서 Camera를 Enable로 세팅한다.

(▼한글패치 ▶LINK)

sudo apt-get -y install ibus-hangul

sudo apt-get -y install ttf-unfonts-core


sudo rpi-update

sudo apt-get update

sudo apt-get dist-upgrade  (시간이 많이 걸린다.) --- OS를 최신버젼으로 전환해준다.


sudo raspi-config  (In the menu, select Enable Camera)


압축파일을 풀일이 있을때 반드시 아래 명령어를 수행해줘서 zip프로그램을 설치해줘야함

sudo apt-get install zip unzip


sudo ap-get install x11vnc xinetd (when you want remote contol via Window DeskTop)

(http://webnautes.tistory.com/549)


sudo apt-get install arduino (아두이노 설치)


>>AutoRun 사용법

/home/pi 에서 Ctrl+H를 눌러서 hidden file을 visible시킨다.

open the file .bashrc

혹은 $ sudo nano .bashrc

  1. Scroll down to the bottom and add the line: ./superscript

  2. Save and exit: Ctrl+XYEnter


>>Python Autorun

http://www.instructables.com/id/Raspberry-Pi-Launch-Python-script-on-startup/

ifconfig 명령어를 통해서 ip주소 확인후

ssh pi@192.168.194.122 (◀임의의 ip주소)

묻는 질문들에 Yes, Enter, Enter .... 를 누르고 넘겨버린다.

nano launcher.sh

아래처럼 적고 save한다.

cd /
cd home/pi/My
sudo python ???.py
cd /


>>Java ANPR

sudo apt-get update

sudo apt-get install oracle-java7-jdk

After the update & installation have finished,

you need to download JavaANPR.

Now use a test picture of license plate

.time java -jar javaanpr.jar -recognize -i test.jpg


C++을 쓰려면 아래 명령어를 쳐야한다.

sudo apt-get install netbeans

다운받은후 NetBeans를 실행후...Tools >> Plugins >> Available Plugins 

우측 검색창에 C/C++이라고 타이핑후 Reload를 클릭한다.


Eclipse에서 C++을 쓸때

sudo apt-get install eclipse

sudo apt-get install eclipse-cdt    (C++ Plugins)

sudo apt-get install eclipse-cdt g++ (이건 뭔지 모르겠음)

★참고로 Window상 Eclipse사용시 C++환경을 구현하려면....Help>>Install New Software

Work with에 아래 링크를 타이핑하고 추가하면 된다. (출처 http://yojm.net/?p=252)

http://download.eclipse.org/tools/cdt/releases/galileo


기본 Libraries를 다운받고자하면 아래 명령어를 친다. (참조링크)

sudo apt-get install libstdc++6-4.6-dev




다운받은후

Help >> New Software

All Available Sites



https://diyhacking.com/best-voice-recognition-software-for-raspberry-pi/

사운드카드설치 (=마이크용)

sudo apt-get install audacity

lsusb를 눌러서 USB형 마이크가 제대로 연결되있나 check할것

alsamixer로 볼륨체크




Flash 설치

sudo apt-get install gnash



PiCam대신 Standard WebCam사용시

sudo apt-get install fswebcam
fswebcam image.jpg


Bluetooth Setting

sudo apt-get install pi-bluetooth

▼예제(RPi Anrdroid App Connection)

https://stackoverflow.com/questions/36099960/how-to-connect-to-raspberry-pi-with-an-android-app-over-bluetooth

▼Built-in Bluetooth를 이용하여 연결하기

https://www.cnet.com/how-to/how-to-setup-bluetooth-on-a-raspberry-pi-3/

sudo bluetoothctl

input the Administrator PW (the default PW is raspberry).

agent on

default-agent

scan on

Alphanumeric adresses around RPi will appear with a list.

To pair the device, type pair [device Bluetooth address]


https://circuitdigest.com/microcontroller-projects/controlling-raspberry-pi-gpio-using-android-app-over-bluetooth

[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# discoverable on
[bluetooth]# pairable on
[bluetooth]# scan on

▼Bluetooth Dongle을 쓸때 (Bluetooth Manager가 설치된다.)

sudo apt-get install bluetooth bluez blueman

▼Dongle 사용법

http://learn.acrobotic.com/tutorials/post/control-ble-devices-from-a-raspberry-pi

https://circuitdigest.com/microcontroller-projects/controlling-raspberry-pi-gpio-using-android-app-over-bluetooth


pip install imutils    :: imutils패키지설치