Translate

Sunday, December 20, 2020

IoT MQTT with Flash on NodeMCU and Respberry Pi

https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-to-sqlite-database/

以上是很棒的連結,看完對於MQTT,SQLite,FLASK 和 NodeMCU /Raspberry Pi 的基本架構都會有基本的瞭解。

Raspberry Pi: 

  1. 安裝 Mosquitto 並且啟動,MQTT上線完成
  2. 安裝 FLASK
  3. 安裝 SQLite;
    1. 建立一個 sqlite.db file
    2. 在 db file 中建一個 table 完成
  4. Pythone file subscribe to EPS8266 來的MQTT資料,並寫入 SQLite
  5. 在網上即可看見NodeMCU發出來的資料

Monday, December 14, 2020

Raspberry Pi 真好玩!- 入手第一式 /開關鍵+指示燈

買了個 Raspberry 4B+想作個 IoT 的東西,該怎麼下手呢?

Raspberry 4B 自從最近一次的更新後,Youtube 也不會當機了,沒作IoT,那拿來看 Youtube 也是高上貴。

但這個便宜的小玩意,還是有個大缺點: 沒有開關鍵!

網路的傳言是說插拔之間,Type C 就用壞了,所以自製開關鍵很是重要。

以下這個文章,就學著作個開關,加上LED,開關有序,而LED指示,波棒哇

How to add a power button to your RPi

https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi

我是用麵包板加上簡單的兩行式子,複雜的我可不會哦!

git clone https://github.com/Howchoo/pi-power-button.git

./pi-power-button/script/install

好了,可以爽爽的看 Youtube 了!