We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blocklyduino產出的BLE程式無法把˙7697的資料傳到手機的App inventor程式中
App inventor程式用 Cavedu所做的範例 http://blog.cavedu.com/2017/11/27/app-inventor-iot-linkit-7697%e4%bd%bf%e7%94%a8ble%ef%bc%88%e8%97%8d%e7%89%994-0%ef%bc%89%e5%82%b3%e9%80%81%e5%85%89%e6%84%9f%e6%b8%ac%e5%99%a8%e6%95%b8%e5%80%bc/
/*
#include <LBLE.h> #include <LBLEPeriphral.h>
int item;
LBLEService __periphralService("19B10010-E8F2-537E-4F6C-D104768A1214"); LBLECharacteristicInt __19b10011_e8f2_537e_4f6c_d104768a1214("19B10011-E8F2-537E-4F6C-D104768A1214", LBLE_READ | LBLE_WRITE);
void setup() { Serial.begin(9600);
LBLE.begin(); while (!LBLE.ready()) { delay(100); }
__periphralService.addAttribute(__19b10011_e8f2_537e_4f6c_d104768a1214); Serial.println("BLE reday!"); Serial.print("BLE address = ["); Serial.print(LBLE.getDeviceAddress().toString()); Serial.println("]"); LBLEPeripheral.addService(__periphralService); LBLEPeripheral.setName("LinkIt 7697"); LBLEPeripheral.begin(); LBLEAdvertisementData __advertisement; __advertisement.configAsConnectableDevice("LinkIt 7697"); LBLEPeripheral.advertise(__advertisement);
}
void loop() { item = analogRead(A0); Serial.println(item); __19b10011_e8f2_537e_4f6c_d104768a1214.setValue(item); delay(1000); }
Serial.println("BLE reday!"); Serial.print("BLE address = ["); Serial.print(LBLE.getDeviceAddress().toString()); Serial.println("]"); __periphralService.addAttribute(__19b10011_e8f2_537e_4f6c_d104768a1214); LBLEPeripheral.addService(__periphralService); //LBLEPeripheral.setName("LinkIt 7697"); LBLEPeripheral.begin(); LBLEAdvertisementData __advertisement; __advertisement.configAsConnectableDevice("LinkIt 7697"); LBLEPeripheral.advertise(__advertisement);
The text was updated successfully, but these errors were encountered:
pablosun
No branches or pull requests
blocklyduino產出的BLE程式無法把˙7697的資料傳到手機的App inventor程式中
App inventor程式用 Cavedu所做的範例
http://blog.cavedu.com/2017/11/27/app-inventor-iot-linkit-7697%e4%bd%bf%e7%94%a8ble%ef%bc%88%e8%97%8d%e7%89%994-0%ef%bc%89%e5%82%b3%e9%80%81%e5%85%89%e6%84%9f%e6%b8%ac%e5%99%a8%e6%95%b8%e5%80%bc/
blocklyduino程式
blocklyduino產出的c code
/*
*/
#include <LBLE.h>
#include <LBLEPeriphral.h>
int item;
LBLEService __periphralService("19B10010-E8F2-537E-4F6C-D104768A1214");
LBLECharacteristicInt __19b10011_e8f2_537e_4f6c_d104768a1214("19B10011-E8F2-537E-4F6C-D104768A1214", LBLE_READ | LBLE_WRITE);
void setup()
{
Serial.begin(9600);
LBLE.begin();
while (!LBLE.ready()) { delay(100); }
__periphralService.addAttribute(__19b10011_e8f2_537e_4f6c_d104768a1214);
Serial.println("BLE reday!");
Serial.print("BLE address = [");
Serial.print(LBLE.getDeviceAddress().toString());
Serial.println("]");
LBLEPeripheral.addService(__periphralService);
LBLEPeripheral.setName("LinkIt 7697");
LBLEPeripheral.begin();
LBLEAdvertisementData __advertisement;
__advertisement.configAsConnectableDevice("LinkIt 7697");
LBLEPeripheral.advertise(__advertisement);
}
void loop()
{
item = analogRead(A0);
Serial.println(item);
__19b10011_e8f2_537e_4f6c_d104768a1214.setValue(item);
delay(1000);
}
局部修改blocklyduino程式產出的c code 可以傳送資料
/*
*/
#include <LBLE.h>
#include <LBLEPeriphral.h>
int item;
LBLEService __periphralService("19B10010-E8F2-537E-4F6C-D104768A1214");
LBLECharacteristicInt __19b10011_e8f2_537e_4f6c_d104768a1214("19B10011-E8F2-537E-4F6C-D104768A1214", LBLE_READ | LBLE_WRITE);
void setup()
{
Serial.begin(9600);
LBLE.begin();
while (!LBLE.ready()) { delay(100); }
Serial.println("BLE reday!");
Serial.print("BLE address = [");
Serial.print(LBLE.getDeviceAddress().toString());
Serial.println("]");
__periphralService.addAttribute(__19b10011_e8f2_537e_4f6c_d104768a1214);
LBLEPeripheral.addService(__periphralService);
//LBLEPeripheral.setName("LinkIt 7697");
LBLEPeripheral.begin();
LBLEAdvertisementData __advertisement;
__advertisement.configAsConnectableDevice("LinkIt 7697");
LBLEPeripheral.advertise(__advertisement);
}
void loop()
{
item = analogRead(A0);
Serial.println(item);
__19b10011_e8f2_537e_4f6c_d104768a1214.setValue(item);
delay(1000);
}
The text was updated successfully, but these errors were encountered: