<?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 gizmologi.st</title>
	<atom:link href="http://gizmologi.st/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://gizmologi.st</link>
	<description>Notes and tutorials on open source electronics and robotics.</description>
	<lastBuildDate>Thu, 29 Jul 2010 14:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Taking Pictures with Arduino by Francis</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-2/#comment-824</link>
		<dc:creator>Francis</dc:creator>
		<pubDate>Thu, 29 Jul 2010 14:54:09 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-824</guid>
		<description>Hi Sean,

Thank you so much for this library, this has bean great help
I have tested first with comedia C328 I bought there http://www.electronics123.com/s.nl?sc=1&amp;category=&amp;search=328R.
We just plug and copy your demo code but camera didn&#039;t seem to work, and electronics123.com assistance didn&#039;t answer to any Email !!!

I finally found &amp; buy a similar there : http://www.4dsystems.com.au/prod.php?id=75
As I have some doubt about powering I better ask they help desk an get answer next day !
they also offer demo software to drive directly with PC

The result is that the cam start with only 2 &quot;sync&quot; seq.
As we where now certain of wiring and soft we test again the &quot;original&quot; 238R and we found that it need almost 25 &quot;sync&quot; to run on PC ( 4D demo software) but fail on arduino board

Finally we have to modify RESPONSE_DELAY 100 to 1000 to make this cam run......

