Thursday, August 16, 2012

Rasperry PI – Remote GUI console

You can remote connect to the rPI over the ethernet from another PC (windows even) with the full sceen GUI (instead of just a character cell terminal). Here's how.


Follow procedure here (stop at "Or you could create a script...")




Then install TightVNC viewer on your windows PC (or MAC ir *NIX box)





Then from the PC, run the TightVNC viewer and connect (use your IP here, the ":1" is important

192.168.2.72:1

You are in!
This thing continue to amaze me for a $35 computer!!!!

Have to try a web server next :-)

Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.





Raspberry PI - Remote character cell console


BTW, I am sitting at my regular laptop, using PUTTY to log into the rPI command line interface over the ethernet!!!!!!

To find the TCP/IP address of the rPI on your network (assuming you are using DHCP, most home networks are) on the rPI

  $ ifconfig

Buried in there is the rPI's address. 

Now on you PC, download and run

start it, and connect to the rPI address. You are remoted in.

By opening a port in your home firewall, you could log in from anywhere, BUT this would have security risks!

Have (more) fun!


 
Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.


Wednesday, August 15, 2012

Raspberry PI – Learning Python



As far as programming, try Python, it is probably the easiest to learn modern language -


http://en.wikipedia.org/wiki/Python_(programming_language)

It is the only language I know of (other than BASIC which I think is available on the rPI as well) where the main design criteria was ease of use. If you do learn it, IMHO you should start with version 3.


The "default" programming language is Python. The designer did some major cleanup after version 2, and changed a few things that make it not 100% forward compatible from 2-3. Here is a "cheat sheet" with the differences (the print statement is the one that impacts the beginning programmer the most, IMHO):

If you are learning Python, use Python 3 (IDLE3), not 2.X (but a lot of old code is still 2.X)

To learn Python:

http://www.swaroopch.org/notes/Python A Byte of Python - BEST place to start IMHO (use version 3 if starting)

http://docs.python.org/release/3.0.1/tutorial/ More detailed Python Tutorial

http://wiki.python.org/moin/Python2orPython3 Good description of why the differences in 3.X


http://www.python.org/ Official Website, tons of info

Also interesting to note that as well as Python 2 and 3 (IDLE IDEs) there are two "kid" oriented languages by default, scratch and squeak:






Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.


Raspberry PI – Learning LINUX



A reader commented: “The good and bad is that it uses Linux and various languages that look fairly cryptic to me.”

Yes, there is a bit of learning curve with Linux, but if you liked the old DOS command world, Linux is learnable. That is what I like about the rPI, there seems to be lots of support for it and if 100's of Ks of them get out there, there will be lots of howtos and examples.

You can read a lot about LINUX here (and in the links from there): http://en.wikipedia.org/wiki/LINUX

All LINUX versions (aka distributions or distro's) include at least a command line interface (like good old DOS) and some include a Graphical User Inerface or GUI - the rPI has both.

Most *nix commands are very short: ls, cat, cp, etc. because it started when an ASR-33 was the console of choice! Test - who are these guys:
     http://icedfire.mine.nu/unixthings/unix_port.jpg

All Linux configuration stuff is done via flat text files. With a GUI, there are sometimes tools to change the config setting with buttons, etc., but you can do anything on Linux from the command line. When DEC started doing popular OS's for schools, etc like OS-8, TOPS-10, RSTS, etc. the commands were made more human readable like copy, type, etc. Then Bill Gates (who learned to program on TOPS-10) just copied the DEC commands 1:1 with DOS.

When you get the rPI up at the command prompt "$", here are some things to try.

This command will display a refreshing screen with all the running processes (ctrl+C to get out)

  $ top

This command will display commands "apropos" to what you want to do

  $ apropos memory

This will display free memory

  $ free

If you want more detail on any command (enter to go one line down, space to go a page, q to quit)

  $ man free

If you want to edit a file

  $ nano file.txt

If you want to see the contents of a file

  $ cat file.txt

cat is short for Concatenate, the command can be use to Concatenate files, but with one argument just Concatenates a single file to standard output, which is the screen. Every command does a lot of things... it's the UNIX way

Note how you can string Linux commands together, you can even feed output of one to the next. For example

  $ ps -A | grep apache

The ps command will show all running processes with the -A switch The "|" pipes the output of the command to the grep pattern search, which searches the output for the pattern "apache" The result is that it will show you the process detail of all the web server processes A Process is just a program that is running in the background, with no I/O to a terminal.

   $ sudo (any command) 

gives the next command root privs, the "pi" user does not normally have the ability to accidentally or on purpose change system files. This is one of the things that makes Linux a lot more secure and safe than Windoze

Here is a tutorial of more commands:

http://www.embeddedheaven.com/online-linux-tutorial.htm

Ignore the part about "Starting an Xterminal session" in the intro, when you boot the rpi you are already at the command line.

I spent MANY hours working with UNIX (and other) systems at the command line, only it they used to cost $100's and filled a room. Now the rPI costs $25 and is the size of the credit card. I am amazed!


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.

Tuesday, August 14, 2012

Raspberry PI – First Boot

There are a LOT of different LINUX options

http://elinux.org/RPi_Distributions


I think that I will stick with Raspbain:

"... Raspbian the easiest to use, most stable and best performing Linux distribution available for the Raspberry Pi."


You can get Raspbian here: http://www.raspberrypi.org/downloads

I used the "Easy Way" here: http://elinux.org/RPi_Easy_SD_Card_Setup

The 1st time you do not beed a username and pwd, thereafter you can log in as

  Username: pi  
  Password: raspberry

When you 1st boot Raspbian, you can skip any of the config steps at this time (unless you have a large SD card, I think there is an option to expand it).
Then you need to change the KB from GB to US (or the key mapping is wrong). This did NOT work when I tried the condig option (above - maybe finger trouble)
Use the command

 $ sudo nano /etc/default/keyboard

and edit the GB to US, then ^X to exit and save. You need to reboot for this to become effective

You can reboot with

 $ sudo shutdown -r now

You can change the password at the command prompt with command

 $ passwd

You start the GUI with

 $ startx



Have Fun!


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.

Monday, August 13, 2012

Raspberry PI – Ordered and arrived

I went to the Newark site the other day to see if they had updated the date they would be available, and it said there were 4 IN STOCK. No kidding!

He who hesitates is lost, so I immediately ordered the 4 of them and they are now on the way by UPS (according to the email I got this AM).
BTW, the restock date is now showing as 30 Sep, 2012!

THEY ARRIVED - Have not had more than a few minutes to play with it, but it is easy to get going, and there are LOTs of possibilities.
For $35 it is the biggest bang for the buck I know of for a single board computer.


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.






Sunday, August 12, 2012

Raspeberry PI – Books

A reader passed this link on:


There are other books out there as well:



Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.