18video性欧美19sex,欧美高清videosddfsexhd,性少妇videosexfreexxx片中国,激情五月激情综合五月看花,亚洲人成网77777色在线播放

電子發(fā)燒友App

硬聲App

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示
創(chuàng)作
電子發(fā)燒友網(wǎng)>電子資料下載>電子資料>智能垃圾管理開源硬件

智能垃圾管理開源硬件

2023-02-01 | zip | 0.02 MB | 次下載 | 免費(fèi)

資料介紹

描述

現(xiàn)在是時(shí)候?qū)懴轮腔鄢鞘械亩x了。與其祖先一樣,智慧城市現(xiàn)在具備成為現(xiàn)實(shí)的所有因素。從農(nóng)業(yè)革命和后來的工業(yè)革命中發(fā)展起來的城市受到類似因素的驅(qū)動(dòng)——人口增長和技術(shù)進(jìn)步促進(jìn)并推動(dòng)了生活條件的改變。現(xiàn)代城市也有這些相同的因素,但規(guī)模要大得多;如前所述,全球人口呈指數(shù)級(jí)增長,我們需要應(yīng)對(duì)的方法。

人口對(duì)資源的壓力是使我們當(dāng)前的城市模型更加智能化的一個(gè)主要因素。而且,這樣做的技術(shù)最終以超連接、改進(jìn)和更便宜的傳感器、人工智能和數(shù)據(jù)分析的形式出現(xiàn)。這里的線索就在數(shù)據(jù)中;數(shù)據(jù)是現(xiàn)代智慧城市的新能源。數(shù)據(jù),或者更確切地說,對(duì)這些數(shù)據(jù)的分析和應(yīng)用,將成為智慧城市發(fā)展的支點(diǎn)。因此,智慧城市應(yīng)該結(jié)合多種技術(shù)來改善城市的重要方面和任務(wù),例如監(jiān)測水和空氣、廢物管理、停車、照明和車輛。

在這個(gè)項(xiàng)目中,我們專注于借助智能垃圾箱和 IOTA tangle 改善一個(gè)地區(qū)(包括許多智能城市)的智能垃圾管理,以加快智能垃圾管理的進(jìn)程,減少擁堵、污染,并幫助改善能源優(yōu)化。

廢物管理的主要問題之一是未優(yōu)化的垃圾收集卡車路線。未優(yōu)化的卡車路線會(huì)導(dǎo)致使用過多的燃料并在人口稠密的城市造成擁堵。此外,有些垃圾箱可能會(huì)因此而被裝滿而其他垃圾箱則可能因此而裝滿。所以我們真正要解決的是垃圾收集車路線的優(yōu)化,以避免擁堵和過度使用燃料。

這就是該項(xiàng)目的運(yùn)作方式。我們在垃圾箱中連接填充液位傳感器,持續(xù)監(jiān)測垃圾箱內(nèi)的填充液位。在每天早上的固定時(shí)間(比如早上 7 點(diǎn)),數(shù)據(jù)會(huì)上傳到 tangle。垃圾車司機(jī)能夠使用合適的設(shè)備從節(jié)點(diǎn)檢索數(shù)據(jù),并且他可以優(yōu)化卡車路線。

硬件組件

iota_6j37c6c23f_XtUnIfLkVn.jpg?auto=compress%2Cformat&w=740&h=555&fit=max
硬件設(shè)置
?

1.紅外接近傳感器

可以使用下圖解釋紅外傳感器作為物體檢測傳感器的原理。紅外傳感器由紅外 LED 和紅外光電二極管組成;它們一起被稱為光電耦合器或光電耦合器。

當(dāng) IR 發(fā)射器發(fā)射輻射時(shí),它會(huì)到達(dá)物體,并且一些輻射會(huì)反射回 IR 接收器。根據(jù) IR 接收器的接收強(qiáng)度,定義傳感器的輸出。

ir-sensor-working_x5xOvm0HXa.png?auto=compress%2Cformat&w=740&h=555&fit=max
紅外傳感器工作
?

IR 接近傳感器用作液位傳感器。接近傳感器放置在垃圾箱頂部附近的垃圾箱內(nèi)。

