DeepPens is a voice enabled Internet of Things (IoT) connected robot whiteboard first displayed at the AWS re:Invent builders fair 2019.
The DeepPens device was built using:
- JJRobots iBoardBot
- This comes with an Arduino Leonardo and JJRobots Brain Shield
- Raspberry Pi - to drive USB serial to iBoardbot, iboardbot-web rust service and AWS IoT Greengrass
- Amazon Transcribe - for text to speech translation
- AWS IoT Greengrass - for invoking AWS Lambda on a Raspberry PI
- AWS IoT Core - for connecting to AWS IoT
- AWS Lambda - for invoking a post to a local web server
- AWS Fargate - for backend container based API
- AWS Amplify Console - for single page web application hosting
- AWS Cloud Development Kit (CDK) - for deployment of API backend
- AWS Code Suite (CodeCommit, CodePipeline, CodeBuild) for CI/CD
- iboardbot-web - Custom 3rd party web interface for iBoardbot
- iboardbot-code - Custom 3rd firmware to drive the iBoardbot via USB serial
To get started with your own DeepPens project:
- Buy and assemble the JJRobots iBoardBot
- Setup a Raspberry Pi with your Linux distribution of choice (we <3 Raspbian!)
- Install custom Arduino firmware using Arduino IDE via USB
- Install iboardbot-web onto the Raspberry Pi
- This requires the installation of Rust on the Pi, grab some coffee... this may take a while!
- Install this into /home/pi/iboardbot-web
- Grab the config from ./iot/config.json and put this into the directory
- Copy iboard-web.service to the Pi
- Copy iboardbot to /usr/bin and chmod +x it
- We've also included a systemd file for greengrassd to make it start on boot
- Now you should be able to test the implementation via local web server with a test SVG file
- Ready for IoT connectivity!
- Install AWS IoT Greengrass onto the Raspberry Pi and setup a new AWS IoT Core device via AWS Console
- Setup the DeepPens Lambda via AWS IoT Core for deployment onto the Raspberry Pi
- Deploy backend API
- The backend API is deployed via AWS CDK, first follow the instructions in the CDK documentation or use the provided buildspec.yml and buildspec-deploy.yml to build the container and deploy the CDK stack via AWS CodeBuild
- The backend relies on some configuration variables passed to AWS CDK, you will need to create these and update the ARNs within cdk-fargate-stack.ts
- Two secrets in AWS Secrets Manager
- DrawingBackend-Tag - the container tag name
- DrawingBacked-IOT_ENDPOINT - the AWS IoT endpoint name created earlier
- IMAGE_ARN - The ARN to the container repository
- Two secrets in AWS Secrets Manager
- Alternatively, you could build and deploy the container using:
export DOCKER_IMAGE_TAG="1"
docker build -t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/drawing-backend:$DOCKER_IMAGE_TAG -f backend/draw-images/Dockerfile backend/draw-images
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/drawing-backend:$DOCKER_IMAGE_TAG
npm install -g [email protected] tslint typescript
npm install
npm run build
cdk bootstrap
cdk synth
cdk deploy
- Deploy Web Frontend - We used AWS Amplify Console for this and you can directly point it to the frontend folder from this git repo
- Add some example SVG files
- Add custom logic to pull from public svg datasets
- Add SecretsManager inital setup and values
- Add CodeBuild & CodePipeline setup
- Add ECR repo creation
- Add Amplify Console site to code for easier deployments
- Neil Lock - nlock AT amazon.co.uk
- Tom Ellis - ellistr AT amazon.co.uk
This content is licensed under the Apache 2.0 License.