Simple client and server #3086
Replies: 2 comments
-
|
Posted at 2019-10-01 by @gfwilliams Hi, It is quite a common thing to want to do, but Bluetooth LE support isn't quite as straightforward as stuff like COM ports and there isn't a nice platform agnostic way to just send data. I've tried to write up a lot of the ways of communicating from different languages with examples here: http://www.espruino.com/Interfacing#bluetooth-le Realistically your best bets right now are:
|
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-02 by Robin Tue 2019.10.01
Hello @user103765 Had searching the forum returned too few results? This link might be a good starting point Puck and controlling a web page A good launching point from the main site: A Bi-Directional quick test using the 'Try Me' button near page bottom
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-10-01 by user103765
Hello,
I received a Puck.js not too long ago and wanted to start using it in some basic tasks that would involve running scripts on my computer, but I have to say I'm kind of at a loss at how to start the process. I'm able to pair the device to my machine and use the IDE easily as well as figure out how to toggle the LEDs and whatnot, but i'm afraid I have no idea how to proceed forward to be able to send custom messages to my paired device (Puck.JS -> Windows 10) in a script.
The simplest example would be that I want a value (e.g. a number between 0-255) to be sent inside a setWatch() call from Puck.JS, and I want a service on W10 that would be able to receive that call and respond to the received value (e.g. If I received a 1 then run this script, a 2 then run this other script, etc.)
I thought this would be a common enough use case to have a few examples but I'm having trouble finding anything. Are there any repositories or code examples in the documentation I'm missing that would be able to accomplish this or are there any guides that anyone could point me to that would get me started? It'd be really helpful.
AFAIK, I would have to become at least a bit knowledgeable on Bluetooth LE protocol itself and terminologies to even get started, which is kind of where I might start soon. I've fallen off of using 'Web Bluetooth' because as far as I understand it, it would require an always active chrome web page up, which if im understanding correctly isn't quite what i'm looking for.
Beta Was this translation helpful? Give feedback.
All reactions