Make a directory inside your “tessel-code” folder called “camera”, change directory into that folder, and initialize a tessel project:
mkdir camera; cd camera; t2 init
Plug Tessel into your computer via USB, then plug the camera module into either of Tessel’s USB ports. You will also need a UVC compatible USB camera.
Install by typing
npm install tessel-av into the command line.
Rename “index.js” to “camera.js” and replace the file’s contents with the following:
Save the file.
Make sure your Tessel and computer are connected to the same Wifi network. Then, in your command line,
t2 run camera.js
Hooray! You should see the following:
In your terminal:
In your browser:
bishopis just the name of my Tessel 2 board, your Tessel’s URL will include whatever you’ve named your board!
Bonus: Try connecting a button to your Tessel 2 and use it as a shutter. Hint: it may help to look for the NPM module
Extra bonus: Use an USB storage drive to store many photos. Hint: check out the “storage” module tutorial.
To see what else you can do with the USB camera module, read the tessel-av documentation.
What else can you do with a camera module? Get inspired by a community-created project.
What are you making? Share your invention!
If you run into any issues you can check out the camera forums.