Code Monkey home page Code Monkey logo

sentinel-hill's Introduction

sentinel-hill

This project is home-made tracking system which sends notifications each time motion is detected.

Requirements

  1. Hardware (see Components)
  2. Platform IO to get dependencies, compile, run tests and upload

Components

  1. ESP8266-based development board - I've used LoLin V3 and of course you can wire ESP8266 by yourself - be sure to regulate voltage to 3V in that case.
  2. OV7670-based camera

Links

  1. ESP8266 datasheet
  2. OV7670 datasheet
  3. ESP8266 Arduino
  4. Platform IO

sentinel-hill's People

Contributors

r4dx avatar

Stargazers

Burak Geylani avatar

Watchers

James Cloos avatar  avatar

sentinel-hill's Issues

Implement notification system

Justification: Need to trigger when motion is detected

Definition of Done:

  1. Picture is taken and incorporated in email
  2. Separate email with textual alert is sent

Setup OTA

Justification: Over-the-air update eases up development and makes sure no additional wiring is required to upload new firmware

Definition of Done:

  1. Empty project with OTA is created
  2. Home router 's DHCP is configured to set the same IP for ESP
  3. OTA is working stable

Find implicity inlines and remove them

Justification: When you define body of method in header file it's implicit signal for compiler to inline the method. This is not what I've intended to do + in some cases it's really harmful (e.g. for destructors).

DoD: Go thru all header files, find all method definitions, leave only necessary, move others to separate definition section (in cpp file or in header but in a separate section).

Wire up ESP8266

Definition of Done:

  1. ESP8266 is powered up from USB and working stable
  2. Put hardware scheme in repository

Connect motors thru MCP23017 IO expander

Justification: I definitely in a lack of pins here - I need 16 pins for camera and even more for motors.

Definition of Done:

  1. IO Expander is connected
  2. motors work thru expander - POST /motor?direction={LEFT|RIGHT|TOP|BOTTOM|LEFT-TOP|LEFT-BOTTOM|RIGHT-TOP|RIGHT-BOTTOM}&cycles={integer}

Move each class into namespace

Justification: Otherwise global namespace is garbaged.
Definition of done:

  1. Each class to separate namespace
  2. If class contains only static methods remove it and use namespace to achieve the same thing

Fork https://github.com/ArduCAM/Arduino

Justification: This library uses digitalWrite static method, the idea is to pass special PinWriter interface and implement PinWriter for MCP23017. For simplicity reasons SPI part should be wired directly to ESP8266.

Definition of Done:

  1. Fork in github
  2. Create separate project in VS
  3. Choose the method to modify sources in the main project without too much effort (git submodule?)

Write logs on SD card

Justification: Next stage of removing wires is to make sure debug logs are available over the Internet, so some permanent storage is required. SD cards are cheap and easy to use that's why they fit well for our needs.

Definition of Done:

  1. Logs are written to SD card
  2. Schedule task to improve logging - e.g. log rotation is obviously required in live project

Implement sleep periods

Justification: Don't need to guard when my family is at home for sure

Definition of Done:

  1. Find an easy way to configure dead periods (google calendar?)
  2. Don't do anything when sleep period is active

Move to Visual Studio

Justification: New version of VS supports custom compilers which potentially makes it possible to connect it to pio and have all the cool features of VS

Definition of Done:

  1. I can build, deploy and test project via VS

Consistent namespace usage in implementation files

Justification: There are two ways to refer methods to implement in cpp files:
namespace sd { namespace file { void FileListIterator::next() {} } }

vs

void sd::file::FileListIterator::next()

It doesn't really matter what method to choose but it's a good practice to stay consistent in code base.

Definition of Done:

  1. Choose 1 way to refer methods in implementation (see google guidelines for reference)
  2. Refactor existing code to make it consistent

Connect camera to gpio expander

Definition of Done:

  1. Camera is wired to expander
  2. Camera pins - expander pins are documented
  3. Define what pins must be accessed directly from ESP8266 (e.g. SPI) - the goal is to move most of the pins to expander but should not over-complicate things.

REST command to take a picture and put it into SD

Justification: Might help with debugging and also is a good start working with Camera in ESP

Definition of Done:

  1. Camera is connected to esp and powered (by esp or external source - need to decide)
  2. Hardware scheme is updated
  3. POST /picture takes a picture and put it into filesystem

Use shared_ptr for passing around std::string and pointers

Justification: Right now almost each string is being passed by value thus being copied which is not very efficient. On the other hand there are bunch of things being passed by pointer which is not safe. shared_ptr is the the way to eliminate both risks.

Definition of done:

  1. shared_ptr is used for passing strings
  2. shared_ptr is used instead of passing pointers

Unit tests for logger

Justification: Logger will grow over time with details - e.g. log rotation, - in order to add new functionality efficiently unit tests are required.

Definition of Done:

  1. Logger is covered with unit tests

Configure debugging for tests

Justification: As most of things can be abstracted from hardware it's possible to create tests. Writing tests will be much easier if debugging is available.

DoD:

  1. Debugging is possible in NetBeans on ctrl+f5 - it's possible to set breakpoints and see variables values

Make sure the whole thing is powered up by rechargable battery

Justification: It's much more comfortable to work with movable on-table system + this is much more lucrative in terms of portability.

Definition of Done:

  1. Everything is powered up by battery
  2. Looking compact and easy to use
  3. Recharging is easily done with usb cable
  4. Research wireless charging and plan work to make everything work on charging pad.

Rewrite ArduCAM to support PinWriter interface

Justification: See #23 for details
Definition of Done:

  1. Every digitalWrite is rewritten to be called thru PinWriter interface for ESP8266 ifdef branches
  2. Default PinWriter is implemented - digitalWrite is called directly
  3. The change must be backward compatible
  4. Work to support other platforms is planned in separate milestone

Research how to do motion tracking in ESP

Definition of Done:

  1. Research if there's camera that have built-in motion tracking feature
  2. Find the least computation heavy algorithm otherwise and measure if ESP is able to handle constant processing
  3. Decide if external device (Rasperry Pi?) is required to handle video processing

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.