Code Monkey home page Code Monkey logo

homeduino's Introduction

homeduino

Arduino library for home automation. The Library can be used on a Arduino compatible board for home automation task via serial connection and in combination with pimatic and the pimatic-homeduino plugin.

Flashing

You can either import all libraries in libraries into your Arduino IDE and open the homeduino.ino sketch or you can compile and flash using the Makefile (recommended).

The Makefile uses Arduino.mk. Because the arduino-mk version that comes with raspbian on the raspberry pi is to old, arduino-mk comes bundled as git submodule with this repository.

sudo apt-get install arduino-core avr-libc avrdude binutils-avr gcc-avr libconfig-yaml-perl libftdi1 libyaml-perl screen python-serial

Then clone the homeduino repository with all submodules:

git clone --recursive https://github.com/pimatic/homeduino.git

Edit the Makefile to use the right BOARD_TAG and MONITOR_PORT. You can list all available BOARD_TAGs with: make show_boards.

You can now compile it by running make or compile and upload it with:

make upload

DS18B20 Support

If you want to connect a DS18B20 sensor to your arduino you have to checkout the onewire branch before make upload:

git checkout onewire
git submodule update --init --recursive

The onewire library disables global interrupts, this could lead to worse receiving performance!

Serial communication

You can use the serial monitor of the arduino IDE or the screen command.

Run

make monitor

Type in your message and press Ctrl+Return. You can exit it with Ctrl+a and then k. Keep in mind that it does not echo what you type.

Commands

All commands sent to homeduino are accepted with ACK or rejected with ERR. Homeduino prints an ready message on serial port open if it is ready to receive commands.

PING

PING message

Sends back a string, can be used to check if the connection is working.

Example: PING hello

RF

receive

RF receive interrupt_pin

Starts receiving 433 mhz RF signals on interrupt pin interrupt_pin using RFControl. interrupt_pin can be 0 or 1.

Example: RF receive 0

When an RF signal is received it prints a message to the serial port:

RF receive 453 1992 88 9228 0 0 0 0 01020102020201020101010101010102010101010202010202020202010102010102020203

send

RF send digital_pin repeats b0 b1 b2 b3 b4 b5 b6 b7 pulse_sequence

Send an rf signal by its buckets and pulse sequence using RFControl.

Example: RF send 4 3 453 1992 88 9228 0 0 0 0 01020102020201020101010101010102010101010202010202020202010102010102020203

DHT

DHT type digital_pin

Reads a DHT temperature sensor of type on pin pin using DHTlib.

Example: DHT 22 3

Responds with: ACK temperature humidity or one of ERR checksum_error, ERR timeout_error, ERR unknown_error.

DR, DW, AR, AW, PM

  • digital read: DR pin
  • digital write: DW pin
  • analog read: AR pin
  • analog write: AW pin
  • pin mode: PM mode

Example: DR 4

Responds with ACK or ACK value.

homeduino's People

Contributors

icesory avatar mwittig avatar ronaldsteen avatar sweetpi avatar

Stargazers

 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.