drepetto / chiplotle Goto Github PK
View Code? Open in Web Editor NEWNow that's a spicy plotter library
Home Page: http://chiplotle.org
License: GNU General Public License v3.0
Now that's a spicy plotter library
Home Page: http://chiplotle.org
License: GNU General Public License v3.0
Hello,
I'm having an issue with plotter detection. My HP7550A is connected using a serial to USB adaptor. It is mounted on ttyUSB0. I chmod 777 ttyUSB0 to make sure I have permissions.
Chiplotle figures out that ttyUSB0 is up but then does not manage to establish a communication with the plotter. And I get this message:
☻ chiplotle
+-----------------------+
| Chiplotle! v.0.4.1 |
+-----------------------+
Scanning serial ports...
Found ports:
/dev/ttyS0
/dev/ttyUSB0
Sniffing for plotters in all serial ports...
Found no plotter connected to any of the serial ports.
Is your plotter on?
chiplotle>
Do you have any idea of what could be the trouble? Can it be related to my configuration file?
Thanks
Has anyone tried integrating a GPIB plotter into chiplotle using this API (and associated hardware)?
https://github.com/haata/ugsimple-usb-gpib
If not, any advice on where to start?
Chiplotle supports serial port communication but why not parallel port communication ?
My serial connection (with an FTDI chip USB adapter...) didn't work yet.
When connecting the plotter with an USB - parallel port adapter, it is recognized by my system (ls /dev/usb/
)
and to send a file to the plotter the command cat drawing.hpgl > /dev/usb/lp0
is enough. (N.B. The user has to be in the lp group; I sent larger files and the buffering seems to work just fine)
Could we make Chiplotle recognize and work with devices connected via a parallel port ? (i.e. lp* and tty*)
Here my current workaround, moving a pen:
from shutil import copyfile
from datetime import datetime
# Chiplotle
from chiplotle.hpgl.commands import PA
from chiplotle.tools import io
def get_time_id():
"""
generate a unique ID
"""
time = datetime.now()
id = time.strftime('%Y%m%d%H%M%S')
return id
def make_hpgl_file(plot):
"""
create the file to be printed
"""
file_name = get_time_id() + '.hpgl'
path = sys.path[0]+'/tmp/'
file = path + file_name
# write the hpgl instructions to the file
io.save_hpgl(plot, file)
return file
def send_to_plotter(hpgl_file):
"""
copy file to printer to launch execution
plotter is recognized as printer on prallel port
"""
try:
# equals CL $ cat drawing.hpgl > dev/usb/lp0
copyfile(hpgl_file, '/dev/usb/lp0')
except Exception as e:
print(
'[ERROR]\t\tCheck if plotter is plugged in [with $ ls /dev/usb/]' + str(e))
while True:
# enter coordinate tuples where to move the pen
new_location = input('Where to go ? ')
plot = [PA([new_location])]
# execute plot
file = make_hpgl_file(plot)
send_to_plotter(file)
My only guess is that the starting point would be in the search_and_instantiate_plotters() function...
When using the CP command with a second parameter of 0.0, chiplotle incorrectly omits the second parameter in the HPGL output. This also causes the hp2xx converter to fail.
It looks like this can be fixed simply by changing this line in commands.py
:
if self.spaces and self.lines:
to
if self.spaces != None and self.lines != None:
Thank you.
In some of the test code there are references to PenDecorator, but I cannot find where it is defined.
from chiplotle.hpgl.decorators.pen import PenDecorator
Where is this implemented?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.