2018/05/30

Install MQTT on Raspberry Pi Zero W



輸入下方指令安裝

sudo apt-get install -y mosquitto mosquitto-clients


安裝輸入下方指令個用訂閱者(Subscriber)去訂閱Topic

mosquitto_sub -d -t cyfang/test




接著再開另一個視窗做為發佈者(Publisher)將訊息發佈至Topic內

Windows 10 Install OpenCV 3.4.1


輸入下方指令安裝

wget https://download.lfd.uci.edu/pythonlibs/c3ylw7lc/opencv_python-3.4.1+contrib-cp36-cp36m-win_amd64.whl
pip install opencv_python-3.4.1+contrib-cp36-cp36m-win_amd64.whl


測試可以輸入下方程式碼

import cv2
print(cv2.__version__)


Windows 10 IoT Core DS3231

RPi GPIO





Name Board Pin
32K N/A
SQW N/A
SCL 5
SDA 3
VCC 1/17
GND 6/9/14/20/25/30/34/39



Windows 10 IoT Core Max31855

RPi GPIO





Name Board Pin
VCC 1/17
GND 6/9/14/20/25/30/34/39
3Vo N/A
CS 24
SCK 23
D0 21



Linux 更換Python版本

方法一

#Python
sudo rm -fr /usr/bin/python
ln -s /usr/bin/python3.5 /usr/bin/python
#pip
sudo rm -fr /usr/bin/pip
ln -s /usr/bin/pip3 /usr/bin/pip


方法二

update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2