Tuesday, September 13, 2016

[RPI GPIO] Mini Servo Test on Raspberry Pi 2

12 September 2016

Mini Servo Test on Raspberry Pi 2 (Python GPIO)

1. Using PWM
Pinout Raspberry Pi 2
Mini Servo -> RPI
orange PWM -> pin11
red vcc -> vcc 5v / pin2 / pin4
brown ground -> gnd / pin6, pin9, pin14...

2. Send python script or write script to RPI


3. Test Run
sudo python servotest.py


Referensi
-pinout = https://www.raspberrypi.org/documentation/usage/gpio-plus-and-raspi2/
-PWM = https://sourceforge.net/p/raspberry-gpio-python/wiki/PWM/
-datasheet mini servo = http://www.micropik.com/PDF/SG90Servo.pdf

Thursday, June 30, 2016

[RPI GPIO] LCD 16x2 Test

30 June 2016

LCD 16x2 Test on Raspberry Pi 2 (Python GPIO)

1. Enable I2C
- sudo raspi-config
- select 8 Advanced Options
- select A7 I2C
enable?
- yes

by default?
- yes

reboot for saving all changes
sudo reboot

2. Edit loaded modules
sudo nano /etc/modules

add lines:
i2c-bcm2708
i2c-dev

3. Install utilities/software
sudo apt-get update
sudo apt-get install -y python-smbus i2c-tools

reboot for saving all changes
sudo reboot


4. Connect RPI - I2C - LCD 16x2
RPI pin 1 - VCC
RPI pin 3 - SDA
RPI pin 4 - GND
RPI pin 5 - SCL

5. Send python script to RPI


6. Test Run
sudo python lcd.py


Note:
- cek if running i2c module or not?
lsmod | grep i2c_


Referensi
-http://www.raspberrypi-spy.co.uk/2014/11/enabling-the-i2c-interface-on-the-raspberry-pi/
-http://www.raspberrypi-spy.co.uk/2015/05/using-an-i2c-enabled-lcd-screen-with-the-raspberry-pi/

Thursday, October 1, 2015

Saturday, July 18, 2015

[RPI] Bluethooth Pairs

18 July 2015

sudo apt-get install bluetooth bluez-utils blueman
sudo apt-get install bluez-compat
sudo bluez-simple-agent hci0 48:86:E8:B5:2B:7A
sudo pand --connect 48:86:E8:B5:2B:7A -n
dhclient bnep0

Referensi
http://www.modmypi.com/blog/installing-the-raspberry-pi-nano-bluetooth-dongle
http://www.ctheroux.com/a-step-by-step-guide-to-setup-a-bluetooth-keyboard-and-mouse-on-the-raspberry-pi/
http://m-jorgensen.dk/how-to-enable-pan-on-raspberry/

Thursday, July 16, 2015

[RPI] Yicam - Resize - Tweet via Raspberry Pi

16 July 2015

RPI Config for live image Yicam - Rpi - Resize - Tweet

sudo apt-get install python-setuptools
sudo easy_install pip
sudo apt-get install libjpeg-dev
sudo pip-3.2 install pillow
sudo pip-3.2 install TwitterApi

Gunakan pyton3 command

python3 yirestwet.py

Referensi
- http://stackoverflow.com/questions/8915296/python-image-library-fails-with-message-decoder-jpeg-not-available-pil
- http://pi-camera.blogspot.com/p/raspberry-pi-setup.html
- https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=97326
- https://github.com/deltaflyer4747/Xiaomi_Yi/blob/master/Standalone_scripts/Camera_photo.py
- http://copter.sovgvd.info/a/Xiaomi-Yi-protocol-remote-control
- https://www.youtube.com/watch?v=WrtebUkUssc
- https://gist.github.com/capung48/0f2f73d599f2de8100eb

Friday, July 3, 2015

[PYTHON] Twitter API POST Test

3 July 2015

Installation TwitterAPI by geduldig

1. python -m pip install TwitterAPI


Referensi
-https://github.com/geduldig/TwitterAPI
-http://stackoverflow.com/questions/13111222/windows-7-python-3-2-file-not-found-on-open

Thursday, July 2, 2015

[PYTHON] Beautiful Soup pada Windows CMD

2 July 2015

Installasi beautifulsoup windows via command prompt

1. python -m pip install -U pip (upgrade pip)
2. python -m pip install beautifulsoup4

Refferensi
-http://www.crummy.com/software/BeautifulSoup/