Skip to content
Parallax Learn (Stage)

Parallax Learn (Stage)

This is the staging site. Please see https://learn.parallax.com for the official site.

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence Tutorial Series
          • Cybersecurity: Radio Data tutorialCybersecurity Tutorial Series
          • cyber:bot Tutorial Series
          • Boe-Bot Tutorial SeriesBoe-Bot Tutorial Series
          • Arduino Shield-Bot Tutorial Series
          • ActivityBot with C TutorialsActivityBot with C Tutorials
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot with BlocklyProp Tutorial Series
          • Scribbler 3 Tutorial SeriesScribbler 3 Tutorial Series
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education Tutorial Series
          • Propeller C-Language BasicsPropeller C Basics and Projects
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit C Tutorial Series
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit BlocklyProp Tutorials
          • Badge WX Tutorial SeriesBadge WX Tutorial Series
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics and Projects
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Propeller C – Start Simple

Propeller C – Start Simple

Simple Hello Message

This C program will make the Propeller microcontroller send a “Hello!!!” message to the SimpleIDE Terminal on your computer.

  • Click the Open Project button.
  • Navigate to My Documents -> SimpleIDE -> Learn -> Examples -> C Intro -> Basics.
  • Select Hello Message, and click Open.

When  SimpleIDE opens the project, it will open Hello Message.c into its text editor pane.

  • Click the Com Port dropdown on the right and select the com port your board is connected to.  If in doubt, disconnect/reconnect the board and click it again to see which one disappeared/reappeared.
  • Set the power switch to position 1 (if applicable for your board).
  • Click the Run with Terminal button.

A single “Hello!!!” message should appear in the Simple IDE Terminal.

 

How Hello Message.c Works

The print(“Hello!!!”) makes the Propeller chip send its message to your computer through its programming port.  The SimpleIDE terminal displays the message on your computer screen. 

The print(“Hello!!!”) is followed by a semicolon ;.  The semicolon is what tells the PropGCC compiler that it has reached the end of an instruction statement. 

The print statement is inside curly braces {} below main(), and so we call it part of the main function’s code block.  A C program always starts with the first statement in the main function.

Print is also a function, but it is stored in other files called library files.  Later on, you’ll get to search for libraries that contain useful functions to add to your own projects.  For now, just keep in mind that your program needs #include “simpletools.h” because it has information about print, and many other useful functions. 

 

Try This

The program has one statement: print(“Hello!!!”);.  Let’s save this project under a new name, and add a second print statement.

  • Click the Save Project As button.

  • Browse to My Documents\SimpleIDE\My Projects.
  • Type Hello Again into the File name field.
  • Click the Save button.

  • Modify the main function so that it looks like this:

  • Click the Run with Terminal button, and observe the output.
  • What effect does the \n have?  Delete \n, then run the program a third time.
     

Saving Programs
SimpleIDE saves your program each time it compiles.  As you progress through these tutorials you will notice that we ask you to save a new copy of any program you’ll be modifying to prevent you from overwriting the original project with one you have changed.


Did You Know?

C is case-sensitive — You have to use the correct capitalization when programming in C.    If you make an error, such as typing Print for example, SimpleIDE will let you know:

newline — \n is called the newline character, and it is an example of a control character used for positioning a cursor in a serial terminal. 

int (main) — the int in int main() is part of the C compiler’s programming convention. It is used no matter what you include inside the main function’s code block. You will learn more about how int is used in other ways as you go through the tutorials.


 

Your Turn

Comments are notes about your code that help explain it to other people that have to work with it. Also, it is good to leave comments as notes to yourself about what you were doing in case you need a reminder days (or months or years) later. 

If you want to comment all or part of a single line, use two forward slashes //.  Everything to the right of // will be ignored by the C compiler.  Block comments can span multiple lines.  They start with /* and end with */, and everything in between will be ignored by the C compiler.

  • Click the Save As Project button again and save the project as Hello Again Commented.
  • Add the comments shown below.
  • Run it again to verify that the comments do not have any actual effect on the way your program runs.  (If your comment prevents the program from running, you may have a typing error!)


Printer-friendly version
Array Variables
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn (Stage) • Built with GeneratePress