草稿改編,紀錄使用
ESP32 master端,傳送資料給slave端
#include <esp_now.h>
#include <WiFi.h>
#include <Wire.h>
草稿改編,紀錄使用
ESP32 master端,傳送資料給slave端
#include <esp_now.h>
#include <WiFi.h>
#include <Wire.h>
這程式為改編,記錄使用
ESP32 藍芽SERVER端的草稿,發送雷射測距的結果,利用藍芽傳送到另一個ESP32裝置
/*
Video: https://www.youtube.com/watch?v=oCMOYS71NIU
Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleNotify.cpp
//參考網址 https://www.itread01.com/content/1546113615.html
//https://zhidao.baidu.com/question/104592558.html?qbl=relate_question_4&word=.str%28%29%20%CA%B2%C3%B4%D2%E2%CB%BC
//標準庫的string類提供了三個成員函式來從一個string得到c型別的字元陣列
//主要介紹c_str
//c_str():生成一個const char*指標,指向以空字元終止的陣列。
ESP32 wifi WebServer設定
參考原文網址:https://kknews.cc/code/jleplne.html
https://kknews.cc/zh-tw/code/e6v88q4.html
網路資源
#include <WiFi.h>
//匯入Wifi.h標頭檔
const char* ssid="你的AP名稱SSID";
const char* passphrase="你的WIFI密碼";
https://www.youtube.com/watch?v=yzPKg93T7q4
參考文章
https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/
ino
// 匯入ESP32 WIFI 的標頭檔
#include <WiFi.h>
利用ESP32的藍芽,將VL53L0X測距結果傳送給UE4
[Arduino 程式 ]
#include<Wire.h> //匯入I2C標頭檔
#include<VL35L0X.h> //匯入雷射測距儀標頭檔
#include "BluetoothSerial.h" //匯入藍芽標頭檔
#include <wire.h> //匯入<wire.h>標頭檔,函式庫 此為內建標準I2C函式庫
#include "BluetoothSerial.h" //匯入標頭檔,外部函式庫,通常由廠商或Github下載
會先從libraries尋找函式庫