- username: pi
- password: On the general channel topic on Slack
- Slack: pongbot.slack.com
- Raspberry Pi 3 running Raspian Linux
- Camera Module NOIR v2
- Node Version Manager with Node.js installed
- Python 2.7
- OpenCV 2.4.9
To get a file over SCP if you're remoting in:
scp pi@ipaddres:/path/to/image.jpg /local/path/image.jpg
The serverless code and the code to run on the pi is available at this GitHub repo:
git clone https://github.com/serinth/pongbot
Get a image/video from the camera
Raspbian has a built in quick access to get to the camera module. To capture an image just run:
raspistill -o image.jpg
If the image is flipped around we can do:
raspistill -vf -hf -o image.jpg
Using OpenCV code in
To get a video stream:
The top level of this structure is using serverless framework. Install using
npm install -g serverless@beta.
The bot will be attached as a custom command integration on the Slack channel.
Deploy Entire Solution
npm run build
serverless deploy function --function (your function name)
Create all vision programs using the same python version and OpenCV version as the Pi.
The only thing that you will need to change is the camera initialization function from your webcam to the
PiCamera python class.
track.py for examples.
A certificate will be installed on the Pi in
~/certs to talk to IoT.