Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Slide 1: The Raspberry Pi and how to bring it to life | ||||||||
Line: 339 to 339 | ||||||||
![]()
| ||||||||
Added: | ||||||||
> > | Remote Desktop (2)When running the remote desktop you are working on the Raspberry Pi with the screen, keyboard and mouse replaced by the devices on the PC. You have the same functionality as if the screen was connected to the Pi’s HDMI port and keyboard and mouse were connected to the USB ports on the Pi.
nfs the network file systemWith nfs you can mount part of the Pi’s file system tree onto your PC file system. This allows you access to the Pi’s files as if you were using a local disk. You cannot run any Rasberry Pi programs this way however. It is interesting if you cross-compile Pi programs on your PC, which will be immediately visible on the Pi.
ssh the secure shellIn the case of ssh you have a single terminal window that is connected to a shell on the Pi. The command is: Where piIPaddress can be the Pi’s IP address of hostname. If you specify the -X option you can run X-11 based programs where the X protocol is run over the ssh connection.
ssh session exampleHere you see a screen dump from the PC with a remote terminal that started an emacs session on the Pi.
| |||||||
scpTo copy a file from the PC to the Pi this would be the command: | ||||||||
Line: 408 to 464 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Slide 1: The Raspberry Pi and how to bring it to life | ||||||||
Changed: | ||||||||
< < | Lecture 5 | |||||||
> > | Lecture 6 | |||||||
A first glimpse | ||||||||
Line: 97 to 97 | ||||||||
Connection to bread board: The cobbler
| ||||||||
Changed: | ||||||||
< < | Other Rpi connections | |||||||
> > | Other RPI connections | |||||||
I2C is a serial bus often used in computer systems of for | ||||||||
Line: 108 to 108 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Line: 318 to 319 | ||||||||
Go through all the options of the program and see if they make sense to you. | ||||||||
Added: | ||||||||
> > | Accessing the RPI remotelyOf course we can use the interfaces on the Raspberry Pi to connect a screen, keyboard and mouse and use it in stand-alone mode but we can also make use of the PC resources and access it remotely There are several ways to access the RPI remotely:
The remote Desktop
scpTo copy a file from the PC to the Pi this would be the command: scp myfile.c uli@rpi-10:exercises/solutions/exercise_2 This will copy the file “myfile.c” into the sub-directory exercises/solutions/exercise_2 on my home directory on the Pi. Of course user uli must exist on raspberry10. Instead of specifying the machine name: rpi-10 you can also give its IP address.
Compiling C programs for the Raspberry PiJust like Linux on the PC, Linux on the Raspberry Pi uses the GNU C compiler gcc.
The front end:
However, the code generator is different since now we compile for the ARM processor and not the Intel processor used on the PC
Cross-Compilation for the PiAs explained in a previous lecture we can also compile C programs for the Raspberry Pi on the PC Linux system using a cross-compiler. The cross compiler we will use is named arm-linux-gnueabihf-gcc
and it is part of the tools It exists also as an Ubuntu package to be installed with apt. | |||||||
%SLIDESHOWEND% | ||||||||
Line: 337 to 407 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Slide 1: The Raspberry Pi and how to bring it to life | ||||||||
Line: 40 to 40 | ||||||||
Currently available OS | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
If this is not enough for your then search the WEB for more.
| ||||||||
Line: 63 to 63 | ||||||||
Around the CPU there are plenty of interfaces | ||||||||
Changed: | ||||||||
< < | To know the details (the interfaces only!) have a look at the data sheet explaining them (205 pages!) | |||||||
> > | To know the details (the interfaces only!) have a look
at the data sheet explaining them (205 pages!) | |||||||
BCM2835 peripherals | ||||||||
Changed: | ||||||||
< < | Here are some of the Raspberry Pi peripherals: | |||||||
> > | Here are some of the Raspberry Pi peripherals: | |||||||
| ||||||||
Line: 84 to 86 | ||||||||
Raspberry Pi and the real world
You can easily connect | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 102 to 104 | ||||||||
short distance interfacing. Many devices having a I2C port
are available and we will program a few: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
More interfacesThere are more interfaces which we will not necessarily use during the course. Students who think that they do not learn enough during this course are invited to come forward.
We can easily give you more exercises, e.g to make
What you need to bring a RPI to life
This is what you will need to bring a Raspberry Pi to life:
keyboard and mouse with your laptop or other computer and access the Pi through a remote desktop.
The softwareGo to the Raspberry Pi download page and download the
Raspbian image. It comes in 2 versions
$HOME/Downloads directory. Since at Internet speeds that we experience at UCC this takes more than 1 hour to download we will distribute the zip file to all the PCs
How to extract the file system on Ubuntu?Once downloaded we must first unzip the file: Create a folder /opt/ucc/micros/raspberry and copy the zip file into it cd /opt/ucc/micros/raspberry cp ~/Downloads/2017-09-07-raspbian-stretch.zip . unzip 2017-09-07-raspbian-stretch.zip which will give you 2017-09-07-raspbian-stretch.img This is the file system image which will be copied to the SD card bit by bit using the dd command
Structure of the image fileCan we know what is inside this image?
We see that there are 2 disk partitions:
Looking inside the partitionsThis is something only root (the superuser) can do We loop mount the file system:
Now we can copy the contents to whatever directory we want This is the boot partition Then we can do the same thing for the root partition
The root partitionOnce we mount the second partition the same way we see that it contains:
something we have seen before on our Ubuntu PC The boot partition we have seen before is mounted on /boot in this partition
How to get the OS onto the Raspberry Pi?Now we have the OS on the PC where it does not help us much! We must put it onto a media that can be read by the Rpi. Traditionally this was the micro SD card but you can also use certain types of USB memory sticks (Be careful, not all sticks will work! I use a SanDisk cruzer)
Copying the OS to the SD cardIf your PC has an SD card reader then you put the micro SD card into a normal SD card holder. Otherwise there are microSD to USB converters First check which disks you have on you system:
Then you plug in your microSD adapter or your USB adapter and do the same thing again You should see 2 additional partitions, in my case probably /dev/sdc /dev/sdc1 /dev/sdc2
Copy the OSNow we are ready to copy the operating system to the SD card (or USB stick)
This may well take several minutes (the image is some 1.6 Gbytes!)
To see the progress:
The moment of truthSafely remove the SD card from your system (unmount if mounted!) Put it into the SD card slot of the Pi Power on th machine With a little bit of luck, it should boot
For more details of installing Raspbian on the SD card using a Linux system see
First loginRaspbian has a default user named
adduser uli and follow the instructions on the screen usermod -a -G sudo uli Then login with this new login name and upgrade the system to the latest revision of all programs: sudo apt update sudo apt upgrade or sudo apt dist-upgrade | |||||||
| ||||||||
Added: | ||||||||
> > | Adding software packagesOnce you have come this far you may want to add additional software packages, emacs being one of them You will continue adding packages as you use the system and you will see what is missing.
Configuring the systemWe have seen that the system image takes 1.6 Gbytes our SD card however provides 32 Gbytes. How to use it to its full capacity? Start raspi-config (which is a program dedicated to the Raspberry and does not exists und PC Ubuntu)
Go through all the options of the program and see if they make sense to you. | |||||||
%SLIDESHOWEND% | ||||||||
Line: 120 to 328 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Slide 1: The Raspberry Pi and how to bring it to life | |||||||||||||||||
Added: | |||||||||||||||||
> > | Lecture 5
A first glimpse
There are several versions of Raspberry Pis available on the market:
Raspberry Pi specs
Operating systems on the Pi
From the specs we can see that the Raspberry Pi 3 is a full blown computer.
a full particle accelerator and it is also much more powerful than the computer system that allowed the moon landing! This allows a great deal of flexibility when it comes to operating systems to be installed on the machine
Currently available OS
BCM2835 CPUThe CPU has got an ARM processor core with 4 64 bit CPUs The operating system and the Linux kernel are still 32 bit versions (After the course you may try to compile and install a 64 bit kernel yourself. This is a very good exercise to understand how the OS is built!) Around the CPU there are plenty of interfaces To know the details (the interfaces only!) have a look at the data sheet explaining them (205 pages!)
BCM2835 peripheralsHere are some of the Raspberry Pi peripherals:
Raspberry Pi and the real world
You can easily connect
Connection to bread board: The cobbler
Other Rpi connectionsI2C is a serial bus often used in computer systems of for short distance interfacing. Many devices having a I2C port
are available and we will program a few:
| ||||||||||||||||
%SLIDESHOWEND% | |||||||||||||||||
Line: 10 to 117 | |||||||||||||||||
Comments
| |||||||||||||||||
Added: | |||||||||||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
Slide 1: The Raspberry Pi and how to bring it to life
Comments
|