-
Notifications
You must be signed in to change notification settings - Fork 1
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
JavaScript client, as done with LEGO Education SPIKE website #3
Comments
A 3rd party implementation seems to be available at https://github.com/tuftsceeo/SPIKE-Web-Interface/blob/master/server/examples/modules/ServiceDock_SPIKE.js |
We don't have any public javascript documentation, but there is really nothing SPIKE specific to consider when connecting. Sending: Note that the documentation is from the perspective of the hub, so my txChar here uses the characteristic that in the documentation is called rx, and vice versa. Remember to start notifications in order to start receiving data. If you need more documentation, I think the best ressource is Googles Web Bluetooth Samples Your link into our application indicates that you have selected SPIKE Essential as your product. |
Thank you for the clarification. I believe it would be interesting to have a most basic example on e.g Glitch that facilitates discoverability. It could be the shortest page allowing to
The rest would be left to the user but I find that such remixable examples on Glitch helps a lot to foster a community. Having the first steps to experiment then modified is a lot more engaging to begin than generic documentation. PS: I actually meant to link to https://spike.legoeducation.com/prime/project but good to learn how Essential also works for the future. cc @adamwern |
That is a really good point, thank you! I'll look into the possibility of setting up a little more examples. There are no handles in the protocol to do anything with the hardware. Running motors, turning on lights. Using the python experience in the Spike app should give you a pretty good idea of how to make the hardware do things, although the app module that can be used in the app to play sounds, plot graph data and stuff like that is obviously not present, you'd have to build things like that yourself using the Essential and the Lego Wireless Protocol works really differently, in that it cannot run programs, it can just run individual commands, so for that you can send a message to make a motor run. |
On https://spike.legoeducation.com/essential/project one can connect to the Hub via WebBluetooth. Consequently there is already a JavaScript client implementation. Is it documented somewhere?
The text was updated successfully, but these errors were encountered: