在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美1级

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
電子發燒友網>電子資料下載>電子資料>步道保護NFT開源分享

步道保護NFT開源分享

2023-06-13 | zip | 0.00 MB | 次下載 | 免費

資料介紹

描述

0. 結果

遠足真的很有趣,但有時遠足徑的使用過于頻繁,以至于當地的生態系統可能會面臨風險。例如,偏離軌道并造成損壞。此外,非法狩獵也會使該物種處于危險之中。

目標:獎勵徒步旅行者報告活動和步道狀況,以及使用部署在各個遠足地點的 Wio 終端收集有關步道的傳感器信息

?

?

poYBAGSAiaSAA4YLAABPAMkmEts167.png
?
?
pYYBAGSAiaeAPlYMAAC0tEo7uD0451.png
NFT 索賠
?
poYBAGSAia2AG0PzAADQQXyPf9Q308.png
NFT獎勵
?
pYYBAGSAibCARJmqAADOKs3kpJI188.png
社區活動
?

1.建造

1.a 硬件

Seeed Studio LoRaWAN 開發套件使這對用戶非常友好,無需真正的硬件技能。

該套件配備了所需的所有基本傳感器。在本指南中,我們將使用套件中包含的 LoRa-E5 和 AI 視覺傳感器。

將 AI 攝像頭連接到左側端口,將 LoRa 連接到右側端口。

pYYBAGSAibaAckoJAAnEsxmqgUA903.jpg
?

使用以下 Arduino 代碼并上傳到 Wio 終端。

#include 
#include "disk91_LoRaE5.h"
#include "Seeed_Arduino_GroveAI.h"
#include 
#include "TFT_eSPI.h"
#define FF17 &FreeSans9pt7b

// keys
uint8_t deveui[] = {0x...};
uint8_t appeui[] = {0x...};
uint8_t appkey[] = {0x...};

GroveAI ai(Wire);
TFT_eSPI tft;
Disk91_LoRaE5 lorae5(false); // true, false whatever

void setup()
{

  Wire.begin();
  Serial.begin(115200);
  randomSeed(analogRead(0));

  tft.begin();
  tft.setRotation(3);
  tft.fillScreen(TFT_BLACK);
  tft.setFreeFont(FF17);
  tft.fillScreen(TFT_BLACK);
  tft.setCursor(0, 20);

  Serial.println("begin");
  tft.println("begin");

  uint32_t start = millis();

  tft.println("LoRa E5 Init");

  // init the library, search the LORAE5 over the different WIO port available
  if (!lorae5.begin(DSKLORAE5_SEARCH_WIO))
  {
    Serial.println("LoRa E5 Init Failed");
    tft.println("LoRa E5 Init Failed");
    while (1)
      ;
  }

  tft.println("LoRa E5 Setup");
  // Setup the LoRaWan Credentials
  if (!lorae5.setup(
        DSKLORAE5_ZONE_US915, // LoRaWan Radio Zone EU868 here
        deveui,
        appeui,
        appkey))
  {
    Serial.println("LoRa E5 Setup Failed");
    tft.println("LoRa E5 Setup Failed");
    while (1);
  }

  if (ai.begin(ALGO_OBJECT_DETECTION, MODEL_EXT_INDEX_1)) // Object detection and pre-trained model 1
  {
    Serial.print("Version: ");
    Serial.println(ai.version());
    Serial.print("ID: ");
    Serial.println(ai.id());
    Serial.print("Algo: ");
    Serial.println(ai.algo());
    Serial.print("Model: ");
    Serial.println(ai.model());
    Serial.print("Confidence: ");
    Serial.println(ai.confidence());
    tft.print("AI version ");
    tft.println(ai.version());
  }
  else
  {
    Serial.println("Algo begin failed. Program halting here.");
    tft.println("Algo begin failed. Program halting here.");
    while (1)
      ;
  }
}

