Our application is an all in one system for storing, monitoring and tracking fridges and the items stored within. It mainly focuses on ease of use through voice and image recognition for items being stored in a fridge. Through the use of Google voice recognition and Amazon image recognition, we have brought extreme ease of use to storing items within a fridge. Furthermore, the accompanying web portal gives users greater information on the items in the fridge or even the fridge itself.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Hardware Requirements
1. T-Cobbler kit
2. Mini breadboard
3. DHT11 Temperature and Humidity Sensor
4. 2 10k Ω Resistor for DHT11 sensor and Button
5. 2 LED (red and green)
6. 2 330Ω Resistor for LED
7. I2C LCD Screen
8. 1 button
9. Usb Michrophone (not shown on the diagram)
10. Pi camera (not shown on the diagram)
11. Sound output device (not shown on the diagram)
Step 2: Setting Up the Raspberry Pi
To build the application, we will need to install some libraries on the raspberry pi.
Open the command line interface in your raspberry pi, paste and run the following command one by one
sudo apt-get install libportaudio-dev
sudo apt-get install python-dev sudo apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev sudo pip install pyaudio sudo pip install SpeechRecognition
pip install --upgrade google-api-python-client pip install --upgrade google-cloud-speech pip install --upgrade google-cloud-texttospeech
Step 3: Setting Up AWS
Head to your AWS console and go to AWS IoT service (IoT Core) and follow these steps (skip step 1,6 & 11 if you do not wish to store data in DynamoDB) :
1. Head to DynamoDB to create a table with itemID as your partition key
2. Create a single thing
3. Create a Security Certificate (Download all the certificates needed later)
4. Create a Security Policy
5. Attach the Security Policy and Thing to your Security Certificate
6. Go to your Raspberry Pi, create a folder put all the AWS certificate credentials in it and create a python file
Next, head to S3 to start creating an S3 bucket for the images.
Finally, we need to create an IAM role :
1. Click blue “Create role” buttonOn Select Role type page, select “AWS Service” section and choose “Lambda”
2. Click blue “Next: Permissions” buttonOn Attach Permissions page, search for and select the checkboxes next to both AWSLambdaFullAccess and AmazonRekognitionFullAccess
3. Click blue “Next: Review” buttonGive your role a name that you like and click “Create role
Step 4: Setting Up the Web Application
For the web portal, here are some softwares you need installed on your host machine:
- Install Git: https://git-scm.com/downloads
- Install Node.js v8.11.3: https://nodejs.org/en/download/
- Install yarn
Now to install,
# Clone Github Repository $ git clone https://github.com/Syoongy/iot-backend.git
# Clone Project From Github Repository $ git clone https://github.com/Syoongy/iot-frontend.git # Install Dependencies $ yarn install # Build For Production $ yarn run build # Run Server In Production Mode $ yarn start
Step 5: Done!
You are now done! Feel free to try adding items through the pi and manage you fridge today!