iota2_h997fuo3ck_RlvD8tLLOi.jpg?auto=compress%2Cformat&w=740&h=555&fit=max
帶液位傳感器的垃圾桶
?

一旦垃圾箱裝滿,傳感器返回 1,否則返回 0。(超聲波傳感器可以代替使用并且被廣泛使用。為簡單起見,我們使用 IR 接近傳感器。)

2.樹莓派

樹莓派是用于將數(shù)據(jù)發(fā)布到 tangle 的板。對(duì)于每個(gè)垃圾箱,我們都將 Raspberry Pi zero 與紅外接近傳感器連接起來。傳感器監(jiān)控填充水平,Raspberry Pi 會(huì)在每天早上的預(yù)定時(shí)間將數(shù)據(jù)歸零發(fā)布到 tangle。

layout_bb_Qd8u7V3VnU.jpg?auto=compress%2Cformat&w=740&h=555&fit=max
用樹莓派 3 填充杠桿傳感器
?

軟件組件

1.蟒蛇

Python 是一種解釋型、高級(jí)、通用的編程語言。我們使用 python 構(gòu)建整個(gè)項(xiàng)目。

2. PyOTA:IOTA Python API 庫

這是 IOTA 核心的官方 Python 庫。它實(shí)現(xiàn)了官方 API以及新提出的功能(例如簽名、捆綁、實(shí)用程序和轉(zhuǎn)換)。

3.漂亮的桌子

PrettyTable 是一個(gè)簡單的 Python 庫,旨在使在視覺上吸引人的 ASCII 表格中快速輕松地表示表格數(shù)據(jù)。

程序

1. 安裝樹莓派

通過安裝 Raspbian OS 或任何其他合適的操作系統(tǒng)來設(shè)置 Raspberry Pi。如果需要,請(qǐng)遵循教程。

2. 安裝所需軟件

如果之前未安裝,請(qǐng)下載并安裝Python 3.5或更高版本。然后安裝其他庫,如PyOTAPrettyTable。

如果安裝了 pip,請(qǐng)?jiān)诮K端中輸入以下命令來安裝庫。

pip install pyota

pip install PrettyTable

3.創(chuàng)建IOTA地址

我們可以使用 IOTA 手機(jī)錢包創(chuàng)建一個(gè) IOTA 錢包地址。使用 IOTA 錢包生成新地址或在https://thetangle.org上搜索現(xiàn)有地址時(shí),您會(huì)找到一個(gè)二維碼。

whatsapp_image_2019-04-23_at_12_25_02_pm_fOKMuoATkP.jpeg?auto=compress%2Cformat&w=740&h=555&fit=max
設(shè)置 IOTA 錢包地址
?

4.代碼

我們有兩個(gè)用于該項(xiàng)目的 python 代碼。一個(gè)在與傳感器連接的 Raspberry Pi 零上運(yùn)行。這段 python 代碼不斷地從傳感器讀取數(shù)據(jù),并將箱子編號(hào)和箱子的狀態(tài)發(fā)送給 tangle。

sensorread.py

#Developed by CodersCafe
from datetime import datetime
import time
import schedule
import RPi.GPIO as GPIO
  
#Setup sensor as input
sensor1 = 16
sensor2  = 12
  
GPIO.setmode(GPIO.BOARD)
GPIO.setup(sensor1,GPIO.IN)
GPIO.setup(sensor2,GPIO.IN)
# Import the PyOTA library
import iota
# Import json
import json
# Define IOTA address where all transactions  are stored, replace with your own address.
# IOTA addresses can be created with the IOTA Wallet
Addr = b"RLLQQVU9ZPWF9EPOVTJ9AXVJOBQWJWDPGGMALZQANY9GWR99XPITQJQBVLYCX9XLGIGLB9TBUNDTDWYBZACGWGQSLZ"

# Create IOTA object, specify full node to be used when sending transactions.  
api = iota.Iota("https://nodes.thetangle.org:443")
  
# Define static variable
city = "Smart City"
  
#Define the post function
def datapost():
   FinalBundle = api.send_transfer(depth=3, transfers=[pta], min_weight_magnitude=14)['bundle']
   FinalBundle = api.send_transfer(depth=3, transfers=[ptb], min_weight_magnitude=14)['bundle']
   print("Success")
  
