GOGOGOGOGOGOG

@GOGOGOGOGOGOG

Joined on Sep 16, 2018

  • 中斷 Interrupt 當周邊(peripheral)或是硬體需要處理器(processor)做某些特殊處理時,會發現以下事件: 周邊觸發一個中斷請求給處理器 處理器把目前處理的task 停滯起來 處理器執行中斷的ISR並且將中斷請求清空 處理器回復成之前的Task 在任何的Cortex M上面都有NVIC Nested Vectored Interrupt Controller ,其目的是為了對中斷進行管理。 以下圖來說:
     Like  Bookmark
  • 相關網站 Pandas python Matplotlib: 匯入Matplotlib模組: import matplotlib.pyplot as plt Matplotlib主要功能為繪製x y座標圖 且x y座標要存放在串列中才能傳給Matlibplot做繪製。
     Like  Bookmark
  • # IoT devices 交接文件: - 硬體 - 震動sensors - 溫度sensors - 貼片 - 放大器 - 數據多工器 - 4.7k歐姆電阻 - 電路圖 - 底座 - 墊片 - 樹梅派3B + 腳位 - 樹梅派外殼 - 韌體: - I2C重建教學 - one-wire temperature - 程式碼備份 - IOT_device network settings: ## 硬體: ### 震動Sensors: ![](https://i.imgur.com/SEAenV7.png) [使用的廠牌連結](https://www.taiwaniot.com.tw/product/grove-3-axis-digital-accelerometer-%c2%b116g-3%e8%bb%b8%e6%95%b8%e5%ad%97%e5%8a%a0%e9%80%9f%e5%ba%a6%e8%a8%88/) [低配版--之後可以自己買這個來焊](https://www.
     Like  Bookmark
  • # IOT_device network settings: ## Setting the mask for Raspberry pi :(172.17.4.101/24) remember to set the Mask to `255.255.255.0` => set the `IPv4` Address = `172.17.4.101/24`. If there are going to have multiple Raspberries, set the IP address to `172.17.4.10x/24`(x=2 , 3 , 4.....etc) ## Set the statistic Network : ### Facility : step 1 : `cd /etc` step 2 : `nano dhcpcd.conf ` step 3 : change the inform address to the address that specify above : `inform 172.17.4.101/24` step 4 : `st
     Like  Bookmark
  • # 美光實習 ## 溫度感測器 [ad590](https://www.shs.edu.tw/works/essay/2009/03/2009033116461249.pdf) ## 安裝grovepi+ 輸入:`sudo i2cdetect -y 1` 安裝成功: ```bash= 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- 04 -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- 53 -- -- -- -- --
     Like  Bookmark
  • # vibration sensor and temperature sensor code backup: ```python= from adxl345 import ADXL345 import time import os import paho.mqtt.client as mqtt import threading from scipy import pi import matplotlib.pyplot as plt os.system('modprobe w1-gpio') os.system('modprobe w1-therm') sensoid= ['3b-0000001817de','3b-0000001817d1'] global temp_sensor global temperature temperature=[0,0] def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) client.subscribe("I
     Like  Bookmark
  • # Mosquitto 安裝程序: ## 1. 安裝mosquitto: [安裝網址](https://mosquitto.org/download/) - 安裝mosquitto.exe檔: (mosquitto-1.6.3-install-windows-x64.exe以上的版本,請不要安裝1.51以下的版本,會無法和win10系統相容) - 按下setup的程式後,進入安裝程序,路徑上我們選擇(C:\Program Files (x86)\mosquitto),如下圖 - ![](https://i.imgur.com/MSDceRw.png) - 安裝完後 ## 安裝OpenSSL: [Win64 OpenSSL v1.1.1c Light](http://slproweb.com/products/Win32OpenSSL.html) -
     Like  Bookmark
  • # Double I2C ADXL345 Code back up : ## adxl345: ```python= # ADXL345 Python library for Raspberry Pi # # author: Jonathan Williamson # license: BSD, see LICENSE.txt included in this package # # This is a Raspberry Pi Python implementation to help you get started with # the Adafruit Triple Axis ADXL345 breakout board: # http://shop.pimoroni.com/products/adafruit-triple-axis-accelerometer import struct import smbus from time import sleep import Adafruit_GPIO.I2C as I2C # select the correct
     Like  Bookmark