[beagleboard] Programming GPIO of BeagleBone Black in C

The beaglebone runs Linux out of the box, so it's just like programming any other Linux computer; just search for 'programming in C on Linux'.

If you're talking about managing and controlling hardware then I'm afraid you're going to have to be more specific in exactly what you wish to do.

Well, here is what I intended to mean. I want to control the GPIO of the BeagleBone Black using C language. So its not like programming on Linux as you’re not controlling hardware there. I’m used to controlling an Arduino using C (if you know what I mean). I wanted tutorials on general programming and Libraries (if any) because what specifics I’ll end up making depends on me. My intended purpose is to interface the BBB as a robotics controller. As the original BeagleBone is pin compatible, tutorials on programming to control hardware on that will be fine as well.

Hope I make myself clear now.

Ok, sure, here is the exact same question posted not two months ago:


Searching these forums/mailing lists first is best before asking :slight_smile:

As a note, Linux controls all the hardware on the board, so programming for Linux, is programming for hardware; and as such most Linux C programming tutorials will apply. In the example given above, it's just opening a file, writing a value and closing the file; which instead of it storing the value in the file, it changes hardware status; no magic 'hardware' commands involved; just plain file manipulation in C.

Audrino, is a different beast; that is a thin library layer above simple hardware; this is a fully fledged OS on mind boggling hardware, so the interfaces are abstracted and not straight forward as you may be used to with the Audrino. The bonescript that ships with the board brings out an Audrino like library in javascript; but there isn't one available in C (as far as I know...).


Well I did search the Mailing List/Forum before posting but I searched specifically for the BeagleBone Black and maybe that’s why that result didn’t pop out at that time. Thanks!!