#Schedule data  posting at 7 am
schedule.every().day.at("07:00").do(datapost)
  
#Main loop
try:
   while True:
       # Show welcome message
       print("\n Welcome to Smart City")
       print("Press Ctrl+C to exit the system")
       # Get bin number
       bin_number1 = sensor1
       print ("bin number = ",bin_number1)
       bin_number2 = sensor2
       print ("bin number = ",bin_number2)
       # Get status from bins
       id1 = GPIO.input(sensor1)
       if id1==1:
           status="Full"
       else:
           status="Not Full"
       id2 = GPIO.input(sensor2)
       if id1==1:
           status="Full"
       else:
           status="Not Full"        
       # Create json data to be uploaded to the tangle
       data1 = {'city': city, 'bin_number': bin_number1,'Status': status}
       data2 = {'city': city, 'bin_number': bin_number2,'Status': status}
       # Define new IOTA transaction
       pta = iota.ProposedTransaction(address = iota.Address(Addr),
                                     message = iota.TryteString.from_unicode(json.dumps(data1)),
                                     tag     = iota.Tag(b'SMARTCITY'),
                                     value   = 0)
       ptb = iota.ProposedTransaction(address = iota.Address(Addr),
                                     message = iota.TryteString.from_unicode(json.dumps(data2)),
                                     tag     = iota.Tag(b'SMARTCITY'),
                                     value   = 0)
       schedule.run_pending()
       time.sleep(50) 
# Clean up function when user press Ctrl+C (exit)
except KeyboardInterrupt:
   GPIO.cleanup()

另一個(gè) python 代碼由垃圾車司機(jī)或任何其他授權(quán)人員使用。此代碼從 tangle 中讀取數(shù)據(jù)并以綜合方式顯示 bin 的數(shù)據(jù)。

displaydata.py

#Developed by CodersCafe
# Imports from the PyOTA library
from iota import Iota
from iota import Address
from iota import Transaction
from iota import TryteString

# Import json library
import json

# Import datetime libary
import datetime

# Import from PrettyTable
from prettytable import PrettyTable

# Define IOTA address where all transactions are stored, replace with your own address.
address = [Address(b'RLLQQVU9ZPWF9EPOVTJ9AXVJOBQWJWDPGGMALZQANY9GWR99XPITQJQBVLYCX9XLGIGLB9TBUNDTDWYBZACGWGQSLZ')]

# Define full node to be used when retrieving cleaning records
iotaNode = "https://nodes.thetangle.org:443"

# Create an IOTA object
api = Iota(iotaNode)

# Create PrettyTable object
x = PrettyTable()

# Specify column headers for the table
x.field_names = [ "city", "bin_number","Status", "last_time"]

# Find all transacions for selected IOTA address
result = api.find_transactions(addresses=address)

# Create a list of transaction hashes
myhashes = result['hashes']

# Print wait message
print("Please wait while retrieving data from the tangle...")

# Loop trough all transaction hashes
for txn_hash in myhashes:
   # Convert to bytes
   txn_hash_as_bytes = bytes(txn_hash)
   # Get the raw transaction data (trytes) of transaction
   gt_result = api.get_trytes([txn_hash_as_bytes])
   # Convert to string
   trytes = str(gt_result['trytes'][0])
   # Get transaction object
   txn = Transaction.from_tryte_string(trytes)
   # Get transaction timestamp
   timestamp = txn.timestamp
   # Convert timestamp to datetime
   last_time = datetime.datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S')
   # Get transaction message as string
   txn_data = str(txn.signature_message_fragment.decode())
   # Convert to json
   json_data = json.loads(txn_data)
   # Check if json data has the expected json tag's
   if all(key in json.dumps(json_data) for key in ["city","bin_number","Status"]):
       # Add table row with json values
       x.add_row([json_data['city'], json_data['bin_number'], json_data['Status'], last_time])

# Sort table by cleaned datetime
x.sortby = "last_time"

# Print table to terminal
print(x)

5.工作

