ADC?

Do you think libpruio will be able to work with your changes?

I am not really changing anything, just piecing together a bunch of information spread out all over the web, and adjusting things as needed to make it work for me( us ).

Mostly, I'm exploring / experimenting. Generally I'm pretty good at troubleshooting, so if there are any pitfalls along the way, I may / may not convey that in my notes / blog, but I will put the working stuff that i find out there for others to read.

As far as libpruio goes, it should just be a copy / paste replacement for whatever device tree files I use during my findings. But, I can not guarantee that of course, as I have no idea *YET* how much universal io is integrated into the boneblack images.

Everything I've read seems to indicate that dtb=<filename> in uEnv.txt should work. But since i've been posting about / talking on thiese point in the groups here, I figured I had better go see for myself. As technically I have been just been going by what I've been reading on these groups. Albiet form reliable people, but . . .You never know.

BTW, this may take me a few days as I have real life obligations over the next month or so, and I'll be traveling next week so it could take some time. But if you're in no hurry, I'll have some information out soon-ish, I hope

Since I found a working solution in downgrading to 3.8, I can certainly wait a while. Eventually I'd like to get it all working with the latest and greatest. At some point, I'm going to build my own kernel with the bare minimum needed to let my app work, and with an eye toward very fast (subsecond) boot.

Thank you!

Yeah 3.8.x will do the trick, but the only problem there is do nto expect hotplug for ethernet or USB to work. In fact, the kernel will ooops after about a minute if you do.

This stuff I’m doing for myself as well since the future path seems to be 3.14.x, and possible 3.19.x after that.

My own “production” image is actually still 3.8.13-bone47 though. At least this is where I do all my heavy code writing for my own projects. But since I have an NFS server, with 147GB spare disk space just for beaglebone development. it does not hurt to have a few spare images laying around.

I’ve done some testing on newer test images ( later than *bone47 ), and so far I have not liked what I’ve seen. This is not to say that their bad, its just not what I want in my production images YET.

Ah, no hot plug support is fine. This thing will be buried inside a box with only a couple knobs on the front. :slight_smile:

Good to know about >bone47. If I have issues, I’ll downgrade to that.

Yeah, I don't use bonescript or node.js, either. It's all C++ for me.

I downgraded to the 3.8 kernel (didn't even know you could just do that) using apt-get. Not only am I able to access the ADC via the old information available online, I can also play back audio without the buffer-underrun glitches I was experiencing with 3.14. I'm very appreciative that you're taking the lead on getting the ADC to work with the later kernel, but until I can fix the audio problem with it, I'm going to stick with 3.8.

Nodejs is really good if you need a web server for an appliance like situation. I use C too for various things, but when I need the information displayed or something configurable over a network, Nodejs is how I prefer to do that.

Anyway, I’m not a Javascript salesman so . . . By default after using APT to install linux-image-3.14.26-ti-r39 and glossing over Charles’ git instructions. I can see that universal io is there, but config-pin is not. Still, there are ways around this, and assuming I’m not missing something. you can use the sysfs to change the state of these pins. Which means, if you’re using C, it would only take a simple setup section in your code to get everything you want and that is available setup correctly. That is really nifty.

As to using pruiio, I’m not 100% positive, but it seems so long as you have the dtb file, you could potentially

  1. drop the file into /boot/dtbs/3.14.26-ti-r39/
  2. De compile am335x-boneblack.dtb
  3. Add an #include statement for the pruiio file
  4. Recompile am335x-boneblack.dtb
  5. rename / copy the fie into /boot/dtbs/3.14.26-ti-r39/
  6. modify dtb=<your_new_dtb_file_here> in /boot/uEnv.txt
  7. reboot.

Of course I have not tested this yet, so I can not say 100% either way until I test it myself. Someone else however( Robert ) would probably have a good idea on if this would work or not.

Anyway, I’m entertaining myself here exploring / experimenting . . . so it’s all good.

" . . . At least they’re not playing computer games . . ." Name that quote :wink:

Haha, excellent progress, it sounds like.

My app reads ADCs (and eventually some GPIO), and outputs sound. I will also like to output PWM to control some LEDs. Right now I'm reading the ADCs using open/read calls, which is fine (I only need to read them at 10 Hz; they're knobs for a human to turn). I hope I can write to an fs-based PWM node to establish a PWM.