Downloading the Source Code

You can download the different components of the Climate Control Demo project from here.

You should be able to see the following directory structure:

climate-control-demo

|----ci20
       |-----controller
             |----build
             |----src
|----wifire
       |-----actuator
             |----pic32
             |----src
             |----include
       |-----common
             |----src
             |----include
       |-----sensor
             |----pic32
             |----src
             |----include
|----pc_app
       |--climate_control
             |----admin
             |----common
             |----display
             |----doc
             |----libflow
             |----tests

Clone the github master repository:

#git clone https://github.com/FlowCloud/climate-control-demo climate-control-demo

#cd climate-control-demo

#git checkout master

Building Ci20 controller code

  1. Connect Ci20 to the internet via Wi-Fi or Ethernet
  2. Open a terminal on the board itself or telnet/ssh to board from host machine.
  3. Navigate to climate-control-demo/ci20/controller/build
  4. If you do not give any TARGET then it will build for the architecture you are building from:

    • If you are building on a Ci20 board, then it will build a MIPS binary.
    • If you are building on a 32-bit linux PC it will build an i686 binary.
    • If you are building on a 64-bit linux PC it will build an x86_64 binary.

Building Ci20 controller code

#cd climate-control-demo/ci20/controller/build

#make

Once your build is ready, binary is created at climate-control-demo/ci20/controller/bin

Building Wi-Fire code

  1. Please download necessary tools and SDK from http://flow.imgtec.com/developers/develop/embedded/pic32mz-free-rtos/downloads - 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 to install the SDK.
  2. Once you have all the contents of the SDK release copied into the harmony/current folder (as detailed in the "WiFire Harmony SDK Developer getting Started Guide"), please verify whether you have lipappbase.X.a, libcyassl.X.a, libflowcore.X.a and libflowmessaging.X.a in the C:\microchip\harmony\current\bin\third_party (if on windows) and /opt/microchip/harmony/current/bin/third_party (if on linux)
  3. Open MPLAB-X IDE and open the appropriate windows or linux project file from climate-control-demo/wifire/actuator and climate-control-demo/wifire/sensor.

    flow_climate_sensor_windows.X
    flow_climate_sensor_linux.X

    flow_climate_actuator_windows.X
    flow_climate_actuator_linux.X
  4. Press Clean & Build. Once the build is successful , program the hex files on the Wi-Fire board via ICD3 programmer or PICKit3 programmer.