Book Image

Learning BeagleBone

By : Hunyue Yau
Book Image

Learning BeagleBone

By: Hunyue Yau

Overview of this book

Table of Contents (18 chapters)
Learning BeagleBone
About the Author
About the Reviewers
Terms and Definitions

Hello, World for the BeagleBone

Hello, World is the classic first program. While it is very simple, it will go through running programs on the BeagleBone to familiarize ourselves with the process before diving fully into LED blinking. The goal of a Hello, World program is to print this message on the screen.

Exercise 1 – creating a Hello, World program

For this exercise, we will first log in to the BeagleBone and create a file containing the Hello, World program.

We will use shell as our programming language. All the following exercises in this and the next chapter will be in shell. This language was intentionally selected to make it easy to build your own software later on without it being overly complex. The exact version of the shell will vary depending on the distribution used. However, exercises should work on all known versions. A common version of the shell with many extensions, which we will not use in the exercises, is bash. Some distributions will use a simpler and smaller shell called...