Hi Kristóf Csillag! :)
I suggest you to take a look to the sbrick.js project: Web Bluetooth works natively in the browser with pure Javascript code. No external frameworks/compilers are needed and this allows you to combine it with other native HTML5/Javascript APIs. Of course not all browsers/devices are supported but it's quite interesting having the same code can running in Chrome for Mac OS or in Android without any change! :D The SBrick Plus support will be improved really soon, but you can already play with it.
Also the node-sbrick-protocol project is pretty interesting, especially if you wanna develop an App, but are missing some functionalities like the QuickDrive and the SBrick Plus support.
Both are independent and open source so we can all improve them all together: Jarón Barends is helping me a lot! ^_^
[blockquote]Francesco 360fun.net said:
Hi! I wrote a Javascript library that uses Web Bluetooth: soon I will add also SBrick Plus support! :)
Please take a look to my project: http://sbrick.360fun.net/
I'm working a lot on it and soon I will make some videos about the experiments that I'm doing! :D
[/blockquote]
There is also this (independent?) library: https://github.com/zkiiito/node-sbrick-protocol
However, as far as I can tell, netiher of these two libreries offers full functionality, ATM.
Is there a third (official) library, developed by Vengit, waiting to be released?
The kickstarter page ( https://www.kickstarter.com/projects/sbrick/connect-code-create-with-sbrick-plus/description ) showcases JS code like this:
function turn(v) {
SBrickPlus.drive('B', (v > 90 ? 1 : -1) );
}
This seems to suggest that they have something, doesn't it?
[blockquote]Balint Mezei said:
[blockquote]Jarón Barends said:
Hi Balint,
Thanks for your quick reply. Do you have an estimation when it will be available?
[/blockquote]
Firstly we will release the Swift Playground lessons, it will be ready within a few weeks expectedly, an our NXT/EV3 adapters will be shipped soon.
At the moment these steps are the next. Later on, the Javascript lessons will be released too, but we need some time. :)
We do our best, but we don't know the exact date.
We ask for your patience. Thank you!
Balint
SBrick Team
[/blockquote]
Hi, I am also interested in this.
However, for a starter, I don't necessarily need lessions; I would be already satisfied if I could get my hands on the required libraries to control the SBrick from the browser. Would you consider releasing that, independently of the planned lession plan?
Thank you.
Kristof
That's great! :D I'm happy that somebody start to use the code! ^_^ I have an important update to make to add SBrick Plus support and multiple SBrick management! ;) As soon as I have time I will push it, just careful because it will break your code! :P
Feel free to contact me at francesco@360fun.net
Hi Francesco, I've got it working on an Android phone in my office. If al goes well, I will be able to borrow an Android device so I can continue at home :)
Right now I'm trying to make a very basic control, just to check out how stuff works (at the moment I've put it up on my github page, https://jaronbarends.github.io/index.html, but I will move it later). I do have some technical questions about how to use your library, and about your implementation of promises, but I think it will send you an email about that. I'll keep you posted!
Happy that you like it, now let's make it working! :)
Right now the Web Bluetooth API works fully only in Mac OS, Linux and Android 6 with the latest version of Google Chrome, so be sure that you have everything updated!
SBrick.connect() can work also without parameters, tecnically should show you all the Bluetooth devices around you. Since I also got problems in this part, if it doesn't work try to pass the name of your SBrick:
SBrick.connect("SBrick"); // by default is "SBrick"
If the name is "SBrick2" or something similar, it will show up anyway because is part of the string.
The SBrick must be without password and not connected already with other devices.
Let me know if you solve it: feedbacks like these help me to improve the code and the user experience! :)
Hi Francesco, Thanks for your response. I've taken a look at your library, and it looks really promising! However, I can't seem to be able to detect my sbrick :(
To keep things as basic as possible, I have simply created a button that calls SBRICK.connect when it is clicked. The browser's connection window appears, but after scanning for some time it says "No bluetooth devices found". When I use the SBrick Driver app, that that app does detect the SBrick.
To me, this seems to be an issue between the SBrick and the bluetooth web API, but I was hoping you have an idea what's going wrong?
Hi! I wrote a Javascript library that uses Web Bluetooth: soon I will add also SBrick Plus support! :)
Please take a look to my project: http://sbrick.360fun.net/
I'm working a lot on it and soon I will make some videos about the experiments that I'm doing! :D
[blockquote]Jarón Barends said:
Hi Balint,
Thanks for your quick reply. Do you have an estimation when it will be available?
[/blockquote]
Firstly we will release the Swift Playground lessons, it will be ready within a few weeks expectedly, an our NXT/EV3 adapters will be shipped soon.
At the moment these steps are the next. Later on, the Javascript lessons will be released too, but we need some time. :)
We do our best, but we don't know the exact date.
We ask for your patience. Thank you!
Balint
SBrick Team
[blockquote]Jarón Barends said:
Hi, I just purchased an SbrickPlus because the kickstarter page said it's possible to program it with javascript. However, I can't find any documentation on it, which makes me wonder if this is even possible at the moment. I would be very disappointed if it isn't. Does anyone know?
[/blockquote]
Dear Jarón,
Thank you for your message!
We are working on the Javascript lessons, but they are under progress yet.
We have a little delay with creating the lessons, but we are working on it as hard as we can.
We ask for your patience. :)
Thank you!
Have a nice day,
Balint
SBrick Team
Hi, I just purchased an SbrickPlus because the kickstarter page said it's possible to program it with javascript. However, I can't find any documentation on it, which makes me wonder if this is even possible at the moment. I would be very disappointed if it isn't. Does anyone know?