OpenPCR doesn't poll the control file. The control file really doesn't exist. When the USB mass storage file system SCSI command comes in and writes to the FAT block that represents the file, the command (embedded in the FAT block) is simply passed on the Atmega328, rather than be written to flash. I can't speak to the python programming question, but think as long as you open a file for write, write it quickly, and close it, it should work. The file is very tiny.
On Thu, Mar 22, 2012 at 3:58 PM, Cathal Garvey <cathalgarvey@gmail.com> wrote:
Question on dealing with this setup from within something like Python;
how is OpenPCR actually reading the file? Does it poll the file
regularly? Would a lock on the file break this system?
I ask because Python seems to support streaming in/out, but doesn't seem
to have a builtin system for just "dumping" a value on a file in one-go
like echo does.
Of course, echo might be a stream-based system too; anyone to weigh in
on this? If I use a stream object from within python to write a program
to CONTROL.TXT, will that work? It looks like I could use the
"io.FileIO" object detailed here:
http://docs.python.org/dev/library/io.html - in write mode, I think it
overwrites the file every time?
On 22/03/12 18:30, Josh Perfetto wrote:
> On Thu, Mar 22, 2012 at 9:18 AM, Nathan McCorkle <nmz787@gmail.com> wrote:
>
>> I'm pretty sure, from the talks I had with Josh and Tito, that a fake
>> file on a 'disk drive' was chosen to read/write from to get around
>> having to install serial port drivers on different platforms. Not
>> really sure why, since FTDI has royalty-free drivers for most/all
>> platforms.
>
>
> Yup. We didn't want users to have to configure serial ports which can be
> quite a pain, especially for non-techie issues. We also didn't want to deal
> with accessing serial ports in a platform-independent manner (the AIR
> platform doesn't help), nor did we want to write and distribute our own
> OpenPCR USB driver on multiple platforms. So we chose this hack instead :)
> The only thing I don't like is we couldn't get Windows to stop opening an
> explorer window when you plug it in.
>
> -Josh
>
--
www.indiebiotech.com
twitter.com/onetruecathal
joindiaspora.com/u/cathalgarvey
PGP Public Key: http://bit.ly/CathalGKey
--
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To post to this group, send email to diybio@googlegroups.com.
To unsubscribe from this group, send email to diybio+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/diybio?hl=en.
--
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To post to this group, send email to diybio@googlegroups.com.
To unsubscribe from this group, send email to diybio+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/diybio?hl=en.






0 comments:
Post a Comment