Now I would like to transfert directly the captured image to serial port ( same question above)</description>
		<content:encoded><![CDATA[<p>Hi Sean,</p>
<p>Thank you so much for this library, this has bean great help<br />
I have tested first with comedia C328 I bought there <a href="http://www.electronics123.com/s.nl?sc=1&amp;category=&amp;search=328R" rel="nofollow">http://www.electronics123.com/s.nl?sc=1&amp;category=&amp;search=328R</a>.<br />
We just plug and copy your demo code but camera didn&#8217;t seem to work, and electronics123.com assistance didn&#8217;t answer to any Email !!!</p>
<p>I finally found &amp; buy a similar there : <a href="http://www.4dsystems.com.au/prod.php?id=75" rel="nofollow">http://www.4dsystems.com.au/prod.php?id=75</a><br />
As I have some doubt about powering I better ask they help desk an get answer next day !<br />
they also offer demo software to drive directly with PC</p>
<p>The result is that the cam start with only 2 &#8220;sync&#8221; seq.<br />
As we where now certain of wiring and soft we test again the &#8220;original&#8221; 238R and we found that it need almost 25 &#8220;sync&#8221; to run on PC ( 4D demo software) but fail on arduino board</p>
<p>Finally we have to modify RESPONSE_DELAY 100 to 1000 to make this cam run&#8230;&#8230;</p>
<p>Now I would like to transfert directly the captured image to serial port ( same question above)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by Staos</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-2/#comment-820</link>
		<dc:creator>Staos</dc:creator>
		<pubDate>Wed, 28 Jul 2010 08:08:56 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-820</guid>
		<description>Just a heads up if anyone cares - the 4D systems TTL camera also works with this library. I believe the same chipset, and if not, the commands and timing are the same.</description>
		<content:encoded><![CDATA[<p>Just a heads up if anyone cares &#8211; the 4D systems TTL camera also works with this library. I believe the same chipset, and if not, the commands and timing are the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by Control Camera with Arduino &#124; SenSorApp</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-2/#comment-802</link>
		<dc:creator>Control Camera with Arduino &#124; SenSorApp</dc:creator>
		<pubDate>Tue, 20 Jul 2010 08:19:28 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-802</guid>
		<description>[...] http://gizmologi.st/2009/04/taking-pictures-with-arduino/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://gizmologi.st/2009/04/taking-pictures-with-arduino/" rel="nofollow">http://gizmologi.st/2009/04/taking-pictures-with-arduino/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by Daryl Wilding-McBride</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-2/#comment-783</link>
		<dc:creator>Daryl Wilding-McBride</dc:creator>
		<pubDate>Tue, 13 Jul 2010 09:54:27 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-783</guid>
		<description>Thanks for this library, Sean. Have you had a chance to look at using the NewSoftSerial library, so the Arduino can talk to the camera on one serial port, and to another device on another serial port at the same time?</description>
		<content:encoded><![CDATA[<p>Thanks for this library, Sean. Have you had a chance to look at using the NewSoftSerial library, so the Arduino can talk to the camera on one serial port, and to another device on another serial port at the same time?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by Qasim</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-2/#comment-762</link>
		<dc:creator>Qasim</dc:creator>
		<pubDate>Sat, 03 Jul 2010 09:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-762</guid>
		<description>how can i save the contents to my sd card rather than transfering to pc</description>
		<content:encoded><![CDATA[<p>how can i save the contents to my sd card rather than transfering to pc</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by Qasim</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-2/#comment-761</link>
		<dc:creator>Qasim</dc:creator>
		<pubDate>Sat, 03 Jul 2010 09:26:27 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-761</guid>
		<description>really good project .
can i have the schematics please</description>
		<content:encoded><![CDATA[<p>really good project .<br />
can i have the schematics please</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by Viktar Tatsiankou</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-2/#comment-751</link>
		<dc:creator>Viktar Tatsiankou</dc:creator>
		<pubDate>Tue, 29 Jun 2010 18:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-751</guid>
		<description>Hi Sean,

I am using your library and is trying to call &quot;getRawPicture&quot; function and is having difficulties. This function accepts 4 inputs, one of the, is PictureType, which I have no problem with, however, for the second input, what exactly do you need to pass?</description>
		<content:encoded><![CDATA[<p>Hi Sean,</p>
<p>I am using your library and is trying to call &#8220;getRawPicture&#8221; function and is having difficulties. This function accepts 4 inputs, one of the, is PictureType, which I have no problem with, however, for the second input, what exactly do you need to pass?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by henry</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-1/#comment-706</link>
		<dc:creator>henry</dc:creator>
		<pubDate>Sat, 12 Jun 2010 17:24:04 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-706</guid>
		<description>Hi there, your work looks good!

I have found this camera on sparkfun 
http://www.sparkfun.com/commerce/product_info.php?products_id=9334

will this be suitable or would it require tweaking of the code?

Thanks,

Henry</description>
		<content:encoded><![CDATA[<p>Hi there, your work looks good!</p>
<p>I have found this camera on sparkfun<br />
<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9334" rel="nofollow">http://www.sparkfun.com/commerce/product_info.php?products_id=9334</a></p>
<p>will this be suitable or would it require tweaking of the code?</p>
<p>Thanks,</p>
<p>Henry</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by Whytey</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-1/#comment-686</link>
		<dc:creator>Whytey</dc:creator>
		<pubDate>Fri, 04 Jun 2010 09:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-686</guid>
		<description>Just to follow up with a solution, which was really easy really, I just needed to sleep on it and spend a day at work away from it.

Anyways, I created a python script which connects to the socket, receives the data and writes it to a file as follows...

import socket

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((&quot;192.168.0.225&quot;, 23))
print &quot;connected&quot;
s.send(&quot;r&quot;)
file = open(&quot;test.jpg&quot;,&quot;wb&quot;)

while 1:
    data = s.recv(1024)
    if not data: break
    file.write(data)
    print(data)
s.close()
file.close()

And so now, the sketch which will take a photo and return to the result via the ethernet shield, and without the need for writing it to local storage is as follows...


/*
 * Web Server
 *
 * A simple web server that shows the value of the analog input pins.
 */

#include 
#include 
#include 

#define USB_BAUD 115200
#define CAMERA_BAUD 14400

#define PAGE_SIZE 256
int LED_PIN = 8;
int BUZZ_PIN = 7;


byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 
  192, 168, 0, 225 };



uint16_t pictureSizeCount = 0;

Server server(23);
NewSoftSerial mySerial(2, 3);
CameraC328R camera(&amp;mySerial);


/**
 * This callback is called EVERY time a JPEG data packet is received.
 */
void getJPEGPicture_callback( uint16_t pictureSize, uint16_t packageSize, uint16_t packageCount, byte* package )
{
  // packageSize is the size of the picture part of the package
  pictureSizeCount += packageSize;

  server.write(package,packageSize);

  if( pictureSizeCount &gt;= pictureSize )
  {
    digitalWrite( LED_PIN, LOW );
    Serial.flush();
  }

}

void setup()
{
  Ethernet.begin(mac, ip);
  server.begin();

  Serial.begin( USB_BAUD );
  mySerial.begin(CAMERA_BAUD);

  pinMode( LED_PIN, OUTPUT );  
  pinMode( BUZZ_PIN, OUTPUT );

  digitalWrite( LED_PIN, LOW );
  digitalWrite( BUZZ_PIN, LOW );

}

void loop()
{
  Client client = server.available();

  if( client ){

    digitalWrite( LED_PIN, HIGH );

    if( !camera.sync() )
    {
      Serial.println( &quot;Sync failed.&quot; );
      return;
    }

    if( !camera.initial( CameraC328R::CT_JPEG, CameraC328R::PR_160x120, CameraC328R::JR_640x480 ) )
    {
      Serial.println( &quot;Initial failed.&quot; );
      return;
    }

    if( !camera.setPackageSize( 64 ) )
    {
      Serial.println( &quot;Package size failed.&quot; );
      return;
    }

    if( !camera.setLightFrequency( CameraC328R::FT_50Hz ) )
    {
      Serial.println( &quot;Light frequency failed.&quot; );
      return;
    }

    if( !camera.snapshot( CameraC328R::ST_COMPRESSED, 0 ) )
    {
      Serial.println( &quot;Snapshot failed.&quot; );
      return;
    }

    pictureSizeCount = 0;
    if( !camera.getJPEGPicture( CameraC328R::PT_JPEG, PROCESS_DELAY, &amp;getJPEGPicture_callback ) )
    {
      Serial.println( &quot;Get JPEG failed.&quot; );
      return;
    }
    
    client.stop();
  }
}

Just to confirm, I am using software sockets so I can also debug via USB and also a modified version of Sean&#039;s driver as linked by arms22 http://arms22.blog91.fc2.com/blog-entry-261.html

Lots of polish is required to my code to do what I want it to do, but at least I have pictures now :)

Regards,
Whytey</description>
		<content:encoded><![CDATA[<p>Just to follow up with a solution, which was really easy really, I just needed to sleep on it and spend a day at work away from it.</p>
<p>Anyways, I created a python script which connects to the socket, receives the data and writes it to a file as follows&#8230;</p>
<p>import socket</p>
<p>s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br />
s.connect((&#8220;192.168.0.225&#8243;, 23))<br />
print &#8220;connected&#8221;<br />
s.send(&#8220;r&#8221;)<br />
file = open(&#8220;test.jpg&#8221;,&#8221;wb&#8221;)</p>
<p>while 1:<br />
    data = s.recv(1024)<br />
    if not data: break<br />
    file.write(data)<br />
    print(data)<br />
s.close()<br />
file.close()</p>
<p>And so now, the sketch which will take a photo and return to the result via the ethernet shield, and without the need for writing it to local storage is as follows&#8230;</p>
<p>/*<br />
 * Web Server<br />
 *<br />
 * A simple web server that shows the value of the analog input pins.<br />
 */</p>
<p>#include<br />
#include<br />
#include </p>
<p>#define USB_BAUD 115200<br />
#define CAMERA_BAUD 14400</p>
<p>#define PAGE_SIZE 256<br />
int LED_PIN = 8;<br />
int BUZZ_PIN = 7;</p>
<p>byte mac[] = {<br />
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };<br />
byte ip[] = {<br />
  192, 168, 0, 225 };</p>
<p>uint16_t pictureSizeCount = 0;</p>
<p>Server server(23);<br />
NewSoftSerial mySerial(2, 3);<br />
CameraC328R camera(&amp;mySerial);</p>
<p>/**<br />
 * This callback is called EVERY time a JPEG data packet is received.<br />
 */<br />
void getJPEGPicture_callback( uint16_t pictureSize, uint16_t packageSize, uint16_t packageCount, byte* package )<br />
{<br />
  // packageSize is the size of the picture part of the package<br />
  pictureSizeCount += packageSize;</p>
<p>  server.write(package,packageSize);</p>
<p>  if( pictureSizeCount &gt;= pictureSize )<br />
  {<br />
    digitalWrite( LED_PIN, LOW );<br />
    Serial.flush();<br />
  }</p>
<p>}</p>
<p>void setup()<br />
{<br />
  Ethernet.begin(mac, ip);<br />
  server.begin();</p>
<p>  Serial.begin( USB_BAUD );<br />
  mySerial.begin(CAMERA_BAUD);</p>
<p>  pinMode( LED_PIN, OUTPUT );<br />
  pinMode( BUZZ_PIN, OUTPUT );</p>
<p>  digitalWrite( LED_PIN, LOW );<br />
  digitalWrite( BUZZ_PIN, LOW );</p>
<p>}</p>
<p>void loop()<br />
{<br />
  Client client = server.available();</p>
<p>  if( client ){</p>
<p>    digitalWrite( LED_PIN, HIGH );</p>
<p>    if( !camera.sync() )<br />
    {<br />
      Serial.println( &#8220;Sync failed.&#8221; );<br />
      return;<br />
    }</p>
<p>    if( !camera.initial( CameraC328R::CT_JPEG, CameraC328R::PR_160&#215;120, CameraC328R::JR_640&#215;480 ) )<br />
    {<br />
      Serial.println( &#8220;Initial failed.&#8221; );<br />
      return;<br />
    }</p>
<p>    if( !camera.setPackageSize( 64 ) )<br />
    {<br />
      Serial.println( &#8220;Package size failed.&#8221; );<br />
      return;<br />
    }</p>
<p>    if( !camera.setLightFrequency( CameraC328R::FT_50Hz ) )<br />
    {<br />
      Serial.println( &#8220;Light frequency failed.&#8221; );<br />
      return;<br />
    }</p>
<p>    if( !camera.snapshot( CameraC328R::ST_COMPRESSED, 0 ) )<br />
    {<br />
      Serial.println( &#8220;Snapshot failed.&#8221; );<br />
      return;<br />
    }</p>
<p>    pictureSizeCount = 0;<br />
    if( !camera.getJPEGPicture( CameraC328R::PT_JPEG, PROCESS_DELAY, &amp;getJPEGPicture_callback ) )<br />
    {<br />
      Serial.println( &#8220;Get JPEG failed.&#8221; );<br />
      return;<br />
    }</p>
<p>    client.stop();<br />
  }<br />
}</p>
<p>Just to confirm, I am using software sockets so I can also debug via USB and also a modified version of Sean&#8217;s driver as linked by arms22 <a href="http://arms22.blog91.fc2.com/blog-entry-261.html" rel="nofollow">http://arms22.blog91.fc2.com/blog-entry-261.html</a></p>
<p>Lots of polish is required to my code to do what I want it to do, but at least I have pictures now <img src='http://gizmologi.st/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards,<br />
Whytey</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Taking Pictures with Arduino by Whytey</title>
		<link>http://gizmologi.st/2009/04/taking-pictures-with-arduino/comment-page-1/#comment-680</link>
		<dc:creator>Whytey</dc:creator>
		<pubDate>Thu, 03 Jun 2010 14:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://gizmologi.st/?p=5#comment-680</guid>
		<description>Thanks Sean for the initial library and explanation and to others that added helpful comments.

I managed to hook up my C328 via the NewSoftSerial library and connect to the Arduino board using Telnet.  My sketch is written such that it will stream back a JPEG&#039;s worth of bytes to the connected client and then force a disconnect.

My purpose for this sketch is to be able to connect remotely at intervals and retrieve an image.  The problem is, the retrieved bytes don&#039;t seem to make a valid JPEG.  The actual serial monitor I have indicates that everything is in working order, it is purely the returned data that seems to be the problem.

Is there anything I need to do to the returned bytes before they can be classed as a valid JPEG?

Regards,
Whytey</description>
		<content:encoded><![CDATA[<p>Thanks Sean for the initial library and explanation and to others that added helpful comments.</p>
<p>I managed to hook up my C328 via the NewSoftSerial library and connect to the Arduino board using Telnet.  My sketch is written such that it will stream back a JPEG&#8217;s worth of bytes to the connected client and then force a disconnect.</p>
<p>My purpose for this sketch is to be able to connect remotely at intervals and retrieve an image.  The problem is, the retrieved bytes don&#8217;t seem to make a valid JPEG.  The actual serial monitor I have indicates that everything is in working order, it is purely the returned data that seems to be the problem.</p>
<p>Is there anything I need to do to the returned bytes before they can be classed as a valid JPEG?</p>
<p>Regards,<br />
Whytey</p>
]]></content:encoded>
	</item>
</channel>
</rss>
