The world's easiest pet camera with pan control that can be viewed from the Internet.
These instructions will get you a copy of the project up and running on your local machine for testing.
A SkyWay account is required. You can create an account for free.
Hardware
- Raspberry Pi
- USB Camera
- Servo
Wiring
- Pi 2pin (5V Power) -> Servo VCC
- Pi 6pin (Ground) -> Servo GND
- Pi 12pin (GPIO 18) -> Servo SIGNAL
Software
- Login SkyWay
- Create Project
- Create Application
- Keep the displayed
Application ID
andSecret
% git clone https://github.com/komasayuki/pet-cam
% cd pet-cam
% npm install
% npm run build
# index.html and javascript in ./dist
# clone pet-cam repository from GitHub
% git clone https://github.com/komasayuki/pet-cam-pi
% cd pet-cam-pi/server
# first time only
% npm install
# launch pet-cam-pi server on port 8080
% sudo npm start
Now you can open Camera web page by Raspberry pi's web browser.
Camera side URL: http://localhost:8080/index.html?camera=true&audio=true
You can invoke Deploy to GitHub Pages
GitHub Actions manually.
Push Run workflow
of Deploy to GitHub Pages
in GitHub Actions.
You can access the web page on GitHub Pages.
Viewer side URL: https://komasayuki.github.io/pet-cam-pi/index.html?camera=false
WebRTC is only available on iOS devices from pages hosted over https. This repository was made from SkyWay's p2p room example.