Ideas requested

1 view
Skip to first unread message

Alan Davis

unread,
Jun 16, 2022, 8:18:48 PM6/16/22
to berke...@googlegroups.com
Hello, BLUG folk:

I know I have not been around much.  Not because I don't enjoy both reading the chatter or the meetings, which I especially have enjoyed in the past.  I hope to attend in person at some point, perhaps in July/August when my family will be on vacation.  Jitsi has evaded me, the few times I've tried; and also, the hours and my situation are not helpful.

Ok, here's my question.  I have posted it to the Manjaro GNU/Linux Reddit... and immediately after doing so, it dawned on me that if anyone can answer this, it MIGHT be some of the tech savvy BLUG folk.  Here's my post.

Alan Davis

================ %< ==================

I need a script to turn off fans for a "short time"

My microscope camera is sensitive to the vibrations from the nearby CPU. Vibrations---even road vibrations from the Freeway nearby---can cause the image to be blurry. I can see them using a screen magnifier set to 7 to 20X, as dancing of the edges of the image.

I would like to be able to shut down the fans for a short time. I trigger the camera through the application Entangle, using a foot pedal. I know there's a way to integrate the needed functionality through probably a script, but I don't yet understand the workings of the various monitoring and control bits.

Is this possible? A couple of ideas:

  • Turn off when the camera is triggered (no good: too much lag)

  • Turn off the fans with the first stomp of the foot pedal, then take a snapshot with the succeeding few foot stomps, up to a maximum safe length of time.

This seems like a convoluted process, but it should be possible. Can anyone suggest a way to get started?

================= >% ==========================


--
 
      "As we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously."   ---Benjamin Franklin

      "This ignorance about the limits of the earth's ability to absorb
       pollutants should be reason enough for caution in the release
       of polluting substances."
                   ---Meadows et al.   1972.  Limits to Growth.      (p. 81)       

Michael Paoli

unread,
Jun 20, 2022, 9:37:39 PM6/20/22
to Alan Davis, berke...@googlegroups.com
> From: "Alan Davis" <alan3...@gmail.com>
> Subject: Ideas requested
> Date: Thu, 16 Jun 2022 17:17:53 -0700

First idea:
http://www.catb.org/~esr/faqs/smart-questions.html#bespecific
Sorry if it's an old repeat, but it's still highly relevant.
Subject of "Ideas wanted" in a sea of email, reads more like spam than not.
Whereas "script to turn off fans for a short time" - not so likely to
be presumed/guessed to be spam - at least in context of
Linux User Group or the like.

> Hello, BLUG folk:

BerkeleyLug.com, not BLUG - there's tons 'o BLUG out there, none of which
is BerkeleyLUG.

> I know I have not been around much. Not because I don't enjoy both reading
> the chatter or the meetings, which I especially have enjoyed in the past.
> I hope to attend in person at some point, perhaps in July/August when my
> family will be on vacation. Jitsi has evaded me, the few times I've tried;
> and also, the hours and my situation are not helpful.
>
> Ok, here's my question. I have posted it to the Manjaro GNU/Linux
> Reddit... and immediately after doing so, it dawned on me that if anyone
> can answer this, it MIGHT be some of the tech savvy BLUG folk. Here's my
> post.
>
> Alan Davis
>
> ================ %< ==================
> I need a script to turn off fans for a "short time"
> My microscope camera is sensitive to the vibrations from the nearby CPU.
> Vibrations---even road vibrations from the Freeway nearby---can cause the
> image to be blurry. I can see them using a screen magnifier set to 7 to
> 20X, as dancing of the edges of the image.
>
> I would like to be able to shut down the fans for a short time. I trigger
> the camera through the application Entangle, using a foot pedal. I know
> there's a way to integrate the needed functionality through probably a
> script, but I don't yet understand the workings of the various monitoring
> and control bits.
>
> Is this possible? A couple of ideas:
>
> -
>
> Turn off when the camera is triggered (no good: too much lag)
> -
>
> Turn off the fans with the first stomp of the foot pedal, then take a
> snapshot with the succeeding few foot stomps, up to a maximum safe length
> of time.
>
> This seems like a convoluted process, but it should be possible. Can anyone
> suggest a way to get started?

sh(1), sleep(1)

E.g., if we have fon for our fan on command and foof for our fan off command,
or just substitute accordingly:
foff; sleep _some_number_of_seconds_; fon
Can background the whole thing / run it asynchronously if desired, e.g.:
{ foff; sleep _some_number_of_seconds_; fon; } &
or in a script file, just launch it in background so you don't have to wait
for it to complete.

Michael Paoli

unread,
Jun 21, 2022, 10:32:09 AM6/21/22
to Alan Davis, BerkeleyLUG
> From: "Michael Paoli" <Michae...@cal.berkeley.edu>
> Subject: script to turn off fans for a "short time" Re: Ideas requested
> Date: Mon, 20 Jun 2022 18:37:37 -0700

>> From: "Alan Davis" <alan3...@gmail.com>
>> Date: Thu, 16 Jun 2022 17:17:53 -0700
>
>
>> Hello, BLUG folk:
>
> BerkeleyLug.com, not BLUG - there's tons 'o BLUG out there, none of which
> is BerkeleyLUG.

Oh, or perhaps you meant BALUG.org. In any case, not BLUG.
And no, not BAYLUG.org either.

So, in context, guessing you probably meant
BerkeleyLUG.com or perhaps BALUG.org
but in any case, not BLUG.
BerkeleyLUG.com also has a Pi SIG: Pi.BerkeleyLUG.com

Reply all
Reply to author
Forward
0 new messages