Difference between revisions of "Instrumentino Notes"
Russ hensel (talk | contribs) |
Russ hensel (talk | contribs) |
||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Draft = | = Draft = | ||
− | Just a draft | + | Just a draft working on it as of Oct 2016, check history to see if updated. |
− | [[Controlino Notes]] | + | see also: [[Controlino Notes]] [[Instrumentino/Smart Terminal Challenge]] |
= What is Instrumentino = | = What is Instrumentino = | ||
Line 14: | Line 14: | ||
My Take | My Take | ||
− | Instrumentino is an instrument control system designed to interface with various smart or semi smart systems. | + | Instrumentino is an instrument control system designed to interface with various smart or semi smart systems. The actual sensors and actuators can be as simple as potentiometers, lm35, solar cells, relays..... . As a sort of glue there is some smart component ( beyond Instrumentino ) which, in the base case, is an Arduino running Controlino. Instrumentino can configure Controlino on the fly to interact with a large number of sensors/actuators. |
− | |||
= Why = | = Why = | ||
Line 47: | Line 46: | ||
To do much more it seems you need an arduino. | To do much more it seems you need an arduino. | ||
+ | |||
+ | = Suggestions Remarks = | ||
+ | |||
+ | Stuff from Russ, more as it occurs to me. | ||
+ | |||
+ | * Merge git hub for Instrumentino and Controlino. What is value of separate repositories, I do not see it. | ||
+ | |||
+ | * Is there doc for Controlino? I added just a bit at: [[Controlino Notes]] | ||
+ | |||
+ | *I like to keep my commands and responses short. Keeps speed up without high baud rates. Long wires need low baud rates. Really dislike xml idea. Would consider binary mode for time critical systems. | ||
+ | |||
+ | *Caps insensitivity is nice, but at high speeds is slower. | ||
+ | |||
+ | *Add a command to identify the software on the Arduino I use v for version, could be version, id..... My system responds something like "GreenHouse Sept04 2016" this way I can verify what I have connected to and that baud... is working. | ||
+ | |||
+ | *Looks like development is moving towards a new GUI. Consider making the GUI a snap in snap out replaceable componentl. Why Kivy, I can guess, but the fight to install might cool my jets. | ||
+ | |||
+ | *Do not make too monolithic, instead a family of applications not too tightly coupled. | ||
+ | |||
+ | = Old Notes Ignore Until Properly Organized = | ||
+ | |||
+ | == On windows not going well == | ||
+ | |||
+ | C:\Users\Russ>pip install instrumentino | ||
+ | Collecting instrumentino | ||
+ | Using cached instrumentino-1.0.tar.gz | ||
+ | Collecting wxPython (from instrumentino) | ||
+ | Could not find a version that satisfies the requirement wxPython (from instrumentino) (from versions: ) | ||
+ | No matching distribution found for wxPython (from instrumentino) | ||
+ | |||
+ | C:\Users\Russ>pip install wxPython | ||
+ | Collecting wxPython | ||
+ | Could not find a version that satisfies the requirement wxPython (from versions: ) | ||
+ | No matching distribution found for wxPython | ||
+ | |||
+ | |||
+ | ========================= | ||
+ | |||
+ | |||
+ | |||
+ | C:\Users\Russ>pip install wxPython | ||
+ | Collecting wxPython | ||
+ | Could not find a version that satisfies the requirement wxPython (from versions: ) | ||
+ | No matching distribution found for wxPython | ||
+ | |||
+ | C:\Users\Russ>pip install wxpython | ||
+ | Collecting wxpython | ||
+ | Could not find a version that satisfies the requirement wxpython (from versions: ) | ||
+ | No matching distribution found for wxpython | ||
+ | |||
+ | |||
+ | Well, not so bad. Useful to know that my Spyder already had wxpython, came with it or I installed, who knows. Also useful to know wxpython is called wx. This helps a lot. | ||
== Clean Install on Mint == | == Clean Install on Mint == | ||
Line 58: | Line 109: | ||
package manger wxpython | package manger wxpython | ||
− | |||
− | |||
− | * | + | == Documentation == |
+ | * '''D:\_Source\Python\instremento\Using Instrumentino_v03 (1).odt''' on my system, not sure where I found it. Looks like from github below. | ||
+ | *[https://github.com/yoelk/Instrumentino Github Master for Instrumentino] what other than code is there: Wiki, not yet. But Russ can edit it. In https://github.com/yoelk/instrumentino/tree/master/documents there are some good documents. | ||
+ | *[http://playground.arduino.cc/interfacing/python Arduino Info] | ||
+ | |||
+ | *[[https://www.youtube.com/watch?v=8AVNLTtEAwM Youtube present]] | ||
+ | |||
+ | <!----------- | ||
+ | *[[]] | ||
+ | *[[]] | ||
+ | |||
+ | |||
+ | Did you ever look at my presentation in EclipseCon 2015? | ||
+ | I made a presentation there that was apparently taken on camera and uploaded to Youtube: | ||
+ | https://www.youtube.com/watch?v=8AVNLTtEAwM | ||
+ | My slides are here (Instrumentino presentation.pptx): | ||
+ | https://github.com/yoelk/Instrumentino/tree/master/documents | ||
+ | If you didn't, it might explain better what instrumentino is and what plans | ||
+ | -------------> | ||
+ | |||
+ | == Trying to Run == | ||
+ | |||
+ | example_run_ArduinoPins.py on page 6/16 | ||
+ | |||
+ | my was located at: | ||
+ | D:\Russ\0000\SpyderP\instrumentino\instrumentino-master\documents\example_run_ArduinoPins.py\ArduinoPins.py | ||
+ | |||
+ | got errors until I added at top of file | ||
+ | |||
+ | # russ add | ||
+ | import sys | ||
+ | sys.path.append( r"D:/Russ/0000/SpyderP" ) | ||
+ | # end russ add | ||
+ | |||
+ | then it ran screen looked a lot like just running D:\Russ\0000\SpyderP\instrumentino\__init__.py | ||
+ | |||
+ | but what does it do. File Load Sequence and File Load Method -- cannot find any example files of these types and not sure what they should do | ||
+ | |||
+ | sequence browse also uncleare it is looking for *.mdt files which are ?? | ||
+ | |||
+ | |||
+ | method actions, look like actions are built in -- what is time defaulting to 00:00:00 time as in time.time() or time in hr:min:sec from start of system or from | ||
+ | clock | ||
+ | |||
+ | == Structure of system based on ArduinoPins.py == | ||
+ | |||
+ | Looks like your app is a descendant of Instrument ( from instrumentino import Instrument in __init.py__) which runs when it is created. | ||
+ | |||
+ | it is modified from the base by "addition" of comps, actions, version, name, description | ||
+ | |||
+ | this then is used to initialize InstrumentinoApp which looks like it is mostly the gui. | ||
+ | |||
+ | We do not seem to have python docs or unit tests to help inform us | ||
+ | |||
+ | |||
+ | what are actions? seem to be tuple of things like the one SysActionSetPins() look to see if it is based on abstract base. Descends from SysAction | ||
+ | |||
+ | SysAction from instrumentino.action import SysAction, SysActionParamTime, SysActionParamFloat, SysActionParamInt | ||
+ | |||
+ | class SysAction(RunnableItem): and RunnableItem from executable_listctrl import RunnableItem which is pretty much empty, this one seems to be an ABC but | ||
+ | not declared to be so. | ||
+ | |||
+ | |||
+ | An architecture document would be nice, major classes, use of threads, mvc? GUI vs other components | ||
+ | |||
+ | Add a log file ?? where to capture exceptions, just use the console, if so advise. | ||
+ | |||
+ | |||
+ | Well things looked good but got | ||
+ | |||
+ | Traceback (most recent call last): | ||
+ | File "D:/Russ/0000/SpyderP\instrumentino\__init__.py", line 155, in OnUpdateControls | ||
+ | self.UpdateControls(event.data) | ||
+ | File "D:/Russ/0000/SpyderP\instrumentino\__init__.py", line 180, in UpdateControls | ||
+ | comp.Enable(cfg.IsCompOnline(comp)) | ||
+ | File "D:/Russ/0000/SpyderP\instrumentino\comp.py", line 236, in Enable | ||
+ | self.panel.Enable(isEnabled) | ||
+ | File "D:\apps\Anaconda\lib\site-packages\wx-3.0-msw\wx\_core.py", line 9971, in Enable | ||
+ | return _core_.Window_Enable(*args, **kwargs) | ||
+ | TypeError: in method 'Window_Enable', expected argument 2 of type 'bool' | ||
− | + | in the console | |
− | + | The system description file (e.g. mySystem.py) should include the following parts: | |
+ | imports -- there is no such file do you mean something like ArduinoPins.py | ||
− | [[category: | + | [[category:SmartTerminal]] [[Category:Arduino/RaspberryPi]] |
Latest revision as of 09:43, 3 February 2017
Contents
Draft[edit]
Just a draft working on it as of Oct 2016, check history to see if updated.
see also: Controlino Notes Instrumentino/Smart Terminal Challenge
What is Instrumentino[edit]
Links to what the authors think:
My Take
Instrumentino is an instrument control system designed to interface with various smart or semi smart systems. The actual sensors and actuators can be as simple as potentiometers, lm35, solar cells, relays..... . As a sort of glue there is some smart component ( beyond Instrumentino ) which, in the base case, is an Arduino running Controlino. Instrumentino can configure Controlino on the fly to interact with a large number of sensors/actuators.
Why[edit]
Install[edit]
Misnomer I do not want to really install it I want to get it running in my Spyder environment. Russ's Computer Environment
This works[edit]
Download the file from github, the zip file. Unzip. Ignore a bunch of the stuff and take the
\instrumentino from ( ........\instrumentino-master\instrumentino ) and copy it to the place where your spyder projects live ( making a new project instrumentino )
Find the file:
......\SpyderP\instrumentino\__init__.py
and modify the top to:
from __future__ import division import sys sys.path.append( ".." ) #...... rest of file
This should make it run.
To do much more it seems you need an arduino.
Suggestions Remarks[edit]
Stuff from Russ, more as it occurs to me.
- Merge git hub for Instrumentino and Controlino. What is value of separate repositories, I do not see it.
- Is there doc for Controlino? I added just a bit at: Controlino Notes
- I like to keep my commands and responses short. Keeps speed up without high baud rates. Long wires need low baud rates. Really dislike xml idea. Would consider binary mode for time critical systems.
- Caps insensitivity is nice, but at high speeds is slower.
- Add a command to identify the software on the Arduino I use v for version, could be version, id..... My system responds something like "GreenHouse Sept04 2016" this way I can verify what I have connected to and that baud... is working.
- Looks like development is moving towards a new GUI. Consider making the GUI a snap in snap out replaceable componentl. Why Kivy, I can guess, but the fight to install might cool my jets.
- Do not make too monolithic, instead a family of applications not too tightly coupled.
Old Notes Ignore Until Properly Organized[edit]
On windows not going well[edit]
C:\Users\Russ>pip install instrumentino Collecting instrumentino Using cached instrumentino-1.0.tar.gz Collecting wxPython (from instrumentino) Could not find a version that satisfies the requirement wxPython (from instrumentino) (from versions: ) No matching distribution found for wxPython (from instrumentino) C:\Users\Russ>pip install wxPython Collecting wxPython Could not find a version that satisfies the requirement wxPython (from versions: ) No matching distribution found for wxPython
=============[edit]
C:\Users\Russ>pip install wxPython Collecting wxPython Could not find a version that satisfies the requirement wxPython (from versions: ) No matching distribution found for wxPython C:\Users\Russ>pip install wxpython Collecting wxpython Could not find a version that satisfies the requirement wxpython (from versions: ) No matching distribution found for wxpython
Well, not so bad. Useful to know that my Spyder already had wxpython, came with it or I installed, who knows. Also useful to know wxpython is called wx. This helps a lot.
Clean Install on Mint[edit]
Installed spyder
went to https://pypi.python.org/pypi/instrumentino link to git hub gave 404 search found https://github.com/yoelk/instrumentino
using D:\_Source\Python\instremento\Using Instrumentino_v03.odt package manger wxpython
Documentation[edit]
- D:\_Source\Python\instremento\Using Instrumentino_v03 (1).odt on my system, not sure where I found it. Looks like from github below.
- Github Master for Instrumentino what other than code is there: Wiki, not yet. But Russ can edit it. In https://github.com/yoelk/instrumentino/tree/master/documents there are some good documents.
- Arduino Info
Trying to Run[edit]
example_run_ArduinoPins.py on page 6/16
my was located at: D:\Russ\0000\SpyderP\instrumentino\instrumentino-master\documents\example_run_ArduinoPins.py\ArduinoPins.py
got errors until I added at top of file
- russ add
import sys sys.path.append( r"D:/Russ/0000/SpyderP" )
- end russ add
then it ran screen looked a lot like just running D:\Russ\0000\SpyderP\instrumentino\__init__.py
but what does it do. File Load Sequence and File Load Method -- cannot find any example files of these types and not sure what they should do
sequence browse also uncleare it is looking for *.mdt files which are ??
method actions, look like actions are built in -- what is time defaulting to 00:00:00 time as in time.time() or time in hr:min:sec from start of system or from
clock
Structure of system based on ArduinoPins.py[edit]
Looks like your app is a descendant of Instrument ( from instrumentino import Instrument in __init.py__) which runs when it is created.
it is modified from the base by "addition" of comps, actions, version, name, description
this then is used to initialize InstrumentinoApp which looks like it is mostly the gui.
We do not seem to have python docs or unit tests to help inform us
what are actions? seem to be tuple of things like the one SysActionSetPins() look to see if it is based on abstract base. Descends from SysAction
SysAction from instrumentino.action import SysAction, SysActionParamTime, SysActionParamFloat, SysActionParamInt
class SysAction(RunnableItem): and RunnableItem from executable_listctrl import RunnableItem which is pretty much empty, this one seems to be an ABC but not declared to be so.
An architecture document would be nice, major classes, use of threads, mvc? GUI vs other components
Add a log file ?? where to capture exceptions, just use the console, if so advise.
Well things looked good but got
Traceback (most recent call last):
File "D:/Russ/0000/SpyderP\instrumentino\__init__.py", line 155, in OnUpdateControls self.UpdateControls(event.data) File "D:/Russ/0000/SpyderP\instrumentino\__init__.py", line 180, in UpdateControls comp.Enable(cfg.IsCompOnline(comp)) File "D:/Russ/0000/SpyderP\instrumentino\comp.py", line 236, in Enable self.panel.Enable(isEnabled) File "D:\apps\Anaconda\lib\site-packages\wx-3.0-msw\wx\_core.py", line 9971, in Enable return _core_.Window_Enable(*args, **kwargs)
TypeError: in method 'Window_Enable', expected argument 2 of type 'bool'
in the console
The system description file (e.g. mySystem.py) should include the following parts:
imports -- there is no such file do you mean something like ArduinoPins.py