Tumult Hype + Web Bluetooth: let's play with Lego Robots! :D


(www.360FUN.net) #1

When I heard about Web Bluetooth my first thought was “ehi, what if I can make an easy to drag’n’drop library to extend the Tumult Hype functionalities?!?”. So, when the API was still in alpha, I started to play with it trying to send commands to a Lego bluetooth controller (SBrick) in order to move a small test robot. The Web Bluetooth implementation status is still a work in progress but mostly you can play with it from Mac OS, Linux (Chrome) and Android (5 with Chromium or 6+ with Chrome).

I decided to created a generic library to manage the Bluetooth device discovery, write, read and cache characteristics:
Bluetooth.js (@MaxZieb Maybe we can add this to the Hype extensions?)

The second part of the project is a specific library to communicate with the SBrick, compatible with the latest version of the protocol:
SBrick.js

Then I started to build the UI controls directly in Hype, creating Symbols to manage different kind of interactions (buttons, sliders, joysticks…) and monitors:

With those Symbols I built SBrick Web Controller: a generic Lego SBrick RC controller for a car and a tank, here you can find more infos and online demos: sbrick.360fun.net


Enjoy! :smiley:


#2

Sorry, I am so late in responding. This looks really nice! I am just looking for the bricks and will buy some.
Best regards. Nice talk!


(𝕄𝕚𝕔𝕙𝕒𝕖𝕝 𝔾𝕒𝕣𝕠𝕗𝕒𝕝𝕠) #3

https://caniuse.com/#search=Bluetooth

I’m surprised that the adoption of this feature is so poor. Although, not really. If games could be played in the browser, with proper controller support, the App Store game sales could drop – and then how would Apple get their 30% cut?

https://bugs.webkit.org/show_bug.cgi?id=101034


#4

@Photics Thanks for the info. That basically disqualifies iOS devices to be used as small remotes but leaves us with the MacBook and Chrome. A little sad.


(www.360FUN.net) #5

Happy that you appreciated it! :hugs:


(www.360FUN.net) #6

I think is an awesome technology but is still under development, anyway you can have fun with! :wink:

https://www.behance.net/gallery/53702917/ColorPiano-Synesthesia-ART-INSTALLATION


(Freelancer) #7

Bravo Francesco! amazing projects, I love both works, the piano is awesome.

molto creativo i tuo lavoro Francesco, complimenti!


(www.360FUN.net) #8

Grazie caro! :hugs: