<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Phidget Servo motor output via Processing</title>
	<atom:link href="http://www.jasonmcdermott.net/2009/08/processing-phidget-servo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonmcdermott.net/2009/08/processing-phidget-servo/</link>
	<description>Design, design, design.</description>
	<lastBuildDate>Mon, 06 Feb 2012 12:31:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Phidgets with Processing &#124; IDHO 2011</title>
		<link>http://www.jasonmcdermott.net/2009/08/processing-phidget-servo/#comment-17</link>
		<dc:creator>Phidgets with Processing &#124; IDHO 2011</dc:creator>
		<pubDate>Tue, 26 Oct 2010 05:26:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jasonmcdermott.net/?p=553#comment-17</guid>
		<description>[...] Servo motor [...]</description>
		<content:encoded><![CDATA[<p>[...] Servo motor [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Polprav</title>
		<link>http://www.jasonmcdermott.net/2009/08/processing-phidget-servo/#comment-16</link>
		<dc:creator>Polprav</dc:creator>
		<pubDate>Wed, 14 Oct 2009 20:10:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jasonmcdermott.net/?p=553#comment-16</guid>
		<description>Hello from Russia)</description>
		<content:encoded><![CDATA[<p>Hello from Russia)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jasonmcdermott</title>
		<link>http://www.jasonmcdermott.net/2009/08/processing-phidget-servo/#comment-15</link>
		<dc:creator>jasonmcdermott</dc:creator>
		<pubDate>Thu, 08 Oct 2009 05:26:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.jasonmcdermott.net/?p=553#comment-15</guid>
		<description>Hi Andrew,I agree the phidget documentation is sorely lacking, if you have the chance to look into arduino hardware instead I would recommend it - the supporting community and documentation well and truly make up for the learning curve.  Phidgets aren&#039;t impossible to get working in processing, the java library does exist and it should help point you in the right direction, just go to the java section of the phidgets website.I had a look at your code, it seems like the copy+paste between processing and wordpress isn&#039;t the cleanest method - some commented lines get wrapped and smart quotes are another problem.  I cleaned that up a little bit, it was just a simple matter of checking each of the open and close braces { and }.  Give this a try (and don&#039;t forget to download the phidget21.jar file or nothing will happen.I hope this helps, drop me a line if you have any more hassles.  Good luck!import com.phidgets.*;import com.phidgets.event.*;// Declare Variables – a ServoPhidget object called ’sp’, a Double called ‘pos’ and an integer called ‘xPos’ServoPhidget sp; // Declare the servophidgetdouble pos;int xPos;// Set size, video framerate, connect to and open phidget objectvoid setup(){frameRate(20);size(400,300);try {// Create &amp; Assign the servophidgetsp = new ServoPhidget();sp.openAny();println(&quot;Waiting for Phidget&quot;);sp.waitForAttachment();// if you do not see this below in the console, your phidget is not connectedprintln(&quot;OK ready to go&quot;);}catch(Exception e){println(&quot;ERROR&quot;);System.out.println(e);}}void draw(){background(200);// map the mouse x coordinate to the available range of the servophidgetpos = map(mouseX,0,width,-22.9,232.0);// read the data from the phidgettry {sp.setPosition(0,pos);sp.getPositionMax(0);// checking the max and min values for the servophidgetdouble helloMax = sp.getPositionMax(0);double helloMin = sp.getPositionMin(0);// print a line to the console to display the data as it arrivesprintln(&quot;min is: &quot; + helloMin + &quot;, max is: &quot; + helloMax + &quot;, current position is: &quot; + pos);}catch(Exception e) {println(&quot;ERROR&quot;);System.out.println(e);}// the double variable is not used in processing, but is needed to send to the servophidget.// to display this data as a graph onscreen you need to convert it to a floating point numberfloat fPos = (float)pos;fPos = map(fPos,-22.9,232.0,0,height);stroke(0);// line(xPos,0,xPos,height-fPos); // Un-comment out this line to draw a vertical graph of the motor movementstroke(50);line(mouseX,0,mouseX,height);// this controls the graph position onscreen, it animates the graph and refreshes to the 0 position when the graph goes offscreenif (xPos &gt;= width){xPos = 0;}else {xPos++;}}</description>
		<content:encoded><![CDATA[<p>Hi Andrew,I agree the phidget documentation is sorely lacking, if you have the chance to look into arduino hardware instead I would recommend it &#8211; the supporting community and documentation well and truly make up for the learning curve.  Phidgets aren&#8217;t impossible to get working in processing, the java library does exist and it should help point you in the right direction, just go to the java section of the phidgets website.I had a look at your code, it seems like the copy+paste between processing and wordpress isn&#8217;t the cleanest method &#8211; some commented lines get wrapped and smart quotes are another problem.  I cleaned that up a little bit, it was just a simple matter of checking each of the open and close braces { and }.  Give this a try (and don&#8217;t forget to download the phidget21.jar file or nothing will happen.I hope this helps, drop me a line if you have any more hassles.  Good luck!import com.phidgets.*;import com.phidgets.event.*;// Declare Variables – a ServoPhidget object called ’sp’, a Double called ‘pos’ and an integer called ‘xPos’ServoPhidget sp; // Declare the servophidgetdouble pos;int xPos;// Set size, video framerate, connect to and open phidget objectvoid setup(){frameRate(20);size(400,300);try {// Create &#038; Assign the servophidgetsp = new ServoPhidget();sp.openAny();println(&#8220;Waiting for Phidget&#8221;);sp.waitForAttachment();// if you do not see this below in the console, your phidget is not connectedprintln(&#8220;OK ready to go&#8221;);}catch(Exception e){println(&#8220;ERROR&#8221;);System.out.println(e);}}void draw(){background(200);// map the mouse x coordinate to the available range of the servophidgetpos = map(mouseX,0,width,-22.9,232.0);// read the data from the phidgettry {sp.setPosition(0,pos);sp.getPositionMax(0);// checking the max and min values for the servophidgetdouble helloMax = sp.getPositionMax(0);double helloMin = sp.getPositionMin(0);// print a line to the console to display the data as it arrivesprintln(&#8220;min is: &#8221; + helloMin + &#8220;, max is: &#8221; + helloMax + &#8220;, current position is: &#8221; + pos);}catch(Exception e) {println(&#8220;ERROR&#8221;);System.out.println(e);}// the double variable is not used in processing, but is needed to send to the servophidget.// to display this data as a graph onscreen you need to convert it to a floating point numberfloat fPos = (float)pos;fPos = map(fPos,-22.9,232.0,0,height);stroke(0);// line(xPos,0,xPos,height-fPos); // Un-comment out this line to draw a vertical graph of the motor movementstroke(50);line(mouseX,0,mouseX,height);// this controls the graph position onscreen, it animates the graph and refreshes to the 0 position when the graph goes offscreenif (xPos >= width){xPos = 0;}else {xPos++;}}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.jasonmcdermott.net/2009/08/processing-phidget-servo/#comment-14</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 08 Oct 2009 03:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jasonmcdermott.net/?p=553#comment-14</guid>
		<description>Hello,I am currently a physical computing student. I am trying to use your sample code as a base point for studying Processing and Phidgets. Due to lack of documentation on the subject I am asking for your help. Currently I am bouncing between 2 different machines, 1 is running linux the other Mac Os X Snow Leopard. With your code I can&#039;t get very far on my Linux machine. On my Mac I am getting farther however my device is still not functional in processing. I was wondering if you could take a look at my code and let me know what is causing problems.The error I receive is unexpected token: void. That error falls upon the void draw line.import com.phidgets.*;import com.phidgets.event.*;// Declare Variables – a ServoPhidget object called ’sp’, a Double called ‘pos’ and an integer called ‘xPos’ServoPhidget sp; // Declare the servophidgetdouble pos; // this is a type of number, which can store more decimal place values than the standard floating point value, check the referennce pageint xPos;// Set size, video framerate, connect to and open phidget objectvoid setup(){frameRate(20);size(400,300);try{// Create &amp; Assign the servophidgetsp = new ServoPhidget();sp.openAny();println(&quot;Waiting for Phidget&quot;);sp.waitForAttachment();// if you do not see this below in the console, your phidget is not connectedprintln(&quot;OK ready to go&quot;);}catch(Exception e){println(&quot;ERROR&quot;);System.out.println(e);}void draw(){background(200);// map the mouse x coordinate to the available range of the servophidgetpos = map(mouseX,0,width,-22.9,232.0);// read the data from the phidgettry}{sp.setPosition(0,pos);sp.getPositionMax(0);// checking the max and min values for the servophidgetdouble helloMax = sp.getPositionMax(0);double helloMin = sp.getPositionMin(0);// print a line to the console to display the data as it arrivesprintln(&quot;min is: &quot; + helloMin + &quot;, max is: &quot; + helloMax + &quot;, current position is: &quot; + pos);}catch(Exception e){println(&quot;ERROR&quot;);System.out.println(e);}// the double variable is not used in processing, but is needed to send to the servophidget.// to display this data as a graph onscreen you need to convert it to a floating point numberfloat fPos = (float)pos;fPos = map(fPos,-22.9,232.0,0,height);stroke(0);//  line(xPos,0,xPos,height-fPos); // Un-comment out this line to draw a vertical graph of the motor movementstroke(50);line(mouseX,0,mouseX,height);// this controls the graph position onscreen, it animates the graph and refreshes to the 0 position when the graph goes offscreenif (xPos &gt;= width){xPos = 0;}else {xPos++;}}Thanks,Andrew</description>
		<content:encoded><![CDATA[<p>Hello,I am currently a physical computing student. I am trying to use your sample code as a base point for studying Processing and Phidgets. Due to lack of documentation on the subject I am asking for your help. Currently I am bouncing between 2 different machines, 1 is running linux the other Mac Os X Snow Leopard. With your code I can&#8217;t get very far on my Linux machine. On my Mac I am getting farther however my device is still not functional in processing. I was wondering if you could take a look at my code and let me know what is causing problems.The error I receive is unexpected token: void. That error falls upon the void draw line.import com.phidgets.*;import com.phidgets.event.*;// Declare Variables – a ServoPhidget object called ’sp’, a Double called ‘pos’ and an integer called ‘xPos’ServoPhidget sp; // Declare the servophidgetdouble pos; // this is a type of number, which can store more decimal place values than the standard floating point value, check the referennce pageint xPos;// Set size, video framerate, connect to and open phidget objectvoid setup(){frameRate(20);size(400,300);try{// Create &amp; Assign the servophidgetsp = new ServoPhidget();sp.openAny();println(&#8220;Waiting for Phidget&#8221;);sp.waitForAttachment();// if you do not see this below in the console, your phidget is not connectedprintln(&#8220;OK ready to go&#8221;);}catch(Exception e){println(&#8220;ERROR&#8221;);System.out.println(e);}void draw(){background(200);// map the mouse x coordinate to the available range of the servophidgetpos = map(mouseX,0,width,-22.9,232.0);// read the data from the phidgettry}{sp.setPosition(0,pos);sp.getPositionMax(0);// checking the max and min values for the servophidgetdouble helloMax = sp.getPositionMax(0);double helloMin = sp.getPositionMin(0);// print a line to the console to display the data as it arrivesprintln(&#8220;min is: &#8221; + helloMin + &#8220;, max is: &#8221; + helloMax + &#8220;, current position is: &#8221; + pos);}catch(Exception e){println(&#8220;ERROR&#8221;);System.out.println(e);}// the double variable is not used in processing, but is needed to send to the servophidget.// to display this data as a graph onscreen you need to convert it to a floating point numberfloat fPos = (float)pos;fPos = map(fPos,-22.9,232.0,0,height);stroke(0);//  line(xPos,0,xPos,height-fPos); // Un-comment out this line to draw a vertical graph of the motor movementstroke(50);line(mouseX,0,mouseX,height);// this controls the graph position onscreen, it animates the graph and refreshes to the 0 position when the graph goes offscreenif (xPos &gt;= width){xPos = 0;}else {xPos++;}}Thanks,Andrew</p>
]]></content:encoded>
	</item>
</channel>
</rss>

