Cross compiling an application ( no idea where libs/headers live )

OK so I’m a newbie at linux development and throwing OE into the mix has got me very confused.

So I’ve built the kernel using bitbake with the line like below

./ bitbake virtual/kernel

I couldn’t build the cloud9-gnome-image that we download under ubuntu but Fedora I could, I can however build al other kernel images under ubuntu. Anyway…

I now want to try building an application. The final application goal is an Aquarium Reef controller to control things like LED lighting, heaters, cooling, fans for the lighting rigs etc. I have one that runs on an Arduino but the SW has a lot of bugs in it, and rather than fix them for the author I decided to build my own based on the BBB and learn some linux programming as I go.

So the first job is to build the control part of the SW, so driving an I2C PWM chip and read DOW temperature sensors.

I’ve got a PCA9685 I2C chip connected to I2C-2 ( or i2c-1 in the filesystem ) and so now I want to write an app to use it. It’s working as I’ve tested it using the i2c tools so the chip works and is connected fine.

So where do I go from here?

I found this

which looks perfect, only I can’t build it because of the header file includes and libraries. When I search for the I2C library I can’t find it anywhere in the code that was downloaded as part of the kernel build. I have the cross compilers, etc so that’s fine.

Also there are a lot of copies of i2c.h and i2c-dev.h scattered all over the place inside the builds directory. How do I know which of these to use?

I’m an experienced embedded developer but haven’t done any linux before so I’m finding it difficult to sort out the build system. Once I get my head around this I think I’ll be sorted. :slight_smile:

Anyone help out?