Hello World

From Open Source Controls Wiki
Jump to navigation Jump to search

This page describes the most basic use of a Zero Carbon Controller, plotting temperatures on a graph

Electrical Design

We start with a wiring diagram.

We know we want to strap a temperature sensor to a pipe, so we generate a wiring diagram for this:

  1. Click the Palette button.
  2. Drag a few Pipe NTCs onto the page.
  3. Click the PROCESS button and press OK when prompted for the name.
  4. In the links that appear beneath the drawing, click Process Connections.
  5. Press COPY DATA to get the code to paste into your controller.

Connection Data

The connection data provided above looks like this:

[{"portId":"TH2","block":"TH2","channel":"2","name":"TH2 Signal","figure":"Input","portColor":"#00ff00","wiredTo":"ntcstrap2","wiredToPort":"temperature","signalType":"NTC10K","topicDevice":"ntcstrap2","topicKey":"temperature","mapUnits":"kΩ to °C","map":"[[42.739,-10],[27.396,0],[17.999,10],[12.099,20],[10,25],[8.308,30],[5.819,40],[4.151,50],[3.012,60],[2.221,70],[1.663,80],[1.262,90],[0.97,100],[0.755,110]]"},{"portId":"TH1","block":"TH1","channel":"1","name":"TH1 Signal","figure":"Input","portColor":"#00ff00","wiredTo":"ntcstrap","wiredToPort":"temperature","signalType":"NTC10K","topicDevice":"ntcstrap","topicKey":"temperature","mapUnits":"kΩ to °C","map":"[[42.739,-10],[27.396,0],[17.999,10],[12.099,20],[10,25],[8.308,30],[5.819,40],[4.151,50],[3.012,60],[2.221,70],[1.663,80],[1.262,90],[0.97,100],[0.755,110]]"}]

Formatted for reading it is easier to see the structure. This shows two sensors, ntcstrap and ntcstrap2 (topicDevice), providing a temperature value (topicKey)

[
    {
        "portId": "TH2",
        "block": "TH2",
        "channel": "2",
        "name": "TH2 Signal",
        "figure": "Input",
        "portColor": "#00ff00",
        "wiredTo": "ntcstrap2",
        "wiredToPort": "temperature",
        "signalType": "NTC10K",
        "topicDevice": "ntcstrap2",
        "topicKey": "temperature",
        "mapUnits": "kΩ to °C",
        "map": "[[42.739,-10],[27.396,0],[17.999,10],[12.099,20],[10,25],[8.308,30],[5.819,40],[4.151,50],[3.012,60],[2.221,70],[1.663,80],[1.262,90],[0.97,100],[0.755,110]]"
    },
    {
        "portId": "TH1",
        "block": "TH1",
        "channel": "1",
        "name": "TH1 Signal",
        "figure": "Input",
        "portColor": "#00ff00",
        "wiredTo": "ntcstrap",
        "wiredToPort": "temperature",
        "signalType": "NTC10K",
        "topicDevice": "ntcstrap",
        "topicKey": "temperature",
        "mapUnits": "kΩ to °C",
        "map": "[[42.739,-10],[27.396,0],[17.999,10],[12.099,20],[10,25],[8.308,30],[5.819,40],[4.151,50],[3.012,60],[2.221,70],[1.663,80],[1.262,90],[0.97,100],[0.755,110]]"
    }
]