Ever wondered how you could stream camera footage from your Arduino boards directly to your web browser? The Web Serial API allows you to do just that effortlessly. Just send the bytes of the camera image over the Serial port to your browser to render it.
The Web Serial Camera example shows you how to send image data over the wire from your Arduino board and how to unpack the data in JavaScript for rendering. In addtion, in the source code of the web application you can find some example image filters that show you how to manipulate pixel data to achieve stunning visual effects.
The Arduino sketch (CameraCaptureWebSerial) for sending the camera image data can be found here and is also directly available from the “Examples→Camera” menu in the Arduino IDE when selecting one of the supported boards:
- Arduino GIGA R1 WiFi with OV7675, OV7670, GC2145, HM0360 or HM01B0
- Arduino Nicla Vision
- Arduino Portenta H7 + Vision Shield
The web application for displaying the camera image can be accessed here. You may also take a look at this tutorial that explains the setup in more detail.
Try it out today and bring your Arduino projects to life with live camera streaming in your web browser!
This software is provided “as is” and we make no express or implied warranties whatsoever with respect to its functionality, operability, or use, including, without limitation, any implied warranties of merchantability, fitness for a particular purpose, or infringement. We expressly disclaim any liability whatsoever for any direct, indirect, consequential, incidental or special damages, including, without limitation, lost revenues, lost profits, losses resulting from business interruption or loss of data, regardless of the form of action or legal theory under which the liability may be asserted, even if advised of the possibility or likelihood of such damages.