<?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 for MyDarkMaterials.co.uk</title>
	<atom:link href="http://www.mydarkmaterials.co.uk/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mydarkmaterials.co.uk</link>
	<description></description>
	<lastBuildDate>Mon, 12 Jul 2010 19:11:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>Comment on PHP and the Arduino &#8211; Follow-up by Tinlad</title>
		<link>http://www.mydarkmaterials.co.uk/2009/04/php-and-the-arduino-followup/comment-page-1/#comment-1000</link>
		<dc:creator>Tinlad</dc:creator>
		<pubDate>Mon, 12 Jul 2010 19:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=98#comment-1000</guid>
		<description>Yeah, I&#039;ve had issues with getting WordPress to play nicely with code in comments. I think I see your aim though.

To be honest, if I were doing this project again I&#039;d do it slightly differently because, as you&#039;re finding, the way I&#039;ve done it is not very flexible.

To have both incremental and toggle controls for a single device could be achieved (in a fairly hackish way) using JavaScript. If you had two drop-down menus, &lt;em&gt;inc_dropdown&lt;/em&gt; with values 0, 25, 50, ..., 255 and &lt;em&gt;toggle_dropdown&lt;/em&gt; with 0 and 255:

&lt;code&gt;
var myValue;
$(document).ready(function(){
    $(&#039;#inc_dropdown, #toggle_dropdown&#039;).change(function(){myValue = $(this).val();});
    $(&#039;#submit&#039;).click(function(){
        ping($(&#039;#l&#039;).val(), myValue);
        return false;
    });
});
&lt;/code&gt;

What that would do (hopefully, it&#039;s untested) is set the value of the variable &#039;myValue&#039; to that of whichever of the two drop-downs was changed last. The ping() function is then given &#039;myValue&#039; as a parameter instead of the value of any single form control. I hope that makes sense...

Regarding status reports - it&#039;s been well over a year since I had this actually set up and running, but if I recall correctly I did have trouble getting the PHP Serial class to reliably receive data from the Arduino. The &#039;status&#039; div is meant to be empty though - it&#039;s populated using JavaScript. I can&#039;t really think why it wouldn&#039;t be working for you though.

Sorry if this hasn&#039;t been a very helpful message!</description>
		<content:encoded><![CDATA[<p>Yeah, I&#8217;ve had issues with getting WordPress to play nicely with code in comments. I think I see your aim though.</p>
<p>To be honest, if I were doing this project again I&#8217;d do it slightly differently because, as you&#8217;re finding, the way I&#8217;ve done it is not very flexible.</p>
<p>To have both incremental and toggle controls for a single device could be achieved (in a fairly hackish way) using JavaScript. If you had two drop-down menus, <em>inc_dropdown</em> with values 0, 25, 50, &#8230;, 255 and <em>toggle_dropdown</em> with 0 and 255:</p>
<p><code><br />
var myValue;<br />
$(document).ready(function(){<br />
    $('#inc_dropdown, #toggle_dropdown').change(function(){myValue = $(this).val();});<br />
    $('#submit').click(function(){<br />
        ping($('#l').val(), myValue);<br />
        return false;<br />
    });<br />
});<br />
</code></p>
<p>What that would do (hopefully, it&#8217;s untested) is set the value of the variable &#8216;myValue&#8217; to that of whichever of the two drop-downs was changed last. The ping() function is then given &#8216;myValue&#8217; as a parameter instead of the value of any single form control. I hope that makes sense&#8230;</p>
<p>Regarding status reports &#8211; it&#8217;s been well over a year since I had this actually set up and running, but if I recall correctly I did have trouble getting the PHP Serial class to reliably receive data from the Arduino. The &#8216;status&#8217; div is meant to be empty though &#8211; it&#8217;s populated using JavaScript. I can&#8217;t really think why it wouldn&#8217;t be working for you though.</p>
<p>Sorry if this hasn&#8217;t been a very helpful message!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP and the Arduino &#8211; Follow-up by Dabrain13</title>
		<link>http://www.mydarkmaterials.co.uk/2009/04/php-and-the-arduino-followup/comment-page-1/#comment-999</link>
		<dc:creator>Dabrain13</dc:creator>
		<pubDate>Mon, 12 Jul 2010 17:37:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=98#comment-999</guid>
		<description>Well, I guess it won&#039;t let me post the HTML exactly, but they&#039;re both in the same format, just different options.  They&#039;re even in the same .</description>
		<content:encoded><![CDATA[<p>Well, I guess it won&#8217;t let me post the HTML exactly, but they&#8217;re both in the same format, just different options.  They&#8217;re even in the same .</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP and the Arduino &#8211; Follow-up by Dabrain13</title>
		<link>http://www.mydarkmaterials.co.uk/2009/04/php-and-the-arduino-followup/comment-page-1/#comment-997</link>
		<dc:creator>Dabrain13</dc:creator>
		<pubDate>Mon, 12 Jul 2010 17:36:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=98#comment-997</guid>
		<description>Thanks so much for your help!

Ok, I&#039;ve got the communication working and the lights are turning on!  Unfortunately, I&#039;m not getting any status reports.  I noticed that in index.php, there&#039;s nothing in the &quot;status&quot; div, is that ok?

In addition, I&#039;d like to add another form that just has the options on and off for two of the ports.  I tried simply copying and editing, but it seems to only work if it&#039;s in that original form, any suggestions?  Here&#039;s the HTML for the form currently:

&lt;code&gt;

	
		
		  Lights
		  Fan
          Water Pump
		
		
		  0%
		  10%
		  20%
		  30%
		  40%
		  50%
		  60%
		  70%
		  80%
		  90%
		  100%
		
        
        
		  Water Pump
		  Stove
		
		
		  Off
		  On
		
		
        

&lt;/code&gt;

I&#039;m using this for a Power controller hence the random appliance names.

Thanks for your help!</description>
		<content:encoded><![CDATA[<p>Thanks so much for your help!</p>
<p>Ok, I&#8217;ve got the communication working and the lights are turning on!  Unfortunately, I&#8217;m not getting any status reports.  I noticed that in index.php, there&#8217;s nothing in the &#8220;status&#8221; div, is that ok?</p>
<p>In addition, I&#8217;d like to add another form that just has the options on and off for two of the ports.  I tried simply copying and editing, but it seems to only work if it&#8217;s in that original form, any suggestions?  Here&#8217;s the HTML for the form currently:</p>
<p><code></p>
<p>		  Lights<br />
		  Fan<br />
          Water Pump</p>
<p>		  0%<br />
		  10%<br />
		  20%<br />
		  30%<br />
		  40%<br />
		  50%<br />
		  60%<br />
		  70%<br />
		  80%<br />
		  90%<br />
		  100%</p>
<p>		  Water Pump<br />
		  Stove</p>
<p>		  Off<br />
		  On</p>
<p></code></p>
<p>I&#8217;m using this for a Power controller hence the random appliance names.</p>
<p>Thanks for your help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP and the Arduino &#8211; Follow-up by Tinlad</title>
		<link>http://www.mydarkmaterials.co.uk/2009/04/php-and-the-arduino-followup/comment-page-1/#comment-996</link>
		<dc:creator>Tinlad</dc:creator>
		<pubDate>Mon, 12 Jul 2010 16:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=98#comment-996</guid>
		<description>The version of jQuery you use shouldn&#039;t matter. The uncompressed version is nicely formatted and uses sensible variable names, and is as such quite &quot;human-readable&quot;. The minified version uses short variable names and removes all white space from the script so that the file-size is smaller (to save bandwidth), at the expense of human-readability. Both produce identical results though.

It&#039;s an encouraging sign that the Arduino&#039;s TX/RX lights are blinking when you send the signal. To me that suggests that although it&#039;s receiving the packet, it&#039;s not being interpreted as a valid set of values.

To test this I would strip the Arduino code back to basics - have it turn on the LED regardless of what character(s) are received, i.e.:

&lt;code&gt;if(Serial.available() &gt; 0){
    analogWrite(9,255);
}&lt;/code&gt;
(replace 9 with the pin your LED&#039;s attached to)

If that works, then it&#039;s probably a problem with the packet system - either PHP&#039;s not encoding it right, or the Arduino isn&#039;t interpreting it correctly.

Good luck! Please feel free to ask more questions.</description>
		<content:encoded><![CDATA[<p>The version of jQuery you use shouldn&#8217;t matter. The uncompressed version is nicely formatted and uses sensible variable names, and is as such quite &#8220;human-readable&#8221;. The minified version uses short variable names and removes all white space from the script so that the file-size is smaller (to save bandwidth), at the expense of human-readability. Both produce identical results though.</p>
<p>It&#8217;s an encouraging sign that the Arduino&#8217;s TX/RX lights are blinking when you send the signal. To me that suggests that although it&#8217;s receiving the packet, it&#8217;s not being interpreted as a valid set of values.</p>
<p>To test this I would strip the Arduino code back to basics &#8211; have it turn on the LED regardless of what character(s) are received, i.e.:</p>
<p><code>if(Serial.available() > 0){<br />
    analogWrite(9,255);<br />
}</code><br />
(replace 9 with the pin your LED&#8217;s attached to)</p>
<p>If that works, then it&#8217;s probably a problem with the packet system &#8211; either PHP&#8217;s not encoding it right, or the Arduino isn&#8217;t interpreting it correctly.</p>
<p>Good luck! Please feel free to ask more questions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP and the Arduino &#8211; Follow-up by Dabrain13</title>
		<link>http://www.mydarkmaterials.co.uk/2009/04/php-and-the-arduino-followup/comment-page-1/#comment-995</link>
		<dc:creator>Dabrain13</dc:creator>
		<pubDate>Mon, 12 Jul 2010 15:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=98#comment-995</guid>
		<description>Thanks for your reply.

I have everything setup now including Apache and have auto-reset disable using a 110 ohm resistor.  However I still cannot get the LED&#039;s to turn on.  I edited my serial port address in serial.php and downloaded the other two files needed and put them in the correct directory but it has yet to function.  With the jquery library, do you download the compressed, uncompressed, or minified versions?  I downloaded the uncompressed and then renamed it as jquery.js as is referenced.  Perhaps that&#039;s where I went wrong?

The arduino tx and rx lights blink when I send the signal, but nothing happens.  Any suggestions?</description>
		<content:encoded><![CDATA[<p>Thanks for your reply.</p>
<p>I have everything setup now including Apache and have auto-reset disable using a 110 ohm resistor.  However I still cannot get the LED&#8217;s to turn on.  I edited my serial port address in serial.php and downloaded the other two files needed and put them in the correct directory but it has yet to function.  With the jquery library, do you download the compressed, uncompressed, or minified versions?  I downloaded the uncompressed and then renamed it as jquery.js as is referenced.  Perhaps that&#8217;s where I went wrong?</p>
<p>The arduino tx and rx lights blink when I send the signal, but nothing happens.  Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP and the Arduino &#8211; Follow-up by Tinlad</title>
		<link>http://www.mydarkmaterials.co.uk/2009/04/php-and-the-arduino-followup/comment-page-1/#comment-991</link>
		<dc:creator>Tinlad</dc:creator>
		<pubDate>Sat, 10 Jul 2010 16:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=98#comment-991</guid>
		<description>Hi dabrain,

The PHP was indeed hosted on the built-in Apache server on my Mac.

The iPod doesn&#039;t perform any other function other than as a web-browser. It&#039;s connected, via Wi-Fi, to the LAN my Mac&#039;s on. Then I just point Safari to &lt;em&gt;http://computername.local&lt;/em&gt; to see the Apache hosted files.

The serial port to use is defined in the PHP code, which uses the PHP Serial class to do the actual communication.

I hope that answers your questions.

Thanks,

Tinlad</description>
		<content:encoded><![CDATA[<p>Hi dabrain,</p>
<p>The PHP was indeed hosted on the built-in Apache server on my Mac.</p>
<p>The iPod doesn&#8217;t perform any other function other than as a web-browser. It&#8217;s connected, via Wi-Fi, to the LAN my Mac&#8217;s on. Then I just point Safari to <em><a href="http://computername.local" rel="nofollow">http://computername.local</a></em> to see the Apache hosted files.</p>
<p>The serial port to use is defined in the PHP code, which uses the PHP Serial class to do the actual communication.</p>
<p>I hope that answers your questions.</p>
<p>Thanks,</p>
<p>Tinlad</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP and the Arduino &#8211; Follow-up by dabrain13</title>
		<link>http://www.mydarkmaterials.co.uk/2009/04/php-and-the-arduino-followup/comment-page-1/#comment-990</link>
		<dc:creator>dabrain13</dc:creator>
		<pubDate>Sat, 10 Jul 2010 15:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=98#comment-990</guid>
		<description>This is a great project!  I just have a few questions.  One, where are you hosting the php code, on an Apache server on your Mac?  Two, when you define the serial port, do you specify a port on the server?  Clearly your iPod has no usb ports so how does it know where the arduino is?</description>
		<content:encoded><![CDATA[<p>This is a great project!  I just have a few questions.  One, where are you hosting the php code, on an Apache server on your Mac?  Two, when you define the serial port, do you specify a port on the server?  Clearly your iPod has no usb ports so how does it know where the arduino is?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Interfacing PHP with the Arduino (with a splash OS X) by Amy</title>
		<link>http://www.mydarkmaterials.co.uk/2008/11/interfacing-php-with-the-arduino/comment-page-1/#comment-688</link>
		<dc:creator>Amy</dc:creator>
		<pubDate>Sat, 03 Apr 2010 02:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=16#comment-688</guid>
		<description>hi .
im using arduino and online database. but i have problem on how to connect the db with arduino.i dont have idea how to pull data from online db to display at LCD via my arduino.</description>
		<content:encoded><![CDATA[<p>hi .<br />
im using arduino and online database. but i have problem on how to connect the db with arduino.i dont have idea how to pull data from online db to display at LCD via my arduino.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Window 7 Beta: Boot Camp &amp; VMware Fusion by Graham</title>
		<link>http://www.mydarkmaterials.co.uk/2009/01/window-7-beta-boot-camp-vmware-fusion/comment-page-1/#comment-593</link>
		<dc:creator>Graham</dc:creator>
		<pubDate>Mon, 22 Feb 2010 10:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=63#comment-593</guid>
		<description>Thanks so much for your advice. Saved me from desperation :-)</description>
		<content:encoded><![CDATA[<p>Thanks so much for your advice. Saved me from desperation <img src='http://www.mydarkmaterials.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Interfacing PHP with the Arduino (with a splash OS X) by More Arduino + LCD + PHP fun &#171; Arduinian Tales</title>
		<link>http://www.mydarkmaterials.co.uk/2008/11/interfacing-php-with-the-arduino/comment-page-1/#comment-550</link>
		<dc:creator>More Arduino + LCD + PHP fun &#171; Arduinian Tales</dc:creator>
		<pubDate>Thu, 11 Feb 2010 08:56:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydarkmaterials.co.uk/?p=16#comment-550</guid>
		<description>[...] http://www.mydarkmaterials.co.uk/2008/11/interfacing-php-with-the-arduino/ (this is an example of interfacing PHP Serial with Arduino, and I suspect old enough that many of the problems the author ran into aren’t there any longer … maybe it’s been silly of me to ignore PHP … I actually have a decent idea of what I’m doing there) [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.mydarkmaterials.co.uk/2008/11/interfacing-php-with-the-arduino/" rel="nofollow">http://www.mydarkmaterials.co.uk/2008/11/interfacing-php-with-the-arduino/</a> (this is an example of interfacing PHP Serial with Arduino, and I suspect old enough that many of the problems the author ran into aren’t there any longer … maybe it’s been silly of me to ignore PHP … I actually have a decent idea of what I’m doing there) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
