Difference between revisions of "School of Science and Technology, United States International University (USIU)"

From Raspberry Pi Min-Grant project
Jump to: navigation, search
 
(23 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
 
== About USIU ==
 
== About USIU ==
 +
 +
[[File:Usiu logo.png|RTENOTITLE]]
  
 
USIU-A is a private, independent, non-profit university located on 120 acres of land in the Kasarani District of County of Nairobi. The University’s mission includes a strong commitment to providing students an education with a global understanding and multicultural perspective through its formal curricula and the experiences of studying, working, and living cooperatively in a racially, ethnically and culturally diverse environment. The proposed Raspberry-Pi project will be aligned with the University’s current strategic plan. An aspect of one of the strategic goals in the current Strategic Plan is concerned with program and course curriculum development where USIU plans to broaden and deepen its programs. The proposed project will be made consistent with the institution’s mission i.e.to promote the discovery and application of knowledge, acquisition of skills, and development of intellect and character in a manner that prepares students to contribute effectively and ethically as citizens of a changing and increasingly technological world through the Mission outcomes of '''Higher Order Thinking''', '''Literacy''', '''Global Understanding''' and '''Multicultural Perspective''', '''Preparedness for Career''', '''Community Service''', '''Leadership and ethics'''. Furthermore, the mission is carried out in an environment which encourages intellectual and scholarly development; fosters openness to a wide range of ideas, cultures, and people; and enhances personal growth.
 
USIU-A is a private, independent, non-profit university located on 120 acres of land in the Kasarani District of County of Nairobi. The University’s mission includes a strong commitment to providing students an education with a global understanding and multicultural perspective through its formal curricula and the experiences of studying, working, and living cooperatively in a racially, ethnically and culturally diverse environment. The proposed Raspberry-Pi project will be aligned with the University’s current strategic plan. An aspect of one of the strategic goals in the current Strategic Plan is concerned with program and course curriculum development where USIU plans to broaden and deepen its programs. The proposed project will be made consistent with the institution’s mission i.e.to promote the discovery and application of knowledge, acquisition of skills, and development of intellect and character in a manner that prepares students to contribute effectively and ethically as citizens of a changing and increasingly technological world through the Mission outcomes of '''Higher Order Thinking''', '''Literacy''', '''Global Understanding''' and '''Multicultural Perspective''', '''Preparedness for Career''', '''Community Service''', '''Leadership and ethics'''. Furthermore, the mission is carried out in an environment which encourages intellectual and scholarly development; fosters openness to a wide range of ideas, cultures, and people; and enhances personal growth.
  
 
== Launching the Raspberry Pi at USIU ==
 
== Launching the Raspberry Pi at USIU ==
 +
 +
[[File:RpiIntro1.png|RTENOTITLE]]  [[File:RpiIntro2.png|RTENOTITLE]]
  
 
=== Background ===
 
=== Background ===
Line 49: Line 53:
 
== Personnel ==
 
== Personnel ==
  
Professor Sylvester Namuye - Lead
+
Professor Sylvester Namuye
  
 
Dr. Paul Okanda
 
Dr. Paul Okanda
Line 97: Line 101:
 
Towards the end of the semester, apart from the structured experiments that the students will carry out in the lab, the students will be expected to come up with innovative and real-life projects that they will demonstrate to their peers in a presentation session for value addition
 
Towards the end of the semester, apart from the structured experiments that the students will carry out in the lab, the students will be expected to come up with innovative and real-life projects that they will demonstrate to their peers in a presentation session for value addition
  
== [[Digital_Electronics_(USIU)|Digital Electronics]] ==
+
== [[Exploring The Raspberry Pi (USIU)|Exploring The Raspberry Pi]] ==
 
+
<div>Pre-Lab Exercise 1: Installing OS on Raspberry PI<br/></div><div>Pre-Lab Exercise 2: Connecting Pi to the Internet<br/></div><div>Pre-Lab Exercise 3: Installing Applications on PI And Updating System<br/></div>
=== Study of Logic Gates – AND, OR, NOT, NAND, NOR, XOR ===
+
== [[Digital Electronics (USIU)|Digital Electronics]] ==
 
+
<div>In-Lab Exercise 1: Realizing a AND gate<br/></div><div>In-Lab Exercise 2: Realizing a OR gate</div><div>In-Lab Exercise 3: Realizing a NOT gate<br/></div>
LABORATORY 1
+
= [[Projects (USIU)|Projects]] =
 
+
<div>Pi Cluster (Course: APT4030: Parallel Computing)<br/></div><div>LED Matrix Display<br/></div><div>Control RGB LEDs with RPI<br/></div>
===== EXPLORING RASPBERRY PI =====
 
 
 
====== &nbsp;Pre-Lab Exercise 1:&nbsp; Installing OS on Raspberry PI ======
 
 
 
The RPI will not boot up without an SD Card that is properly formatted to contain a suitable boot loader and operating system.
 
 
 
The distribution we have chosen to run in this lab and subsequent labs is called Raspbian.
 
 
 
We will use NOOBS operating system installer to install Raspbian
 
 
 
#Using a computer with an SD card reader, visit the&nbsp;raspberry pi official downloads&nbsp;page.
 
 
 
[[File:Noobs1.png|RTENOTITLE]]
 
 
 
[https://www.raspberrypi.org/downloads/ https://www.raspberrypi.org/downloads/]
 
 
 
#Click on the <code>download ZIP</code> button under ‘NOOBS (offline and network install)’, and select a folder to save it to.
 
#Extract the files from the zip.
 
#Click on the <code>download ZIP</code> button under ‘NOOBS (offline and network install)’, and select a folder to save it to.
 
#Extract the files from the zip.
 
 
 
====== Preparing SD card on Linux/Windows Platforms ======
 
<ol style="list-style-type:upper-alpha;">
 
<li>'''Preparing SD card on Linux/Windows Platforms'''</li>
 
</ol>
 
 
 
On windows format your SD card before copying the NOOBS files onto it.
 
 
 
#You will need a 4GB or larger card. You will need a 4GB or larger card. NOOBS holds the various distros and support files for the “recovery” process. Basically, the installer lives on the card
 
#Go to the SD Association’s website&nbsp;and download SD Formatter 4.0 for Windows<br/>([https://www.sdcard.org/downloads/formatter_4/ https://www.sdcard.org/downloads/formatter_4/])
 
#Follow the instructions to install the software.
 
#Insert your SD card into the computer or SD card reader and make a note of the drive letter allocated to it.
 
#In SD Formatter software, select the drive letter for your SD card and format it.
 
 
 
'''Copy and Paste the NOOBS files'''
 
 
 
#Once your SD card has been formatted, copy all the files in the extracted NOOBS folder and paste them onto the SD card drive.
 
#When this process has finished, safely remove the SD card and insert it into your Raspberry Pi.
 
 
 
&nbsp;
 
<ol style="list-style-type:upper-alpha;">
 
<li>'''&nbsp;Format the SD card on the Linux Platform'''</li>
 
</ol>
 
 
 
'''On linux the following assumes you have root/administrator privileges'''
 
 
 
#First we need to download the ISO from the downloads page<br/>([https://www.raspberrypi.org/downloads/ https://www.raspberrypi.org/downloads/])<br/>Select an OS either Raspbian, UBUNTU mate or Snappy UBUNTU core
 
#Find the device, assuming your system is different to mine. The easiest way is to run the following:
 
 
 
'''''#fdisk -l'''''
 
 
 
(This command lists all the mounted and unmounted devices on your computer.)
 
 
 
#Once you have identified your device and the partition enter the following command that will format the SDcard
 
 
 
'''''#dd if=/downloads/raspbian.img of/=sdb bs=512 conv=noerror,sync'''''
 
 
 
#When this process has finished, safely remove the SD card and insert it into your Raspberry Pi and boot it.
 
 
 
====== Installing OS ======
 
 
 
'''Noobs installer First boot'''
 
 
 
#Plug in your keyboard, mouse and monitor cables.
 
#Now plug in the USB power cable to your Pi.
 
#Your Raspberry Pi will boot, and a window will appear with a list of different operating systems that you can install. We recommend that you use Raspbian – tick the box next to Raspbian and click on <code>Install</code>.
 
 
 
[[File:Noobsinstall2.png|RTENOTITLE]]
 
 
 
#Raspbian will then run through its installation process. Note this can take a while.
 
#When the install process has completed, the Raspberry Pi configuration menu (raspi-config) will load. Here you are able to set the time and date for your region and enable a Raspberry Pi camera board, or even create users. You can exit this menu by using Tab on your keyboard to move to <code>Finish</code>.
 
 
 
'''<u>Logging in with Default username and password</u>'''
 
 
 
The OS will boot to command line where you will need to enter the default username and password
 
 
 
*The default login for Raspbian OS<br/>Username: <code>pi</code> with the<br/>Password: <code>raspberry</code>
 
 
 
'''<u>Loading the graphical user interface</u>'''
 
 
 
To load the graphical user interface type<br/>'''''#'''''<code>'''''startx'''''</code>
 
 
 
&nbsp;
 
 
 
====== Pre-Lab Exercise 2:Connecting Pi to the Internet ======
 
 
 
#WiFi Configuration
 
#Using the command line
 
##LAN Configuration
 
###DHCP Configuration
 
###Static configuration
 
 
 
====== Pre-Lab Exercise 3:&nbsp; Installing Applications on PI ======
 
 
 
#– Updating System
 
##Installing the Python Package Manager(PIP)
 
##Installing GPIO Library
 
#In-Lab Exercises
 
##In-Lab Exercise 1: Realizing a AND gate
 
###Wire up the circuit
 
###&nbsp;&nbsp;Edit the Program
 
##In-Lab Exercise 2: Realizing a OR gate
 
##In-Lab Exercise 3: Realizing a NOT gate
 
 
 
= Projects =
 
 
 
#
 
 
 
== Pi Cluster (Course: APT4030: Parallel Computing) ==
 
 
 
#<br/><span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">In this project, we will build a cluster of identical raspberry pi nodes, networked together<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">and running parallel processing software that allows each node in the cluster to share<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">data and computation.</span></span></span><br/>-interchange-newline"> <!--EndFragmen--><span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Objective(s):<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Building a cluster computer powered by raspberry Pi that could be used to develop and<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">run parallel and distributed programs. In doing so, the following goals could be achieved.<br/><span style="font-family: Symbol; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal"> <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Practical understanding of building parallel systems.<br/><span style="font-family: Symbol; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal"> <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Experiment with diffrent confiurations to achieve better performance.<br/><span style="font-family: Symbol; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal"> <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Familiarity with MPI (Message Passing Interface) API for parallel programming.<br/><span style="font-family: Symbol; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal"> <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Familiarity with raspberry pi micro computers useful for rapid hardware<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">prototyping.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Building the system:<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Components:<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Computer hardware –<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Raspberry Pi Model B, 33 nodes<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Storage – SD cards, 8 G x 33<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Ethernet cables<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Power supply<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Rack ?<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Cooling ?<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Linux OS<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">There is an array of diffrent possibilities.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">MPI library<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">MPICH or OpenMPI? Or others?<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Ethernet switch and Router<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">A switch that we can use without interruption during the lab works.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Implementation:<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Ideally the project will be implemented in stages, starting with confiuring the fist two<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">nodes and then scaling to add all other additional nodes.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Resources:<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">There are many resources that we will use including<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Raspberry Pi Foundation <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,128); font-style:normal; font-variant:normal">https://www.raspberrypi.org/<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Prof Simon Cox, Making a Raspberry pi super computer, University of Southampton<br/><span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,128); font-style:normal; font-variant:normal">http://coen.boisestate.edu/ece/raspberry-pi/<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Confiuring the nodes, step by step guide<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">First, confiure the fist node<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">When this is done, its easier to clone as many nodes as wanted.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">1. Get the OS image<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">raspberrypi.org/download<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Aftre many false starts, I was content to just use Rasbian Weezy 5.5<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">2. Get image into a the sdcard<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">On window: ?<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">On Linux:<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">dd if=/media/yourMachine/Images/2015-05-05-raspbian-wheezy.img of=/dev/sdb<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">bs=512 conv=noerror,sync<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Its possible to use other tools than dd, you can get instructions at raspberrypi.org<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">3. Boot the Pi<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Great suspense it anything did not go as planned.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">If there is an error with the card or any other thing, nothing will show up on the<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">screen, if the Pi is overwhelmed it will take forever to boot. Rasbian is ideal<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">because it has been tested and has a descent fist boot time.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">4. Confis on fist boot<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">These confiurations can be done later with raspi-confi or ideally done on the fist<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">boot.<br/><span style="font-family: OpenSymbol; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">• <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Expand image to fil card<br/><span style="font-family: OpenSymbol; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">• <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Change the password<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">laxmi<br/><span style="font-family: OpenSymbol; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">• <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Change hostname (node1 or nodex)<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">5. Re boot<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">user: pi (has root priviledges)<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">password: laxmi<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Refresh update repo packages and update the softwares<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">sudo apt-get update && sudo apt-get upgrade -y<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Choose your poison: I prefer having my emacs<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">sudo apt-get install emacs<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">(:( you only get version 23, will have to compile to use version 24)<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">6. Refresh and update the softwares, if not done yet.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">sudo apt-get update && sudo apt-get upgrade -y<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">7. Get Fortran, (strange but we need it)<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">sudo apt-get install gfortran<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">8. Before getting Argonne MPICH<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Resource: <span style="font-family: OpenSans-Light; font-size:12pt; color:rgb(0,0,128); font-style:normal; font-variant:normal">http://www.mpich.org/documentation/guides/<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">The have great resources not just the the MPICH library<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ mkdir /home/pi/mpich3<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ cd ~/mpich3<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">9. Get MPICH sources from Argonne<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ wget http://www.mpich.org/static/downloads/3.1.4/mpich-3.1.4.tar.gz<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Resource: http://www.mpich.org/downloads – Get latest stable<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">10. Unpack them.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ tar xfz mpichXXX.tar.gz<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">11. Planning a clean place for install<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ sudo mkdir /home/rpimpi/<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ sudo mkdir /home/rpimpi/mpich3-install<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">12. Make a build directory, and go to the build<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ mkdir /home/pi/mpich_build<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ cd /home/pi/mpich_build<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">13. Confiure the build<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">This will take a while, you can get the cards ready, you can play while the<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">confiurations takes place.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ sudo /home/pi/mpich3/mpichXXX/confiure -prefi=/home/rpimpi/mpich3-<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">install<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">14. Make<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">What ever it took the last, you can +1<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ sudo make<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">15. Install the fies<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">It can take a bit of time, but not any way close to the last two stages.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ sudo make install<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">16. Add the place that you put the install to your PATH<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ export PATH=$PATH:/home/rpimpi/mpich3-install/bin<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">17. Or Note to permanently put this on the PATH you will need to edit .profie<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$emacs ~/.profie<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">and add lines below:<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal"># Add MPI to path (This is just a comment for later)<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">PATH="$PATH:/home/rpimpi/mpich3-install/bin"<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">18. Verify if the install were succesful<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ which mpicc<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">/home/rpimpi/mpich3-install/mpicc<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ which mpiexec<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">19. Go /home and set a place for your fist test<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ cd ~<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ mkdir mpi_fist_test<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ cd mpi_fist_test<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">20. Now testing MPI on single node<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$mpiexec -f machinefie -n &lt;number&gt; hostname<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">where machinefie contains a list of IP addresses (in this case just one) for the<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">machines<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">21. How this supposed to be done<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">a) Get your IP address<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ ifconfi<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">b) Put this into a single fie called machinefie<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ emacs machinefie<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">c) Add this line:<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">192.168.1.161 [or the ip is … ]<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">22. Now test if the machinefie<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ mpiexec -f machinefie ~n 1 hostname<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Output should be:<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">node1 (`hostname`)<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">23. Little C code using MPI on Pi to calculate Pi<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Don't worry, we shall not write the c code our selves, but MPICH has some<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">example codes we can run.<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ cd /home/pi/mpi_fit_test<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ mpiexec -f machinefie -n 2 /home/pi/mpich3/examples/cpi<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Output is should be<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Process 0 of 2 is on raspberrypi<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Process 1 of 2 is on raspberrypi<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">pi is approximately 3.1415926544231318, Error is 0.0000000008333387<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">24. Celebrate!<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">This calls for a celebration! (Seriously!)<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">Order a bottle from Bourgogne and celebrate (and clone the node).<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">25. Shut down<span style="font-family: ; font-size:12pt; color:rgb(0,0,0); font-style:normal; font-variant:normal">$ sudo powerof</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br/>
 
 
 
== Control RGB LEDs with RPI ==
 

Latest revision as of 09:30, 27 August 2015

The Project Title - Leveraging Laboratory Experiments with Raspberry-Pi `Lab Mfukoni`

Abstract

A lot has been said about teaching with experiments set up with virtual Labs environment. While this is an effective way of demonstrating concepts, it is not very different from teaching a four-stroke combustion engine with only diagrams, or using emulators and simulators. It is very different from working with the real engine. The Raspberry-Pi is a single board computer almost the size of a credit card, having the capability of desktop or laptop computer functions. What is good about it is the portability, ability to make and break the experiments, which cannot be easily done with the desktop or laptop computers. As such it is suitable for computer applications kit, ranging from sensor environment, microcontroller environment, and programming environments. The United States International University-Africa (USIU-A) is proposing to adopt the Raspberry-Pi experimental environment with the objective of giving both the students and the lecturers the desktop power at a very low price. USIU-A intends to collaborate with University of Nairobi’s Institute of Computing and Informatics. It is expected that through well-designed experiments, 60 students will acquire hands-on experience for both in-lab and post-lab experiments on this first case. In the latter case, the students may continue with open-lab experiments or homework since they will be able to carry the kits to their homes on the concept of ‘Lab-Mfukoni’. USIU-A intends to use the Raspberry kits for both undergraduate and post graduate courses with target outcome of developing problem solving application and teaching modules for scalability.


About USIU

RTENOTITLE

USIU-A is a private, independent, non-profit university located on 120 acres of land in the Kasarani District of County of Nairobi. The University’s mission includes a strong commitment to providing students an education with a global understanding and multicultural perspective through its formal curricula and the experiences of studying, working, and living cooperatively in a racially, ethnically and culturally diverse environment. The proposed Raspberry-Pi project will be aligned with the University’s current strategic plan. An aspect of one of the strategic goals in the current Strategic Plan is concerned with program and course curriculum development where USIU plans to broaden and deepen its programs. The proposed project will be made consistent with the institution’s mission i.e.to promote the discovery and application of knowledge, acquisition of skills, and development of intellect and character in a manner that prepares students to contribute effectively and ethically as citizens of a changing and increasingly technological world through the Mission outcomes of Higher Order Thinking, Literacy, Global Understanding and Multicultural Perspective, Preparedness for Career, Community Service, Leadership and ethics. Furthermore, the mission is carried out in an environment which encourages intellectual and scholarly development; fosters openness to a wide range of ideas, cultures, and people; and enhances personal growth.

Launching the Raspberry Pi at USIU

RTENOTITLE  RTENOTITLE

Background

Technology can help fuel Africa's development, facilitate peace and secure the continent's future. With the rapid change in technology, innovation and the increase in number of users, we can solve our problems using technology. The problem is lack of equipped state of the art students’ computer laboratories where students can develop applications. Our universities have competent faculties who deliver in classroom but students’ great ideas are limited due to lack of modern equipment in practical laboratories. Where the equipment are available, they are either in small quantities or so basic that limits the applicability of creativity. It is against this background that USIU-A through SST developed a proposal to adopt the Raspberry-Pi experimental environment with the objective of giving both the students and the lecturers the desktop power at a very low price. The project is undertaken by USIU-A in collaboration with University of Nairobi’s Institute of Computing and Informatics. The Raspberry PI computers creates a platform ‘Lab Mfukoni’ where students can run their own laboratories and use their creativity to solve problems. The Raspberry-Pi is a single board computer almost the size of a credit card, having the capability of desktop or laptop computer functions. What is good about it is the portability, ability to make and break the experiments, which cannot be easily done with the desktop or laptop computers? As such, it is suitable for computer applications kit, ranging from sensor environment, microcontroller environment, and programming environments.

It is expected that through well-designed experiments, 60 students will acquire hands-on experience for both in-lab and post-lab experiments on this first case. In the latter case, the students may continue with open-lab experiments or homework since they will be able to carry the kits to their homes on the concept of ‘Lab-Mfukoni’. USIU-A intends to use the Raspberry kits for both undergraduate and post graduate courses with target outcome of developing problem solving application and teaching modules for scalability.

Objectives

The objectives of adopting Raspberry-Pi system for computer experiments are: To enable students to develop microcontroller applications in a more flexible and cost effect manner; To enable lecturers to be innovative in the design of experiments that interactively engage students; To train students on real-life development kits instead of emulators and simulators hitherto used at USIU. To create synergies between faculty and students based on experiential learning on mobile platforms

Course content

The material for this course will be designed in such a way that the Raspberry-Pi is used for teaching courses in Information Systems Technology (IST): Computer organisation and Programming; Applied Computer Technology courses (APT): Digital Electronics; MSc. IST: IT Infrastructure. The course components will be as follows: The Raspberry-Pi will enable installation of tools such as Very High Definition Language (VHDL) to demonstrate concepts of Hardware programming etc. The practical exercises are expected to cover at least 10 experiments in a semester of 14 weeks. These experiments will emphasize the following broad areas:

  • Interface designs
  • Developing simple applications
  • Sensor designs for sensing environmental parameters
  • Testing live applications such as tracking objects
  • Design of intelligent systems

Expected Results

The experimental environment with Raspberry-Pi should:

  • Equip students with knowledge and skills to explore the insides of a computer;
  • Students who have a strong desire for control devices to write control programs;
  • Fire students’ imagination and drive to innovate;
  • Patent and Pilot innovative projects that meet the computing standards;
  • Publish and present

Status of the project

The project has already been funded by Kenya Education Network (KENET) to the tune of around 1 m Kenya shillings. The kits have already been procured ready for rolling out of the programme. The labs are in the process of being prepared and the actual teaching using the kits will be in May 2015 at the beginning of the semester. On 18th March 2015 the programme was launched and attendants included the dean SST, and the faculty members in the school. During the launch students expressed enthusiasm and demonstrated the curiosity for learning by use of the kits. (See the photos taken during the launch of the kits

Personnel

Professor Sylvester Namuye

Dr. Paul Okanda

Dr. Gerald Chege

Max Musau

Paul Bombo

Courses

In the initial stages, the kits will be experimented within the following courses:

Computer Organization and Programming

Offered in the Information Systems Technology Programme (IST), this course outlines the fundamental way in which a computer works: starting with simple logic and progressing to a simple model of a microprocessor.

Digital Electronics

Offered in the Applied Computer Technology (APT) program, this course describes the basic integrated circuit building blocks from which digital circuits and systems are assembled. This unit is intended to help the students keep pace with the rapid advances made in the field of Digital Electronics. The course will be the first to experiment on using the RPi

Applied Computer Technology Project

This project course utilizes teams and/or individuals working from problem requirements and specifications to produce a solution. This requires exploration of suitable information technologies to produce a solution that improves the problem situation. Students/teams analyze, plan, and report on the project and implement a prototype.

IT Infrastructure (MSc.IT)

This course studies the evolution of computer architecture and the factors influencing the design of hardware and software elements of computer systems. Topics include: instruction set design; processor micro-architecture and pipelining; cache and virtual memory organizations; protection and sharing; I/O and interrupts; in-order and out-of-order super-scalar architectures; VLIW machines; vector supercomputers; multi-threaded architectures; symmetric multiprocessors; memory models and synchronization; embedded systems; and parallel computers.

Methodology and Work Plan

After receiving the funding and purchasing the Raspberry PI, a mixed mode of delivery will be used as follow:

  1. Discovery method; students will be free to play around with the kit in their areas of interest;
  2. The formal lecturing method in which the lecturer will present the concepts of the subject content.
  3. Laboratory work: As the Raspberry-Pi is geared to laboratory work, the students are expected to be prepared and prepare for the lab sessions. This will be done at a five-tier mode:
  1. Pre-Lab preparations: set up and monitored by Lecturers with the help of the Laboratory Technicians and Laboratory Technologist.
  2. In-Lab  sessions: supervised by Lecturer or Lab Technicians/Technologists/Research Associate
  3. Post-lab sessions: open lab sessions or  students own time at home
  4. Lab report writing: lecturers will provide guidance to the students with a view to ensuring reports capture the exercises and their application to solve real-world issues.
  5. Lab report evaluation: student projects will be judged on their potential impact in finding solutions to real-world problems and its applicability.
  6. Industrial visits: the industrial visits will be undertaken at the beginning, and middle of the project as an exposure to students where such applications have been developed and used.

Towards the end of the semester, apart from the structured experiments that the students will carry out in the lab, the students will be expected to come up with innovative and real-life projects that they will demonstrate to their peers in a presentation session for value addition

Exploring The Raspberry Pi

Pre-Lab Exercise 1: Installing OS on Raspberry PI
Pre-Lab Exercise 2: Connecting Pi to the Internet
Pre-Lab Exercise 3: Installing Applications on PI And Updating System

Digital Electronics

In-Lab Exercise 1: Realizing a AND gate
In-Lab Exercise 2: Realizing a OR gate
In-Lab Exercise 3: Realizing a NOT gate

Projects

Pi Cluster (Course: APT4030: Parallel Computing)
LED Matrix Display
Control RGB LEDs with RPI