Editing Instrumentino for GreenHouse Monitor

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
= What =
+
= First Connection =
This is part of the [[Instrumentino/Smart Terminal Challenge]].  In this part I am going to try to adapt the Instrumentino ( PC/Python ) [[Instrumentino Notes]] to the ( microcontroller ) [[GreenHouse Monitor Program]].
 
  
= Coming Soon =
 
  
So far I have not been able to figure out where to start, will be in contact with the author.  Stay tuned, see history tab to see how active this page is.
+
* 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       
 +
<pre>
 +
    if self.mode == "Controlino":
 +
        self.baudrate          =      19200
 +
</pre>
  
 +
this way of setting it will only be in effect for the mode Controlino which for now we will implement as a straight terminal
  
[[Category:SmartTerminal]]
+
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:  "Set", "Controlino", "BlinkPin", "Read", "Write", "SetPwmFreq"
 +
* 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>
 +
 
 +
 
 +
Run the Smarterminal again, this time you will find the above commands loaded into the first several send areas as defaults.  Try them out, all but "Controlino" respond with done.  Invalid commands also seem to get no response.  These commands look like they are supposed to have numbers appened as well, it would be nice if we had some values in place just to let you know what the expected form is.

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)