2024 DigiKey创意大赛】职场提神法宝项目-ESP32-C6与手机APP进行通讯
本帖最后由 eew_cT3H5d 于 2024-10-28 07:51 编辑<p>打开案例库:</p>
<p> </p>
<p> </p>
<p>修改增加传感器读取代码</p>
<pre>
<code>String data = 'A' + String(temp.temperature) + 'B' + String(humidity.relative_humidity) + 'C' + String(scd30.CO2, 3)
+'D' + String(sgp.TVOC) + 'E' + String(massConcentrationPm2p5) +'F' + String(vocIndex) +'@';
if (deviceConnected) {
pTxCharacteristic->setValue(data);
pTxCharacteristic->notify();
txValue++;
delay(10);// bluetooth stack will go into congestion, if too many packets are sent
}
</code></pre>
<p>APP设计:</p>
<p> </p>
<p>代码设计:</p>
<p> </p>
<p> </p>
<p>调试设计:</p>
<div style="text-align: left;"></div>
<p> </p>
页:
[1]