Skip to content

amosngSP/IOT_SmartGrocery

Repository files navigation

IOT_SmartGrocery

Internet of Things Project - Smart Grocery

Steps to take:

  1. Setup 2 Raspberry Pi according to the fritzing diagrams below

alt text

  1. In the above Raspberry Pi, there is another hx711 sensor. It can be patched by: VCC pin to 5V, GND pin to GND, DT pin to GPIO5 and SCK pin to GPIO6.

alt text

  1. On both Raspberry Pi, add the following into the file "requirements.txt":
  • Asgiref
  • autopep8
  • django==2.2.10
  • pycodestyle
  • pytz
  • sqlparse
  • Unipath
  • dj-database-url
  • python-decouple
  • gunicorn
  • whitenoise
  • boto3
  • simplejson
  • requests
  1. Save the file and execute "pip3 install -r requirements.txt"
  2. Execute "sudo raspi-config". Go to interface setttings and inteface options -> enable Serial User need to check what interface the barcode is on. it might be on /dev/hidraw0 or /dev/hidraw1 or in some cases /dev/hidraw2 . User need to then go to line 118 of api.py and edit accordingly.
  3. On the 1st Raspberry Pi, Open Arduino IDE and upload "capture_light.ino"
  4. Execute the following files in different terminals on the 1st Raspberry Pi: weight.py, LDR.py, picam_rekognition.py
  5. Execute the following on the 2nd Raspberry Pi: “python manage.py makemigrations” and “python manage.py migrate”
  6. On the 2nd Raspberry Pi, execute “python manage.py runserver” to start the web application. To specify port number, add 0.0.0.0:<port_no> at the end.
  7. Execute "telegram_app.py" for Telegram Bot.