Git Product home page Git Product logo

bme680-data-collector's Introduction

Pi Setup

Install raspberry pi OS (lite) with rpi-imager Do first boot in pi Resize in gparted

Boot in pi

sudo su
apt update
apt updgrade
apt install git vim python3-pip
mkdir /mnt/nt-storage
echo '/dev/mmcblk0p3  /mnt/nt-storage auto  defaults  0 0' >> /etc/fstab
mount -a
cd /mnt/nt-storage
mkdir data
git clone [email protected]:j3gb3rt/bme680-data-collector.git

if bme280

git checkout bme280
pip install board adafruit-circuitpython-bme280 adafruit-circuitpython-ds3231

Set time

python3
>>> import time
>>> import board
>>> import adafruit_ds3231
>>> i2c = board.I2C()
>>> rtc = adafruit_ds3231.DS3231(i2c)
>>> t = time.struct_time((2022, 3, 19, 1, 55, 0, 0, -1, -1))
>>> rtc.datetime = t
>>> rtc.datetime
time.struct_time(tm_year=2022, tm_mon=3, tm_mday=19, tm_hour=1, tm_min=55, tm_sec=8, tm_wday=0, tm_yday=-1, tm_isdst=-1)
>>> exit()

Run at startup

To run at startup add this to the root users crontab using, crontab -e

@reboot python3 /mnt/nt-storage/bme680-data-collector/datacollector.py &

bme680-data-collector's People

Contributors

j3gb3rt avatar

Watchers

 avatar  avatar

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.