Skip to content
New issue

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

Is there any BLE/Bluetooth connection available for Firmata connection? #8

Open
samchoy88 opened this issue Nov 3, 2020 · 2 comments

Comments

@samchoy88
Copy link

Microbit built in with bluetooth/BLE connectivity. Is that possible using wireless channel to replace the USB serial port?

@finneyj
Copy link

finneyj commented Nov 3, 2020

We did implement a serial profile for micro:bit v1, yes. I presume this was ported over along with the other services for v2. If not, it's probably not a difficult job....

@microbit-carlos
Copy link

I think this question might be more about being able to connect to a firmata client via BLE? Independently of the micro:bit board?

This library at the moment has only been tested on a serial connection, but I think the transport could be changed in these functions to send and receive data via other transports like Bluetooth:

static void receiveData() {
while (inbufCount < IN_BUF_SIZE) {
int byte = serial.read(ASYNC);
if (byte < 0) return;
inbuf[inbufCount++] = byte;
}
}
static void sendByte(uint8_t b) {
serial.sendChar(b, ASYNC);
}
static void send2Bytes(uint8_t b1, uint8_t b2) {
serial.sendChar(b1, ASYNC);
serial.sendChar(b2, ASYNC);
}
static void send3Bytes(uint8_t b1, uint8_t b2, uint8_t b3) {
serial.sendChar(b1, ASYNC);
serial.sendChar(b2, ASYNC);
serial.sendChar(b3, ASYNC);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants