Page 146 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 146

Chapter 5: Quadcopter Propulsors           125



                        A Brief Introduction to the C Language

                             You should probably appreciate a simpler alternative to creating fast code after going
                             through the above assembly language discussion. Well, you are in luck, as Parallax has
                             recently made available a C language development environment for the Prop chip. The C
                             language has been around for many years, originating in 1969 thru 1973. It has evolved and
                             transformed to the point where it now supports many different types of computing platforms
                             ranging from high-end servers to the minimalist embedded microprocessor. The Prop C
                             development software is named SimpleIDE and is available free of charge from the Parallax
                             "learn" website http://learn.parallax.com/.
                                It is a fairly simple download-extract-and-install process. My only caution is that you
                             must be sure that the compiler, library, and workspace locations are properly identified. You
                             do this by clicking on Tools in the SimpleIDE menu bar and  then on the Properties selection.
                             A dialog box, as shown in Figure 5.29, will appear. You should see locations similar to the
                             one in this figure if you installed the IDE using the default settings.
                                I elected to load one of the example programs to test out my SimpleIDE installation.
                             Feeling somewhat confident, I loaded the program named Standard Servo Position.c that is
                             included in an Examples library that may be downloaded from the Parallax "learn" website.
                             My computer’s location for the directory holding this program was: c:/Program Files (x86)/
                             SimpleIDE/Workspace/Learn/Examples/Devices/Motor/Servo.
                                I included the above path only to indicate that it is relatively easy to lose track of where
                             all your project, source, library, and include files are located. Losing track of the location of
                             these files may easily be a source of great frustration when you start getting compile-time
                             errors that a given file could not be found. I suggest you follow all the good guidelines
                             provided in the Parallax "learn" website http://learn.parallax.com/ regarding how to setup
                             the SimpleIDE.
                                I guess I was a bit lucky in that it took only two attempts to successfully compile and
                             download the example servo-control program into the BOE. Figure 5.30 is a screenshot of the
                             SimpleIDE with the source code as well as most of the compiler and loader reports, which
                             are shown below the source code editor pane.
                                The example program is very simple in that it directs a standard Hitec servo to move to
                             several positions and then pause for three seconds at each position. The servo was connected























                             Figure 5.29  SimpleIDE properties dialog.
   141   142   143   144   145   146   147   148   149   150   151