Coder Social home page Coder Social logo

blackbox's Introduction

Black Box

An application to record measurements from three sensors:

  • GPS
  • Temperature
  • Humidity
  • Air Quality

Run

bb.sh path/to/log/directory

Prerequisites

  • Linux system

  • Python 3.7 or higher setup with VENV support

  • make and wireless-tools must be installed

    sudo apt install make wireless-tools

Setup

Application

Once all prerequisites are installed a command can be run to setup the environment.

make setup

Pi Temp & Humid

sudo apt-get install libgpiod2

Pi GPS

Steps are from https://sparklers-the-makers.github.io/blog/robotics/use-neo-6m-module-with-raspberry-pi/

Setup Pi boot commands

sudo vim /boot/config.txt

At the end of the file add the follwing lines:

dtparam=spi=on
dtoverlay=pi3-disable-bt
core_freq=250
enable_uart=1
force_turbo=1

Turn off UART as a serial console

sudo nano /boot/cmdline.txt

Delete everything and replace with

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

Finally

sudo reboot

Check data is coming from the GPS module

sudo cat /dev/ttyAMA0

Check which service serial0 is linked too

ls -l /dev

Command probably either

sudo systemctl stop [email protected]
sudo systemctl disable [email protected]

or

sudo systemctl stop [email protected]
sudo systemctl disable [email protected]   

GCP setup

https://cloud.google.com/storage/docs/gsutil_install#deb

mkdir /home/volvo/blackbox mkdir /home/volvo/blackbox/log mkdir /home/volvo/blackbox/cold

Testing

To test the code is up to standard

make setup_dev
make test

blackbox's People

Contributors

bill2bill avatar

Watchers

 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.