mpaterson
Posts: 13
Joined: Mon Nov 17, 2014 7:19 pm

Controlling terminal commands with a GUI

Wed Dec 17, 2014 9:26 am

We're using the bright pi https://www.pi-supply.com/product/brigh ... pberry-pi/ to provide lighting controlled from our Raspberry pi B+. It's up and running but a pain to use having to enter the full LXterminal commands every time you want to do anything.

Is there anyway of assigning keystrokes to execute these commands or even better get them linked to a GUI using Python somehow?

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Controlling terminal commands with a GUI

Wed Dec 17, 2014 9:29 am

https://www.pi-supply.com/bright-pi-v1-0-code-examples/ gives a bunch of commands you can use in a shell script. It's trivial to convert those to a python program.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

mpaterson
Posts: 13
Joined: Mon Nov 17, 2014 7:19 pm

Re: Controlling terminal commands with a GUI

Wed Dec 17, 2014 12:33 pm

We've succesfully used the commands in the LXterminal , how would we convert them to a python program?

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Controlling terminal commands with a GUI

Wed Dec 17, 2014 12:57 pm

Search for RPi.GPIO or pigpio or WiringPi there are about a million hits for those three combined.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

DirkS
Posts: 10362
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Controlling terminal commands with a GUI

Wed Dec 17, 2014 1:23 pm

DougieLawson wrote:Search for RPi.GPIO or pigpio or WiringPi there are about a million hits for those three combined.
rpi.gpio does not support i2c (https://pypi.python.org/pypi/RPi.GPIO)
pigpio does: http://abyz.co.uk/rpi/pigpio/python.html

User avatar
JRV
Posts: 270
Joined: Mon Apr 02, 2012 1:39 pm
Location: Minneapolis, MN

Re: Controlling terminal commands with a GUI

Wed Dec 17, 2014 1:28 pm

This bash script I wrote creates a GUI menu for GCC. It can easily be modified to perform other functions.

http://www.instructables.com/id/Simple- ... -Compiler/

Return to “Beginners”