Arduino Action Node

How to send instructions to your Arduino(s) from OpenHAB

On this page

The Arduino

You might want to control relays, motors, lights or anything else that requires a trigger to tell it perform an action. The simplest and safest example of that is an LED.

For my test node, I connected a red LED to an Arduino Micro: connect the short leg to ground through a 220-ohm resistor, and the long leg to port 3. The nRF24L01 is connected the usual way.

ActionNode top view
Here's a top view picture that might help and/or confuse you more.

Code

The code for the Arduino can be downloaded here or you can use the codebender plugin below to send it directly to your Arduino.

There are comments throughout the code to explain what's going on. Also remember to check the variables declared at the top and change them if you use different pins.

Go Back

MQTT Controller