| Zakładka z wyszukiwarką danych komponentów |
|
DFR0868 Arkusz danych(PDF) 47 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0868 Arkusz danych(HTML) 47 Page - DFROBOT |
|
47 / 89 page ![]() 2023/10/12 11:20 Beetle-ESP32-C3 RISC-V Core Development Board Wiki - DFRobot https://wiki.dfrobot.com/SKU_DFR0868_Beetle_ESP32_C3 47/89 /****************************************/ void loop() { if(deviceConnected){ //Send data when a device is connected pTxCharacteristic->setValue("I am a slave"); pTxCharacteristic->notify(); pTxCharacteristic->setValue("Hello Sever"); pTxCharacteristic->notify(); } /****************************************/ /****************************************/ delay(1000); } void bleBegin() { BLEDevice::init(/*BLE name*/"Long name works now"); BLEServer *pServer = BLEDevice::createServer(); pServer->setCallbacks(new MyServerCallbacks()); BLEService *pService = pServer->createService(SERVICE_UUID); BLECharacteristic *pRxCharacteristic = pService->createCharacteristic( CHARACTERISTIC_UUID_RX, BLECharacteristic::PROPERTY_WRITE ); pRxCharacteristic->setCallbacks(new MyCallbacks()); pTxCharacteristic = pService->createCharacteristic( CHARACTERISTIC_UUID_TX, BLECharacteristic::PROPERTY_NOTIFY ); pTxCharacteristic->addDescriptor(new BLE2902()); pService->start(); // BLEAdvertising *pAdvertising = pServer->getAdvertising(); // this still is working for backward compatibility BLEAdvertising *pAdvertising = BLEDevice::getAdvertising(); Ad ti i ddS i UUID(SERVICE UUID) |
|
Link URL |
| Czy Alldatasheet okazała się pomocna? [ DONATE ] |
O Alldatasheet | Reklama | Kontakt | Polityka prywatności | Link do karty katalogowej | Linki | Lista producentów All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |