Coder Social home page Coder Social logo

sinnykumari / arduino-sensor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shaan7/arduino-sensor

0.0 3.0 0.0 178 KB

Arduino code that allows remote GPIO configuration over nrf24l01 wireless modules

License: GNU General Public License v2.0

Arduino 88.05% C++ 11.95%

arduino-sensor's Introduction

arduino-sensor

Arduino code that allows remote GPIO configuration over nrf24l01 wireless modules. The setup uses two nrf24l01 modules-

  • One on the raspberry pi
  • One on the arduino which is running this code.

To setup the nrf24l01 module, use instructions at http://conoroneill.net/arduino-and-raspberry-pi-communicating-over-2-4ghz-with-cheap-nrf24l01-modules/

For sending commands from Pi to Arduino wirelessly, modify and use one of the examples in https://github.com/stanleyseow/RF24/tree/master/librf24-rpi/librf24/examples

Command Syntax

Initial configuration

Once the arduino is up and running this code, it starts waiting for configuration. Send it the following command to configure-

list_of_input_pins;list_of_output_pins

For example-

2,3;4,5

means that make pins 2 and 3 as input and make 4 and 5 output.

Once configured, this code sends out the values on the input pins over the nrf24l01 channel.

Setting output pins

Once configured, you can send it a command in this syntax to set values on output pins-

2,1:3,0

This will make pin 2 HIGH and pin 3 LOW.

Note that,

  • The pins must be one of the pins that have been in the list of output pins while configuring
  • If you want to use Analog pins, make sure to use 14 for A0, 15 for A1 and so on.

Thanks To

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.