Code Monkey home page Code Monkey logo

weatherprojekt's Introduction


Projekt is Archived since 18.10.2023


WeatherProjekt

Reading Sensor data with a Raspberry Pi Zero and transmitting this data on a server to further analysis. The Transmission is done via a TCP Socket between the Raspberry Pi Zero and another Linux Machine (Most likely a Raspberry Pi 3) in the same LAN.

Team

  • Analysis/Network: Christopher Kossatz
  • Hardware: Nikolaus Herzog
  • Software: Benjamin Koderisch

Setup:

Client

Connect the Sensor to SDA -> Pin 3 SCLK -> Pin 5

Make sure that you enable I2C and SPI.

sudo raspi-config
-> Advanced Options
  ->I2C
  ->SPI

then you can proceed with the install Process:

sudo apt-get update
sudo apt-get install build-essential python-pip python-dev python-smbus git
git clone https://github.com/Maxklos/WeatherProjekt.git
cd WeatherProjekt/Client
sudo python setup.py install
sudo python ReadData.py

Server

sudo apt-get update
git clone https://github.com/Maxklos/WeatherProjekt.git
cd WeatherProjekt/Server
sudo python server.py

  • We are working on optimising this setup
  • We are using the Adafruit Python GPIO Library

weatherprojekt's People

Contributors

maxklos avatar bkoderisch avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

gitter-badger

weatherprojekt's Issues

Improvments for bug searching

We could change the code like this, so we can get at least some readings and can better determent where the error is. Just add Finally like this:

ReadData.py line: 20-35

def writeDATA(s):
try:
temp = sensor.read_temperature()
pascals = sensor.read_pressure()
press = pascals / 100
hum = sensor.read_humidity()
except:
print 'Sensor Error. Please try again.'
finally:
print str(temp)
print str(press)
print str(hum)

We need a config file

We need a config file.

as mentioned in the title, we need a config file for an easy setup process. There should be a config file for the Server and for the Client and should contain:
Client: - Server ip + Port
Custom PiIp
Some information about the sensor or which Data should be send to the server

Server:
His own ip + port
Database
Sensor and PiIp whitelist

Both should have an option to toggle the output completely

Writing Content into the Database

Hello,
The program needs to commit the data into the DB every time it receives data.
With the current setup the program wouldn't submit any Data to the db when it's running in infinity mode.

Reset the TCP Socket

We need a way to reset the TCP port before we establish a connection.
So we can close and reconnect to the server as often as we wish with out the need of an reboot.

Try Except

Try and Except should be inplemented as often as possible in order to achieve usefull error messages.
for example:

  • open/write to a file
  • get data from sensor
    ...

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.