I would like to know if it is possible to run two different and unrelated python programs that access different parts of the Sense Hat. Specifically, I have one program that is a data logger and collects sensor readings on a periodic basis. I would like to run a separate python program that uses the LED matrix to display unrelated information coming from an external source.

Is this possible, or will there be a conflict when the second program initializes a SenseHat object?

  • 2
    Why have you not even tried it? – ElefantPhace May 23 '17 at 4:40
  • Someone here might know but, per previous comments, it would much faster to just try something. – goobering May 23 '17 at 9:10

As suggested in the comments above, I ran a simple test using two copies of the same data logging program and found that both programs are running fine side by side in the background. While I haven't tried the specific scenario posed in the question, the fact that two programs accessing the same set of sensors is not having problems, I suspect the originally posed scenario will also work equally well.

UPDATE: I also tested a scenario where two separate programs attempted to output text to the LEDs. Both programs executed "normally". However, you could see the competition between the two programs as the LEDs flickered between the two messages.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.