void loop()
{
  uint32_t tick = millis();
  tft.fillScreen(TFT_BLACK);
  tft.setCursor(0, 20);
  tft.println("Begin ai invoke");
  //  tft.println(ai.state());
  if (ai.invoke()) // begin invoke
  {
    tft.println("wait for ai invoke");
    while (1) // wait for invoking finished
    {
      CMD_STATE_T ret = ai.state();
      if (ret == CMD_STATE_IDLE)
      {
        break;
      }
      delay(20);
    }
    tft.println("AI state ready");
    uint8_t len = ai.get_result_len(); // receive how many people detect
    if (len)
    {
      int time1 = millis() - tick;
      Serial.print("Time consuming: ");
      Serial.println(time1);
      Serial.print("Number of people: ");
      Serial.println(len);
      tft.println("Ident success");
      object_detection_t data; //get data

      for (int i = 0; i < len; i++)
      {
        Serial.println("result:detected");
        Serial.print("Detecting and calculating: ");
        Serial.println(i + 1);
        ai.get_result(i, (uint8_t *)&data, sizeof(object_detection_t)); //get result

        Serial.print("confidence:");
        Serial.print(data.confidence);
        Serial.println();

        uint8_t data[] = { random() };


        tft.fillScreen(TFT_BLACK);
        tft.setFreeFont(FF17);
        tft.setCursor(0, 20);
        Serial.print("Unique code: ");
        tft.print("Unique code: ");
        for (int i = 0; i < 4; i++)
        {
          Serial.print(data[i]);
          tft.print(data[i]);
        }

        Serial.println();
        tft.println();

        tft.println("sending to Helium");
        // Send an uplink message. The Join is automatically performed
        if (lorae5.send_sync(
              1,            // LoRaWan Port
              data,         // data array
              sizeof(data), // size of the data
              false,        // we are not expecting a ack
              7,            // Spread Factor
              14            // Tx Power in dBm
            ))
        {
          Serial.println("Uplink done");
          if (lorae5.isDownlinkReceived())
          {
            Serial.println("A downlink has been received");
            if (lorae5.isDownlinkPending())
            {
              Serial.println("More downlink are pending");
            }
          }
        } else {
          Serial.println("uplink failed");
        }
        delay(30000);
      }
    }
    else
    {
      //      Serial.println("No identification");
      delay(1000);
    }
  }
  else
  {
    delay(1000);
    Serial.println("Invoke Failed.");
    tft.println("Invoke Failed.");
  }
}

LoRa 代碼基于https://github.com/disk91/Disk91_LoRaE5并且有許多示例可以在完全提交上述代碼之前測試設備。

該代碼將檢測到一個人,然后顯示一個隨機數,然后可以在前端兌換該隨機數以領取 NFT。終端應顯示以下內容:

?

1.b 軟件

1.ba 氦氣

這部分將是工作的主體。應設置 Helium 控制臺,使集成流程如下所示

poYBAGSAibiALZP7AAAeyNZP_aA263.png
?

uniq_code_decoder 定義為:

function Decoder(bytes, port, uplink_info) {
  var decoded = {};
  
  if (port == 1) {
    decoded.unique_code = bytes;
  }

  return decoded;
}

對于 webhook 階段,我選擇使用 RequestBin:

poYBAGSAibuACXyeAACHvG-69RA694.png
?

對于“節點”階段,代碼是:

import { FormData, Blob } from "formdata-node";
import { FormDataEncoder } from "form-data-encoder";
import {Readable} from "stream"
import fetch from "node-fetch"

// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
  async run({ steps, $ }) {
    // Return data to use it in future steps
    const url = "https://api.web3.storage/upload";

    let sensorData = {
        "device_pinValue": steps.trigger.event.body.decoded.payload.unique_code
    };
    console.log(sensorData);
    let form = new FormData();
    let blob = new Blob([new TextEncoder().encode(JSON.stringify(sensorData))], { type: "application/json;charset=utf-8" });
    console.log(blob);
    
    form.append('file', blob, steps.trigger.event.body.uuid + ".json");
    console.log(form);
    const encoder = new FormDataEncoder(form)

    const key = "web3APIKEY"
    const options = {
      method: "post",
      headers: Object.assign({}, encoder.headers, {"Authorization": "Bearer "+ key}),
      body: Readable.from(encoder)
    }


    const resp = await fetch(url, options);
    const text = await resp.text()
    console.log(text);
    return resp;
  },
})

“web3APIKEY”需要替換為來自web3.storage (免費)的 API 密鑰。

這部分也可以由后端代碼提供服務。

1.bb web3傳送門

前端代碼位于: https: //github.com/exp0nge/trail-conservation/tree/master/trail-ui它是使用 ReactJS 構建的,因此應該非常易讀。有幾個集成:

  • NFTPort:使用來自終端的唯一代碼鑄造 Trail Completionist NFT
  • Pexels:NFT 圖像
  • web3.storage:NFT鏡像備份的去中心化存儲

