Hardware Reference
In-Depth Information
Discussion
In addition to invoking PRU Speak scripts via Python, it is also possible to open a shell or
TCP socket to the interpreter. When running a script, it is also possible to modify variables
to communicate with the running script.
Running PRU Speak via Shell
To invoke a shell interface to PRU Speak, run bs_shell.py :
bone# bs_shell.py
Generating LALR tables
Initializing PRU Speak
ps> SCRIPT
... SET DIO[0],var1
... GOTO 0
... ENDSCRIPT
...
0 0x01400001 SET DIO[0],var1
1 0x15000000 GOTO 0
2 0x7F000000 ENDSCRIPT
[]
ps> RUN
...
[20971521, 352321536, 2130706432]
[]
ps> SET var1,1
...
[1]
ps> SET var1,0
...
[0]
ps>Closing terminal
PRU Speak object deleted
Press Enter on a blank line to complete input to the shell. Press ^C (Ctrl-C) to exit the shell.
Search WWH ::




Custom Search