Getting Started with Raspberry Pi: “Hello World” Programming on Raspberry Pi

The Raspberry pi is a microcontroller board which runs on a SoC chip from the Broadcom with ARM11 processor at the core. The Board is a mini computer itself without any input or output devices but ports provided to connect them. The board is designed with an intention of providing computer education to the remote schools where the PCs are not very commonly used. The board can be connected to a normal TV set using a RCA connector. It can be connected to an HD TV screen using the HDMI port provided in the board. The board can be connected with an Ethernet cable and access them remotely in TUI or GUI mode.

The operating systems like Archlinux ARM, OpenELEC, Pidora, Raspbmc, RISC OS and the Raspbian and also Ubuntu versions are available for the Raspberrypi board. The board after connected to a PC screen and keyboard directly or through remote login can be used as a normal computer and is a great for learning the basics of computer and the programming and development. This article discusses getting started with the C programming in the Raspberrypi.

Programming on Raspberry Pi

In this project the Raspberrypi board is booted with Ubuntu and is remotely accessed in GUI mode with a windows7 PC. Once starts accessing the Raspberrypi the host OS has little significance and one will be doing things in the Ubuntu OS most of the time using the Linux commands. There are number of software in the Linux which can simulate the command line (TUI) running inside the GUI. The Ubuntu installed in the Raspberrypi uses software called LXterminal and RootTerminal for simulating the command line.

The software can be selected and run from the applications button at the lower left corner of the Desktop as shown in the following image.

The user can select the LXTerminal or Root Terminal software and if the LXTerminal is selected the window will open up as shown in the following image:

The string that can be read from the window has the following meaning. The “root” is the current user login and the “raspberrypi” is the computer name. The “/” followed by the “:” represents the enire filesystem and is called the “root directory”. The “home” is the folder where all the user data can be found inside their respective folders.

Programming on Raspberry Pi code

The second slash represents the entire “home” folder and “pi” is the folder where the current user “pi”‘s data are stored. The string simply suggests that the user is there currently in the user folder named “pi”.

It is a better practice to keep all the programming trials inside a separate folder. A separate folder can be created using the ‘make directory’ command “mkdir”. The following command will create a new folder named raspberrypi_C.


For m0re detail: Getting Started with Raspberry Pi: “Hello World” Programming on Raspberry Pi

© 2015 Powered By Engineering Projects Team, Raspberry Pi Projects

Scroll to top