You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have never written a usb driver before, nor even a typescript library, so critique is welcome.
11
+
this driver at least works with "Xbox NUI Motor" PID `0x02b0` and "Xbox NUI
12
+
Camera" PID `0x02ae` devices, labelled "Model 1414", because that's what i found
13
+
at goodwill.
12
14
13
-
this driver at least works with "Xbox NUI Motor" PID `0x02b0` and "Xbox NUI Camera" PID `0x02ae` devices, labelled "Model 1414", because that's what i found at goodwill. i there may be a few externally-identical models of "kinect", some with dramatic hardware revisions. if your device doesn't work with this, please verify that it works at all, and then send me the details.
15
+
if your device doesn't work with this, please verify that it works at all, and
16
+
then send me the details.
14
17
15
18
## what
16
19
17
-
the kinect is an early consumer depth sensor based on structured light projection, plus some other goodies. it was released in 2010 as a gamer thing and nobody cares about it anymore except me
20
+
the kinect is an early consumer depth sensor based on structured light
21
+
projection, plus some other goodies. it was released in 2010 as a gamer thing
22
+
and nobody cares about it anymore except me
18
23
19
-
they're fun, and they go for like $5 now. plus they're usb2, so i can drive them with throwaway SBCs like an rpi3. maybe not with this driver, but that's how i got familiar. i been using them for video synth input, and interactive generative art installations
24
+
they're fun, and they go for like $5 now. plus they're usb2, so i can drive them
25
+
with throwaway SBCs like an rpi3. i've been using them for video synth input,
26
+
and interactive art installations
20
27
21
-
a webusb driver lets more folks see it in person :) after i rewrite everything :)
28
+
a webusb driver lets more folks see it in person :)
22
29
23
-
## ware
30
+
## why
24
31
25
-
original kinect only.
32
+
building libfreenect with emscripten turned out to be impossible for various
33
+
reasons. whatever. it's the future and webusb is real
26
34
27
-
### Xbox NUI Motor
35
+
##ware
28
36
29
-
* accelerometer
30
-
* tilt servo
31
-
* blinkenlights
37
+
original xbox 360 kinect only.
32
38
33
-
### Xbox NUI Camera
39
+
- Xbox NUI Motor
40
+
- accelerometer
41
+
- tilt servo
42
+
- LED light
34
43
35
-
* depth 11bpp, 10bpp
36
-
* visible 8bpp bayer, 16bpp yuv
37
-
* infrared 10bpp
38
-
* arbitrary register manipulation
44
+
- Xbox NUI Camera
45
+
- depth 11bpp, 10bpp
46
+
- visible bayer, yuv
47
+
- infrared 10bpp
48
+
- register manipulation
39
49
40
-
visible and infrared stream from the same endpoint, so you can only have one at a time. you can use my pipeline and get a `ReadableStream<ImageData>` that you just blit to canvas, or set a custom deraw function.
50
+
visible and infrared stream from the same hardware endpoint, so you can only
51
+
have one of those at a time.
41
52
42
-
## why
53
+
## how
43
54
44
-
building libfreenect with emscripten turned out to be impossible for various reasons. whatever. it's the future and webusb is real
55
+
go dig your kinect out of the closet. plug it in. open
56
+
<https://turbocrime.github.io/webnect>
45
57
46
-
## how
58
+
or for a local demo, clone this repo and run:
47
59
48
-
go dig your kinect out of the closet. plug it in. open <https://turbocrime.github.io/webnect>
60
+
```bash
61
+
pnpm install
62
+
pnpm dev
63
+
```
49
64
50
-
for a local demo, clone this repo.
65
+
demo web server opens on vite default `https://localhost:5173`
51
66
52
67
## diy
53
68
54
-
available on npm as [`@webnect/webnect`](https://www.npmjs.com/package/@webnect/webnect)
if you see an empty device selection modal, you probably have the wrong model kinect. you can check your usb devices with `lsusb` on linux or on `system_profiler SPUSBDataType` on macos
82
+
if you see an empty device selection modal, you probably have the wrong model
83
+
kinect.
81
84
82
-
if you see glitchy stream output, haha nice. cool
85
+
if the motor is available but the camera is not, make sure your kinect is
86
+
powered correctly.
83
87
84
-
### bad parts
88
+
check your usb devices:
89
+
- on linux use `lsusb`
90
+
- on macos use `system_profiler SPUSBDataType`
85
91
86
-
a single kinect is technically three devices in a trenchcoat. afaict there's no way to associate them, because webusb won't expose bus position. it doesn't matter; you probably only plugged in one kinect anyway.
92
+
#### its glitchy
87
93
88
-
also, typescript aint exactly the optimal language for bitmath or destructuring binary data
94
+
haha nice. cool
89
95
90
-
##way
96
+
### bad parts
91
97
92
-
probably going after pose features next, maybe alignment of video to depth. and then firmware/audio stuff.
98
+
a single kinect is technically three USB devices in a trenchcoat. full control
99
+
requires multiple permission requests.
93
100
94
-
someday.... kinect2?
101
+
the motor device does not report a serial number, so there's no way to reliably
102
+
associate the motors if you have multiple kinects.
0 commit comments