可在此處查看演示:https://trail-conservation-6e76un.spheron.app/


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

評論

查看更多

下載排行

本周

  1. 1DD3118電路圖紙資料
  2. 0.08 MB   |  1次下載  |  免費
  3. 2AD庫封裝庫安裝教程
  4. 0.49 MB   |  1次下載  |  免費
  5. 3PC6206 300mA低功耗低壓差線性穩壓器中文資料
  6. 1.12 MB   |  1次下載  |  免費
  7. 4網絡安全從業者入門指南
  8. 2.91 MB   |  1次下載  |  免費
  9. 5DS-CS3A P00-CN-V3
  10. 618.05 KB  |  1次下載  |  免費
  11. 6海川SM5701規格書
  12. 1.48 MB  |  次下載  |  免費
  13. 7H20PR5電磁爐IGBT功率管規格書
  14. 1.68 MB   |  次下載  |  1 積分
  15. 8IP防護等級說明
  16. 0.08 MB   |  次下載  |  免費

本月

  1. 1貼片三極管上的印字與真實名稱的對照表詳細說明
  2. 0.50 MB   |  103次下載  |  1 積分
  3. 2涂鴉各WiFi模塊原理圖加PCB封裝
  4. 11.75 MB   |  89次下載  |  1 積分
  5. 3錦銳科技CA51F2 SDK開發包
  6. 24.06 MB   |  43次下載  |  1 積分
  7. 4錦銳CA51F005 SDK開發包
  8. 19.47 MB   |  19次下載  |  1 積分
  9. 5PCB的EMC設計指南
  10. 2.47 MB   |  16次下載  |  1 積分
  11. 6HC05藍牙原理圖加PCB
  12. 15.76 MB   |  13次下載  |  1 積分
  13. 7802.11_Wireless_Networks
  14. 4.17 MB   |  12次下載  |  免費
  15. 8蘋果iphone 11電路原理圖
  16. 4.98 MB   |  6次下載  |  2 積分

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935127次下載  |  10 積分
  3. 2開源硬件-PMP21529.1-4 開關降壓/升壓雙向直流/直流轉換器 PCB layout 設計
  4. 1.48MB  |  420064次下載  |  10 積分
  5. 3Altium DXP2002下載入口
  6. 未知  |  233089次下載  |  10 積分
  7. 4電路仿真軟件multisim 10.0免費下載
  8. 340992  |  191390次下載  |  10 積分
  9. 5十天學會AVR單片機與C語言視頻教程 下載
  10. 158M  |  183342次下載  |  10 積分
  11. 6labview8.5下載
  12. 未知  |  81588次下載  |  10 積分
  13. 7Keil工具MDK-Arm免費下載
  14. 0.02 MB  |  73815次下載  |  10 積分
  15. 8LabVIEW 8.6下載
  16. 未知  |  65989次下載  |  10 積分
主站蜘蛛池模板: 日本人亚洲人成人 | 欧美无遮挡国产欧美另类 | 五月婷婷 六月丁香 | 色综合天天综合网看在线影院 | 亚洲成人免费在线观看 | 国产色婷婷精品综合在线观看 | 国产精品久久久久久久久福利 | 日日干天天爽 | 色香婷婷 | 日韩毛片在线影视 | 免费视频在线播放 | 亚洲资源在线播放 | 午夜影院网站 | 国产精品免费久久久久影院 | 狠狠色婷婷丁香六月 | 婷婷日日夜夜 | 亚洲一级影院 | 黄色欧美 | 亚洲欧美成人综合久久久 | 亚洲一区二区免费 | 天天综合亚洲国产色 | 永久在线观看 | 1314酒色网| 免费大片黄在线观看日本 | 咪咪爱毛片 | 欧美性极品xxxxx | 美女被强插 | 婷婷激情五月综合 | 狠狠色丁香婷婷综合橹不卡 | 婷婷开心激情 | 18女人毛片水真多免费 | 色狠狠狠色噜噜噜综合网 | 黄视频在线观看免费 | 666精品国产精品亚洲 | 日本天堂影院 | www.黄网站| 日本免费在线一区 | 色综合综合色 | 国产一级αv片免费观看 | 久久久久99精品成人片三人毛片 | 91男女视频|