Raspberry Pi Writing C Code for Raspberry Pi

In this tutorial we will be looking at our first GPIO (General Purpose I/O) programming with the gcc C compiler.  Library files and pin out information for the raspberry pi can be found at the links below.

Raspberry Pi Pin Out and example C code
http://elinux.org/RPi_Low-level_peripherals

Raspberry Pi GPIO Library Files
http://www.airspayce.com/mikem/bcm2835/

Share

    Recommendations

    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest
    • Backyard Contest

      Backyard Contest
    • Stone Concrete and Cement Contest

      Stone Concrete and Cement Contest

    2 Discussions

    0
    None
    Raphango

    4 years ago on Introduction

    I can't really see what's written on your screen.. =(

    But congratulations for your project!

    1 reply
    0
    None
    JamesS79Raphango

    Reply 3 years ago on Introduction

    Its a simple bit of code, which turns the GPIO pin on and off, by
    setting it to low and high in a while loop and a timer between the two
    what sets the pin. For this you can find many examples in python and is
    fast enough to do this but if you want to work with range finders as i
    am then C is the way to go. I do agree its far too small to read and to
    be honest he should of enlarged it before creating his video