Huddle showing steps to set up a system of your own. The files above are the 3d printable files for the Moteino Base Station box that sits on top of the Windows machine.
Sensor Hardware:
Moteino
https://lowpowerlab.com/shop/moteino-r4
Power Switch
https://www.sparkfun.com/products/102
Base Station Hardware:
Moteino
https://lowpowerlab.com/shop/moteinousb
Computer:
Windows 10 machine. We used a NUC for this build.
Misc Hardware:
FTDI Programmer
https://www.sparkfun.com/products/9716
Programs:
Arduino IDE
https://www.arduino.cc/en/Main/Software
Windows Port Driver
Your Arduino port will be grayed out without installing. Download the one that says Windows 7/8/8.1/10
AlwaysUp (this is to make sure the python script runs on startup and is always running.
http://www.coretechnologies.com/products/AlwaysUp/
Python 2.7.12
https://www.python.org/downloads/
Install Dependencies
pip install pyserial
pip install paho-mqtt
Tutorial:
For this tutorial we will assume you already have a computer running Windows 10.
First thing we will want to do is get the computer or Base Station setup. In our case, this is our NUC computer and Moteino with USB port. We need to install the programs listed above to the Windows machine.
Now that we have all the programs installed we can move on to the Arduino or more specific, the Moteino. We will start by building out the hardware. Here is a Fritzing of how we will hook this up (do not forget to solder on the antenna sold with the Moteino).
Before we actually load the sketch onto the board we need to install the necessary arduino libraries into the libraries folder. Here is a link if you need more information on how to do so, https://www.arduino.cc/en/Guide/Libraries. We will use the FTDI programmer to load the sketch on this Moteino. The sketch is called MoteinoGate.ino. We are only going to program one node in this example, if you want to program more you will change the “NODEID” to a different number as shown in the picture below.
Now that we have the motion sensor all hooked up and the programmed we can setup the Moteino Base Station. We need to load ArduinoBaseGate.ino on to the Moteino. This we can just use a mini USB cable to load the sketch. Make note of the COM PORT you are on because this will have to match the same in the huddle-echo.py script. (just change the COM PORT in the python script). Picture below.
We are almost done. The last things we have left are going to be on the computer. First, we will install the Python Modules. Here is a link for further information on how to do so. https://docs.python.org/2/installing/
Now open up AlwaysUp and click on the gear icon with the plus. The screenshots below depict what you will need to fill in. The tabs you will enter information in are as followed
General:
Logon:
Restart:
Start Up:
Extras:
Now we have everything installed and running.