Python to Serial
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/08/2012 at 06:51, xxxxxxxx wrote:
Hello everybody.
Scripting is still pretty out of my comfort zone and I would appreciate it if some of you clever folk could assist me with a challenge I'm currently struggling with:
I'm trying to get the RGB values of a mograph clone out of Cinema and on to an Arduino by serial. The xpresso setup does all of the calculation work on the cinema side which is fine, as is getting the data into a python node. My problem begins when I start using code from the pyserial library. As far as I can tell I'm not defining my outputs properly and I'm struggling to find info on the web for this area specifically.
http://payload49.cargocollective.com/1/7/232284/3297585/pyserial issues.jpg
I guess my question is:
Does anyone have any example code they can share regarding getting data coming into a python node and sending it somewhere by serial?
or
Can anyone point out where my mistakes in defining my outputs may lie?
Many thanks in advance.
Adam
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/08/2012 at 09:50, xxxxxxxx wrote:
Hello Adam,
your picture is too small.
-Nik
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/08/2012 at 10:06, xxxxxxxx wrote:
Sorry, try these:
http://payload49.cargocollective.com/1/7/232284/3297585/pyserial issues_01.jpg
http://payload49.cargocollective.com/1/7/232284/3297585/pyserial issues_02.jpg
Thanks
Adam
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/08/2012 at 10:51, xxxxxxxx wrote:
Try indenting your code so it fits with the indentation of the main() block. The code that is not indented will be executed only once, when the script is loaded into memory to extract the main() function for future calls.
-Nik
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/08/2012 at 11:00, xxxxxxxx wrote:
So simple! Thank you!!