Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
bd99abd9
Commit
bd99abd9
authored
May 03, 2015
by
Kliment Yanev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update code example for printcore - it now requires gcoder to function
parent
3a9ccf60
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
README.md
README.md
+12
-5
No files found.
README.md
View file @
bd99abd9
...
...
@@ -187,12 +187,19 @@ To use printcore you need python (ideally 2.6.x or 2.7.x) and pyserial (or pytho
See pronsole for an example of a full-featured host, the bottom of printcore.py for a simple command-line
sender, or the following code example:
p=printcore('/dev/ttyUSB0',115200)
p.startprint(data) # data is an array of gcode lines
p.send_now("M105") # sends M105 as soon as possible
p.pause()
#to send a file of gcode to the printer
from printrun.printcore import printcore
from printrun import gcoder
p=printcore('/dev/ttyUSB0',115200) # or p.printcore('COM3',115200) on Windows
gcode=[i.strip() for i in open('filename.gcode')] # or pass in your own array of gcode lines instead of reading from a file
gcode = gcoder.LightGCode(gcode)
p.startprint(gcode) # this will start a print
#If you need to interact with the printer:
p.send_now("M105") # this will send M105 immediately, ahead of the rest of the print
p.pause() # use these to pause/resume the current print
p.resume()
p.disconnect()
p.disconnect()
# this is how you disconnect from the printer once you are done. This will also stop running prints.
## PLATERS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment