Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Publication Station
Search
Editing
Courses/Pielen met Plotters
(section)
From Publication Station
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Installeer de driver === Om vervolgens te zorgen dat je computer met de plotter kan communiceren moet je even een driver installeren. Voor '''mac''' kun je die [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41 hier] vinden. Voor '''windows''' [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41 hier]. De minimale code die je nodig hebt om de plotter aan te sturen is als volgt: <nowiki> import processing.serial.*; // Communicating with the plotter happens via the serial port, so we import the libraries first Serial myPort; // Create object from Serial class void setup(){ size(200,200); println(Serial.list()); // Output a list of available serial ports try{ String portName = Serial.list()[0]; // Instead of the zero, use the right number based on the list mentioned above myPort = new Serial(this, portName, 9600); myPort.write("IN"); // Tell the plotter that communication will commence plotterLine (0,0,700,100); } catch ( Exception e){ println("Error"+ e); } } void plotterLine(float x1, float y1, float x2, float y2) { println("plotterline"); myPort.write("PU"); //Write the command for pen up to the serial port myPort.write("PA" + str(x1) + "," + str(y1) +";"); // pen go to position x1, y1 myPort.write("PD"); // pen down myPort.write("PA" + str(x2) + "," + str(y2) +";"); // pen go to position x1, y1 myPort.write("PU"); // pen up } </nowiki> Meer voorbeelden kun je hier vinden: [[Media:Voorbeelden.zip]]
Summary:
Please note that all contributions to Publication Station are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Publication Station:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Main navigation
Main page
Printmaking Studio
Print Studio
Dig. Publishing Studio
Namespaces
Grafiwiki
Random Page
Log in
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs