Post

Take a Joy-Con and connect it with WebHID, draw a picture in the air and capture it with the sensors. Create an SVG path and insert in the DOM. Apply CSS styling. Sample the DOM and use WebUSB to convert to ILDA and send it to a laser projector. I created the worlds most complicated laserpointer…

7 reposts77 likes

There is some smoothing going on, but yes, it is really accurate. What I am using for this is gyroscope + gravity from the accelerometer. They are fused in to yaw and pitch values which we use for drawing the path.

I feel these projects are escalating. Every time I think it can’t get any weirder, I somehow can make it even crazier. This is my actual heartbeat ❤️ I’ve connected a BLE heartrate monitor and triggering a CSS animation on every beat.

The main issue I had was that it auto reconnects, but that we're not allowed to send the report to enable the gyro until a user gesture. That leaves the library in a state where it thinks it has gyro, but it doesn't.

Ah. Good catch. If you want to review the whole thing, you likely find a bunch of stuff that needs improvement. There might also be some hardware generation differences, some bugs did not reproduce on my two sets of controllers.