Difference between revisions of "Instrumentino for GreenHouse Monitor"

From OpenCircuits
Jump to navigation Jump to search
m
Line 1: Line 1:
 +
= First Connection =
 +
 +
 
* go to Controlino program find baudrate #define SERIAL0_BAUD 115200
 
* go to Controlino program find baudrate #define SERIAL0_BAUD 115200
  
Line 5: Line 8:
 
** find        self.baudrate and add at end of baud rate section         
 
** find        self.baudrate and add at end of baud rate section         
 
<pre>
 
<pre>
        if self.mode == "Controlino"  
+
    if self.mode == "Controlino":
            self.baudrate          =      115200
+
        self.baudrate          =      19200
 
</pre>
 
</pre>
  
Line 12: Line 15:
  
 
Install Controlino on your arduino and fire up both the SmartTerminal and the arduino.
 
Install Controlino on your arduino and fire up both the SmartTerminal and the arduino.
 +
Open the port and send "set" responds with "done", the egale has landed.
 +
 +
= Add strings for commands to interface
 +
 +
* look at the bottom of the C program and extract the following commands:
 +
* find the section that looks something like:
 +
<pre>
 +
    elif self.mode == "MotorDriver":
 +
        self.send_ctrls = [ ...
 +
</pre>
 +
and add a clause to the if then like:
 +
<pre>
 +
    elif self.mode == "Controlino":
 +
        self.send_ctrls = [ "Set", "Controlino ", "BlinkPin", "Read", "Write", "SetPwmFreq" ]
 +
</pre>

Revision as of 11:08, 29 January 2017

First Connection

  • go to Controlino program find baudrate #define SERIAL0_BAUD 115200
  • go to SmartTerminal parameters.py and define a new mode Controlino:
    • self.mode = "Controlino" # this is not really needed but this way it is easy to turn on and off the Controlino settings.
    • find self.baudrate and add at end of baud rate section
    if self.mode == "Controlino": 
        self.baudrate          =       19200

this way of setting it will only be in effect for the mode Controlino which for now we will implement as a straight terminal

Install Controlino on your arduino and fire up both the SmartTerminal and the arduino. Open the port and send "set" responds with "done", the egale has landed.

= Add strings for commands to interface

  • look at the bottom of the C program and extract the following commands:
  • find the section that looks something like:
    elif self.mode == "MotorDriver":
        self.send_ctrls = [ ...

and add a clause to the if then like:

    elif self.mode == "Controlino":
        self.send_ctrls = [ "Set", "Controlino ", "BlinkPin", "Read", "Write", "SetPwmFreq" ]