Re: [DIYbio] Web-ready Refrideubator

Well, C is overkill and python doesn't use brackets.
And I have been programming in Perl for dare I say > 10 years? Considering that, I should be much better at Perl than I am.




On Mon, Mar 31, 2014 at 11:28 AM, Nathan McCorkle <nmz787@gmail.com> wrote:

Why perl?

On Mar 31, 2014 11:19 AM, "Josiah Zayner" <josiah.zayner@gmail.com> wrote:
I have been working on a bunch of code that allows one to plug in a couple Arduinos to a Linux computer running a webserver using Perl.  One can communicate with the arduino through a webpage and see the output of the Arudino. So I can say change the temperature on an incubator or control a PCR machine. I saw this thread so I just made a blog post about it: http://doitourselfscience.blogspot.com/2014/03/sending-and-receiving-data-from-arduino.html

The code is a little complicated but it all works great. I have the incubator code up on the blog as that is all I have accomplished so far. It controls a fan and some heating element through MOSFETs, which I find are easiest.

Anyways, if you have questions or want to hack it to do something else let me know and I can probably help.


Thanks,
     Josiah Zayner
     http://DoItOurselfScience.blogspot.com


On Monday, March 31, 2014 10:22:18 AM UTC-7, Avery wrote:
I could do it on another machine, or on a PaaS, but right now the important thing for me is to try it out- what is it like to just let your cells chill in the lab?

The other question is in integration of other devices.  There is really no reason to have something like this for regular pcr (maybe for qpcr) since PCR machines already tell you when they will be done, and store products at 4c (normally) once they are done.  Electrophoresis on the other hand would be perfect for something like this.  Set it up, go get coffee, watch tv...check you gel.  So now the question is how I want to set up the rest of the tools so I can re-use code to make more machines.

Basically I need to map computers/device architecture to how they should be available.  I also need to decide if I am building the system to be portable (in the code sense of transferring the build info) to other peoples labs.

--A


On Mon, Mar 31, 2014 at 1:13 PM, Cathal Garvey (Phone) <cathal...@cathalgarvey.me> wrote:
Easier I feel to use XMLHttp.Server to host an XML-HTTP API server and use the corresponding Client module to pull and process data on another machine? Consider installing a secure XML monkeypatch though.


On 31 March 2014 17:51:01 GMT+01:00, Nathan McCorkle <nmz...@gmail.com> wrote:
those requests would be quite small though, so as long as the pi
doesn't throw them out, rather queues them, it might take a second or
three long but it should be fine... the returned data is just a few
bytes of text, and the packet overhead should be 20 bytes (according
to a quick google for ipv4). Someone else should probably comment on
the best server for the pi, but basically it should have a decent
timeout set and the ability to queue requests. I'd give flask a quick
try:
http://mattrichardson.com/Raspberry-Pi-Flask/

If the pi was trying to do the temp control PID loop, well you're
already in bad paradigm unless you have a RTOS/realtime kernel
running, but if you do just make sure the priority (nice, renice) of
the control process is lower (higher priority) than the server... and
no harm should be done. Worst case if the server does crap out for a
user, it just keeps trying until it gets the good response. I doubt
any small-time lab has to worry about this, and maybe even a medium
sized one would be fine too without another server (but likely those
companies/organization would have another better server, so it would
be easy to scale then).

On Mon, Mar 31, 2014 at 9:32 AM, Tom Hodder <t...@limepepper.co.uk> wrote:
On 31 March 2014 16:58, Nathan McCorkle <nmz...@gmail.com> wrote:

What about dynDNS for getting past the IP issue?


I think that solutions that put the pi on the internet as a web server are
just kicking down the road, the can containing the issue of scaling.

Which is basically that for these nice graphs, to get real time updates,
your going to be running a bunch of XMLHTTPRequest() to pull data into a
AJAX/jQuery or other nice visualization running in the browser. And these
are all going to be served by the pi. If you have 10 users watching some
experiment in progress, and then they would all be polling the pi
continuously. Eventually this is going to compromise the pi's ability as a
controller/sensor.

For scaling, it would be better just to have the pi batch a bunch of data,
say every 10 seconds, and post it to a dedicated server, with decent
resources, which can scale to dishing out lots of updates to web browsers.
Load might bring down the web server, say an AWS virtual, or
https://www.pythonanywhere.com/, but the Pi would go on oblivious.

(and you would definitely not lose ssh access to the pi, during a critical
experiment etc, the important thing that would result in you having to get
out of bed ;-)

Cheers,
Tom











--
-- You received this message because you are subscribed to the Google Groups
DIYbio group. To post to this group, send email to diy...@googlegroups.com.
To unsubscribe from this group, send email to
diybio+un...@googlegroups.com. For more options, visit this group at
https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups
"DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to diybio+un...@googlegroups.com.
To post to this group, send email to diy...@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.
To view this discussion on the web visit
https://groups.google.com/d/msgid/diybio/CAB%2BzPJAvpkXqVae9zMdq%2BsYDvgaRqXZou-3y4dOLa-dQ2Byr_Q%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

--
-- You received this message because you are subscribed to the Google Groups DIYbio group. To post to this group, send email to diy...@googlegroups.com. To unsubscribe from this group, send email to diybio+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diybio+un...@googlegroups.com.
To post to this group, send email to diy...@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.
To view this discussion on the web visit https://groups.google.com/d/msgid/diybio/1159c3ea-7e68-4cbf-b355-8f26c0fc3305%40email.android.com.

For more options, visit https://groups.google.com/d/optout.

--
-- 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 https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diybio+unsubscribe@googlegroups.com.

To post to this group, send email to diybio@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.
To view this discussion on the web visit https://groups.google.com/d/msgid/diybio/75b1f685-4e00-4482-a842-283f451e5617%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
-- 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 https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to a topic in the Google Groups "DIYbio" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/diybio/dBk7Z36M0UE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to diybio+unsubscribe@googlegroups.com.
To post to this group, send email to diybio@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.
To view this discussion on the web visit https://groups.google.com/d/msgid/diybio/CA%2B82U9L0r9seOkNiRQtyNm0xD2p2zid-eR77_rbiEQdE%3DOJ%3D6Q%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
-- 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 https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diybio+unsubscribe@googlegroups.com.
To post to this group, send email to diybio@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.
To view this discussion on the web visit https://groups.google.com/d/msgid/diybio/CAEUkM4uiSWhnBxBjWtSA7DwXdD6b_o2sgqJErQoouuuiN_JOcQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Post a Comment