1

This is my first post here so HELLO and sorry if I'm posting in the wrong place.

Do you know a simple bit of Python that will set a LED blinking indefinitely until it's told to stop? Control will be carried out by another program so that the command ctrl + C is not useful.

Many thanks

  • Hi There and welcome to Raspberry Stack Exchange. Please try and ask specific questions that relate to the Pi. On this site you will find questions about WiringPi. Have you tired that? Try and search for that and if you run into another problem, please return and ask a specific question about it and what you have tried. raspberrypi.stackexchange.com/search?q=wiringpi – Piotr Kula Feb 9 '16 at 21:47
  • How will the Python script be told to stop? – joan Feb 9 '16 at 22:00
  • As @joan says, what tells it to stop? Recognising CTRL-C is a good thing to do - it means handling - at least on *nix systems - the reception of SIGTERM signals. Although that key-combo is one way to send that signal to a program in the foreground other ways also exist; e.g. with a plain kill <pid> sent by you as owner of that program running in the background or by the system at shutdown. In the latter case each running program gets a SIGTERM to "please close down cleanly NOW" - before it gets a SIGKILL that terminates it with extreme prejudice if it ignores the first request! – SlySven Feb 9 '16 at 22:18
  • But how to do that by giving the command in cron stop and start the process? – sliver001 Feb 10 '16 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.