FinleysDad
Posts: 7
Joined: Wed Jun 06, 2012 9:33 am

Simple interfaces without xwindows

Tue Jun 12, 2012 10:21 am

Hi everyone...

I'm playing around with coding and stuff. The project i am trying to use my Pi for doesn't need to boot all the way into LXDE really..

So I thought a simple interface like shown in the image would do me fine...

In the old days of pascal with DOS this was easy can anyone suggestion what to use to create a screen like this with the RasPi please?
Attachments
install14.PNG
install14.PNG (20.41 KiB) Viewed 8288 times

bbb
Posts: 55
Joined: Sat Jun 02, 2012 9:52 am

Re: Simple interfaces without xwindows

Tue Jun 12, 2012 10:59 am

Ncurses should do the trick: http://en.wikipedia.org/wiki/Ncurses

something like 'apt-get libncurses-dev' should install the header files, you need to do 'apt-cache search ncurses' to find the actual package names. I have seen mention of python/ruby bindings too ...

FinleysDad
Posts: 7
Joined: Wed Jun 06, 2012 9:33 am

Re: Simple interfaces without xwindows

Tue Jun 12, 2012 1:19 pm

Thank you very much. That looks like it will do exactly what I want.

Should be a nice little challenge to learn it too. thanks again for your help

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 3894
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: Simple interfaces without xwindows

Tue Jun 12, 2012 6:17 pm

check out dialog & cdk (& ncurses) http://invisible-island.net/dialog/dialog.html

pbreneman
Posts: 19
Joined: Thu Jun 07, 2012 12:31 pm

Re: Simple interfaces without xwindows

Fri Jun 15, 2012 10:37 am

With Free Pascal you can do things similar to what you did with Turbo Pascal. I have a number of minimal distributions of Free Pascal that make it *very* easy to try things. See this new message:
http://www.raspberrypi.org/phpBB3/viewt ... 971#p93971

User avatar
gordon@drogon.net
Posts: 1970
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Simple interfaces without xwindows

Tue Jun 19, 2012 5:35 pm

If you want simple graphics, of the old style where you poke pixels into a framebuffer, then look at the SDL libraries. That's more or less what you get with SDL. There are point plotting and line drawing libraries, but sometimes you just want to poke pixels :)

My BASIC interpreter uses SDL extensively and runs well on the console. Great to do simple graphics, etc. in (fun too if you like that sort of thing!)

-Gordon
--
Gordons projects: https://projects.drogon.net/

geezbeez
Posts: 28
Joined: Mon Jul 02, 2012 9:19 pm

Re: Simple interfaces without xwindows

Fri Jul 13, 2012 10:10 pm

Try this for fun, on your PI

Code: Select all

cat >tryme.sh <<EOF
black='\033[30m'
red='\e[0;31m'
greenbg='\033[42m'
NC='\e[0m' # No Color
clear
tput cup 10 10
echo -e "${red}Raspberry ${greenbg}${black}PI${NC}"
tput cup 20 0
EOF
. ./tryme.sh
rm ./tryme.sh

geezbeez
Posts: 28
Joined: Mon Jul 02, 2012 9:19 pm

Re: Simple interfaces without xwindows

Sat Jul 14, 2012 8:29 pm

Also fun,

Code: Select all

 sudo apt-get install caca-utils
cacafire
P.S. Is anyone interested in this?

User avatar
mikerr
Posts: 2517
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Simple interfaces without xwindows

Sun Jul 15, 2012 9:04 pm

Haha - cacafire even worked well inside a remote ssh terminal (putty) !

Not sure I'll ever use it again though.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

geezbeez
Posts: 28
Joined: Mon Jul 02, 2012 9:19 pm

Re: Simple interfaces without xwindows

Sun Jul 15, 2012 9:25 pm

Haha - cacafire even worked well inside a remote ssh terminal (putty) !
That's the idea,
Supprisingly impressive over wifi ssh session using ConnectBot on an Andriod device. :P
Works whatever size you set the size of the terminal to on ConnectBot
There's not a great deal of point in cacafire in its self other than to demonstrate what can be done without XWindows/vnc both of which I think are a bit heavy for simple Raspberry projects.

Return to “Graphics programming”

Who is online

Users browsing this forum: No registered users and 1 guest