Check out this example of how to run a script at startup:
https://github.com/adafruit/adafruit-beaglebone-io-python/blob/master/doc/run_config-pin_during_startup.md

On Sep 12, 2017 12:35 PM, "Tomas Medina" <to...@evatech.net> wrote:

> I am trying to write a program that reads the analog values of a sonar on
> the Beaglebone Black Wireless (Debian image 2017-07-01). The program runs
> fine if executed from the command line, but when I try to run it
> automatically at startup (using crontab), the program doesn't run at all
> (as indicated by a grep command). Here is the relevant code:
>
> from time import sleepimport Adafruit_BBIO.ADC as ADC
> ADC.setup()
> while True:
>     sonar = ADC.read(pin)
>     print sonar
>     sleep(.5)
>
> Any help in this matter would be greatly appreciated.
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/5caa2466-2fc0-44e3-a2a4-1ef707bac88d%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/5caa2466-2fc0-44e3-a2a4-1ef707bac88d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAEf4M_DVxJssFTAm7r1XsszN9S_AC7SA6Vo7_YXXMeGH4PTrhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to