Device Setup
This section contains all the steps required to get the devices (and Linux platform) set up for the Climate Control Demo.
Once you have completed the steps on this page, Starting the System covers how to run and use the demo.
You can download the climate-control-demo-1.0.0 release from
here. You will need the files on Ci20 and your Linux platform.
If you are using MPLAB X on Windows to program Wi-Fire boards you will also need the files on that platform.
After extracting the climate-control-demo-1.0.0.zip , you will see 3 folders:
- ci20 - Controller binaries for Ci20 and linux PC
- flowclimatecontroller.i686.bin - controller binary for 32-bit linux PC.
- flowclimatecontroller.mipsel.bin - controller binary for Ci20 board.
- flowclimatecontroller.x86_64.bin - controller binary for 64-bit linux PC.
- pc_app - Python-QT Admin and Display Applications
- wifire - Sensor and Actuator hex files to be run on Wi-Fire board
- Sensor hex file for Wi-Fire board - flow_climate_sensor.X.production.hex
- Actuator hex file for Wi-Fire board - flow_climate_actuator.X.production.hex
Setting up Wi-Fire boards
Powering your Wi-Fire board
Connect your Wi-Fire board to a PC or laptop computer with a USB cable, unless your application uses more than 300 mA, in which case you should use an external power supply rated at 5V DC, 500 mA. Follow the instructions below to power up your board using either a USB cable, or external power supply
Using a USB cable
- Use Jumper J16 (C) to select the USB cable (UART) power source.
- Connect the Wi-Fire's USB mini B connector (B) to your computer's USB port.
Using a 5V 500 mA power supply
- Use Jumper J16 (C) to select the 'EXT' power source.
- Connect the power supply to Wi-Fire's 5V DC power connector (A).
Flashing the Wi-Fire board
Using hex files
Please download and install necessary tools and SDK from here - You will need MPLAB X IDE, MPLAB XC32 Compiler and MPLAB Harmony from the Tools section. You will also need "WiFire Harmony SDK 2.0.2" release and the "WiFire Harmony SDK Developer getting Started Guide" from the documentation section. The documentation details how to install the Harmony SDK.- Connect your programming tool to your PC and to the Wi-Fire board via the connector shown in the images here.
- Open the MPLAB X IPE.
- Set the Device field to PIC32MZ2048ECG100.
- Click "Connect" to ensure that the IPE and Wi-Fire board can communicate.
- Click "Browse" and select a hex file you downloaded earlier as a source.
- Click "Program" to flash the board with the chosen hex file.
- Flash one board with the actuator file and one with the sensor file. Note down which board is which, or connect the sensors and relays to the correct board as detailed in Starting the System before returning to this page.
Using source code
Please follow the instructions in the Source Code section.
Setting up Ci20
Login to the Ci20 board and connect to the internet (via WiFi or Ethernet). The default username and password are both ci20. For more details on Ci20 please refer to Ci20 Setup.
Adding flowsdk.list as a source
If flowsdk.list is not present in /etc/apt/source.list.d, open a terminal and run the following commands.Installing the controller
You can either install the controller software using a pre-built package, or by using the binary from GitHub and installing the dependencies.
Installing flowclimatecontroller from package server
Installing flowclimatecontroller using downloaded binary
Download the .mipsel controller binary from GitHub onto Ci20
To get latest public release of flowclimatecontroller we must remove the flowstarterapp (if installed) and install flowclimatecontroller instead.
#sudo apt-get update
#sudo apt-get install flowclimatecontroller
#sudo apt-get install libflowcore-devel libflowmessaging-devel
Note that these instructions can also be followed on a Linux PC if you prefer.
Setting up Linux PC for the Admin and Display apps
1. Adding flowsdk.list as a source
If flowsdk.list is not present in /etc/apt/source.list.d, open a terminal and run the following commands.2. Updating Flow libraries along with python wrappers
#sudo apt-get install libflowmessaging-devel libflowcore-devel
#sudo apt-get install libflowmessaging-python
#sudo apt-get install libflowcore-python
3. Installing required python packages for Display and Admin applications
In order to run the QT based Display and Admin python applications, the following packages need to be installed.
#sudo apt-get install python-pyside
#sudo apt-get install python-matplotlib
#sudo apt-get install python-netifaces
#sudo apt-get install python-pip
#sudo pip install xmltodict
#sudo pip install enum34
#sudo apt-get install gawk