I have an application written in c, on Raspberry Pi, which starts in a sort of "waiting mode" and uses two buttons connected to the GPIO as "start" and "stop".

I was thinking about controlling it with an Android phone, and I found out the PiUi project.
Would it be possible to send commands to an active applications using PiUi?
Or there is a better solution?

Thanks to everyone that will help.

  • 1
    What about a webpage? – Steve Robillard Dec 22 '15 at 15:16
  • A webpage would require that the Raspberry is connected to the Internet, wouldn't it? I prefer to be able to control it even without Internet – FMarazzi Dec 22 '15 at 15:21
  • 1
    It could be running on the Pi and only serve local clients on the same network – Steve Robillard Dec 22 '15 at 15:24

The PiUi interface is written and controlled in Python. This could be used to control your C program, but such interactivity won't happen magically. You will need to build some kind of listening interface into your C application. That could be done using message queues, shared memory, pipes, ports, or a number of other things.

It looks like PiUi is simply a framework for creating a local webpage. It may be simpler to just create one yourself as @SteveRobillard has suggested in the comments.

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.