GPIO Programming c++ library digita I/O + ADC + PWM

Hi all, and sorry for bad english…

I’m an engeneering student.

I’ve found some C++ library about controlling digital I/O, but nothing about ADC read and PWM.

I think that are a lot of people that prefer programming in C++, so I wondered if it is possible to develop a library for Digital I/O , ADC read and PWM.
I can contribute in this jobs, but i don’t have bought the BBB yet, because i need to know if that library will be available in future

Have a nice day,
Francesco

Ho Francesco,

I’m a beginner on the Beaglebone and tried to look for the same information you are looking for.
I found the information in the lectures of Derek Molloy. Those lectures are excellent, but are not accompanied by a, simple to use, c++ library (the examples are basic), and we have tot extend it to the adc inputs. The ‘Bad to the Bone’ by Barrett and Krindner is another useful guide. It covers also the adc-input. But: no useful, simple to use libraries.
I also found the bonelib libraries, but they are unfinished, and I doubt whether they are for the old Beaglebone (white) or for the Beaglebone Black. I compiled the bonelib libraries and I am able to control he leds on the board, but the combination with the info of Molloy is unclear to me. My goal is, making the Bonelib library functional on my BB and to extend the Bonelib library to (simple) Adc-reading functions (as digital io).

My platform is Eclipse 3.7.2 together with gcc. I used the info of Derek Molloy to install Eclipse Indigo(on Ubuntu)
I’m trying to combine the information now. Iḿ a hobbyist and can spend much time on the BB. I hope I can get some help from others to speed up the case. Until now my progress is slow.
Maybe reactions on this forum can speed up things a little bit.
Are there other students or hobbyists interested? Or did I miss something and is there somewhere a library I can use? reactions are welcome

Bram van Leeuwen

Francesco, Bram

I am currently in the process of developing a C library which provides
some of the features you require, feel free to take a look.

https://github.com/jackmitch/libsoc

I hope to implement ADC and PWM in the future, but I am currently
working on I2C support so it may be a little while yet!

Cheers,
Jack.

Hi,
thank you very much for your reply.
Next week i’ll study your code, it looks like well done.
I would initially try to implement ADC using file system and leave to the future the implementation with I/O memory mapping.
I wish you a nice day, Francesco