將 IR 傳感器連接到 Raspberry Pi 零,并將液位傳感器放入垃圾箱內(nèi)。然后在樹莓派零中運(yùn)行代碼sensorread.py,讓它永遠(yuǎn)工作,它會(huì)在每天早上的固定時(shí)間無縫返回填充水平狀態(tài)。

然后在 Android 設(shè)備或計(jì)算機(jī)(或其他 Raspberry Pi)中運(yùn)行代碼 displaydata.py。它將顯示帶有箱號(hào)及其填充水平狀態(tài)的數(shù)據(jù)。通過查看數(shù)據(jù),駕駛員可以優(yōu)化卡車路線。

?

?


下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評(píng)論

查看更多

下載排行

本周

  1. 1NS1081/NS1081S/NS1081Q USB 3.0閃存數(shù)據(jù)手冊
  2. 0.40 MB   |  4次下載  |  2 積分
  3. 2光伏并網(wǎng)逆變器原理
  4. 7.31 MB   |  3次下載  |  2 積分
  5. 3T20電烙鐵原理圖資料
  6. 0.27 MB   |  2次下載  |  免費(fèi)
  7. 4PL83081 雙路恒流同步降壓轉(zhuǎn)換器技術(shù)手冊
  8. 3.34 MB   |  1次下載  |  免費(fèi)
  9. 5PL88052 4.8V至60V輸入,5A,同步降壓轉(zhuǎn)換器技術(shù)手冊
  10. 3.36 MB   |  1次下載  |  免費(fèi)
  11. 6LX8201微孔霧化驅(qū)動(dòng)芯片電路圖資料
  12. 0.15 MB   |  1次下載  |  免費(fèi)
  13. 7PC6200_7V直流電機(jī)驅(qū)動(dòng)器技術(shù)手冊
  14. 0.47 MB   |  次下載  |  免費(fèi)
  15. 8恒溫晶體振蕩器(OCXO)FOC-2D:20.6×20.6mm在通信基站和測試設(shè)備中的應(yīng)用參數(shù)規(guī)格
  16. 485.75 KB  |  次下載  |  免費(fèi)

本月

  1. 1如何看懂電子電路圖
  2. 12.88 MB   |  329次下載  |  免費(fèi)
  3. 2RK3588數(shù)據(jù)手冊
  4. 2.24 MB   |  14次下載  |  免費(fèi)
  5. 3PC5502負(fù)載均流控制電路數(shù)據(jù)手冊
  6. 1.63 MB   |  12次下載  |  免費(fèi)
  7. 4STM32F10x參考手冊資料
  8. 13.64 MB   |  12次下載  |  1 積分
  9. 5OAH0428 V1.0英文規(guī)格書
  10. 5.86 MB   |  8次下載  |  免費(fèi)
  11. 6NS1081/NS1081S/NS1081Q USB 3.0閃存數(shù)據(jù)手冊
  12. 0.40 MB   |  4次下載  |  2 積分
  13. 7PID控制算法學(xué)習(xí)筆記資料
  14. 3.43 MB   |  3次下載  |  2 積分
  15. 8光伏并網(wǎng)逆變器原理
  16. 7.31 MB   |  3次下載  |  2 積分

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935132次下載  |  10 積分
  3. 2開源硬件-PMP21529.1-4 開關(guān)降壓/升壓雙向直流/直流轉(zhuǎn)換器 PCB layout 設(shè)計(jì)
  4. 1.48MB  |  420064次下載  |  10 積分
  5. 3Altium DXP2002下載入口
  6. 未知  |  233089次下載  |  10 積分
  7. 4電路仿真軟件multisim 10.0免費(fèi)下載
  8. 340992  |  191415次下載  |  10 積分
  9. 5十天學(xué)會(huì)AVR單片機(jī)與C語言視頻教程 下載
  10. 158M  |  183349次下載  |  10 積分
  11. 6labview8.5下載
  12. 未知  |  81599次下載  |  10 積分
  13. 7Keil工具M(jìn)DK-Arm免費(fèi)下載
  14. 0.02 MB  |  73818次下載  |  10 積分
  15. 8LabVIEW 8.6下載
  16. 未知  |  65990次下載  |  10 積分