Giter Club home page Giter Club logo

zotbins_rasppi's Introduction

ZotBins_RaspPi

This repository contains all code that manages and interacts with the Raspberry Pi's of the ZotBins project. To view the webapp repository please visit: ZotBins Web App. For more information on ZotBins, please visit: ZotBins Landing Page

First Time Github Set-up

If you are using Windows and you do not have git, install [git bash] (https://gitforwindows.org/)

Open Git Bash and set up the global username and global email that is linked with your github account. If you don't want to type in your password all the time, include the third line of code as well.

git config --global user.name "John Doe"
git config --global user.email [email protected]
git config --global credential.helper wincred

To view your configuration information: git config --global -l

First Time Running ZotBins RaspPi

Make sure all electronic components ( load cell + hx711, ultrasonic sensor + voltage converter ) are connected to the Raspberry Pi.

  1. Open Terminal (you can use the short-cut: ctrl+alt+t)
  2. git clone https://github.com/okyang/ZotBins_RaspPi.git
  3. cd ZotBins_RaspPi
  4. python3 ZBinClassDev.py (please read user notes below)

Public Users

If you are a public user, please change the last line of code in ZBinClassDev.py from ZotBins(sendData=True) to ZotBins(sendData=False) then run ZBinClassDev.py

File Setup

You also need to have the following files under the ZBinData:

  1. binData.json You can contact the Zotbins team for an example setup file or follow the data format Format:
{"bin": [{"binID": "<binID>", "tippersurl": "<apicall>"}, "<{error defaults}>"]}
  • "bin" refers to the first set of rules needed to find the binID and api call
  • "binID" refers to the raspberry pi ID. This is assigned through you or your organization
  • "tippersurl" is the api call used to upload to the local server

ZotBins Team Users

If you have all the configuration files on the raspberry pi (not on this repository for security reasons) and wish to send data to the TIPPERS database, please run the program as is.

General Debugging

Everytime ZBinClassDev.pyis run, a log report is created, detailing bin startup and errors. It can be found in the /logs of the ZotBins_RaspPi folder

Error Messages

Optionally, you can add another file to configure error reports. "errorData.json" can be used to generate more detailed reports of your errors.

{"data": [{"binID": "<binID>", "tippersurl": "<api call>", "<flags>,"}],
 "messages": [{"<error message id>": "<message>",}]}
  • "data" refers to data needed to call the api
  • "messages" refers to the error codes used to debug.

Although you have to predict probable failures when writing more detailed errors, a default check using "ZBinError.py" will log whenever a sensor has failed.

Running Remotely

You can also access the Raspberry Pi remotely thru VNC viewer.

Native Devices

You can download VNC viewer Set up your VNC account (email and password) to set up your VNC network

Raspberry Pi

Open the terminal (ctrl+alt+t). Install VNC by typing sudo apt install realvnc-vnc-server realvnc-vnc-viewer. On the desktop menu, navigate to Menu>Preferences>Raspberry Pi Configuration>Interfaces. Ensure VNC is enabled. Find the network address by typing ifconfigin the terminal under ipv4. Enter the address into VNC viewer.

zotbins_rasppi's People

Contributors

okyang avatar daviddp1 avatar patrickanguyen avatar aishwab1 avatar dngkphm avatar aishwaryabh avatar gracechoe avatar syamhaque avatar sharifajesmin avatar

Stargazers

 avatar  avatar Danny avatar

Watchers

James Cloos avatar Danny avatar

Forkers

patrickanguyen

zotbins_rasppi's Issues

Plotting data from an invalid time

Data is being plotted even though the time is invalid. This is true for weight, divergence, and fullness.

start time : 2019-05-02 04:12 PM
end time : 2019-05-02 04:13 PM

Used Microsoft Edge browser.

error

ZBinErrorDev Issue

The code stops when executing self.state = ZBinErrorDev.ZState(ultCollect,weightCollect,tippersPush) in the ZotBins.run() function. Still trying to figure what is causing this issue. @daviddp1

Python Version: 3.7.3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.