Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-10 Thread Andrew Harres
That's very clever, but it looks like the file exists before it's usable by libpruio. I tried ConditionPathIsReadWrite, but the file is readwritable before it's usable by libpruio as well. I noticed that the file permissions and group changes which seems to correlate with libpruio being able to

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-09-10 Thread Robert Nelson
On Thu, Sep 10, 2020 at 1:55 PM Andrew Harres wrote: > > Hello again! > > I'm trying to solve a minor problem. I made a systemd service which starts my > program automatically. My problem is that my program is starting too early > which causes this error: > > AssertionError: pruio_new failed

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread TJF
Am Donnerstag, 13. August 2020 18:16:55 UTC+2 schrieb Andrew Harres: > > debian@beaglebone:~$ groups > debian adm kmem dialout cdrom floppy audio dip video plugdev users > systemd-journal input bluetooth netdev cloud9ide xenomai weston-launch > tisdk docker i2c iio spi admin remoteproc eqep

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread Andrew Harres
debian@beaglebone:~$ uname -r 4.14.108-ti-r136 debian@beaglebone:~$ groups debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input bluetooth netdev cloud9ide xenomai weston-launch tisdk docker i2c iio spi admin remoteproc eqep pwm gpio debian@beaglebone:~$ sudo

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-13 Thread jonnymo
You could try adding the following to your Python 2 script to add Python 3 print support. "from __future__ import print_function" However, there should be an effort to move from Python 2 to Python 3. Cheers, Jon On Thu, Aug 13, 2020 at 6:47 AM Dennis Lee Bieber wrote: > On Wed, 12 Aug 2020

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-04-06 Thread TJF
Hi CM! Am Montag, 1. April 2019 19:39:48 UTC+2 schrieb CM: > > TJF, > > Thank you for your help, especially because it turned out to be more of a > systemd issue than libpruio! I have now changed my service so that it > doesn't start until later in the boot process, and everything seems to be

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-04-01 Thread CM
TJF, Thank you for your help, especially because it turned out to be more of a systemd issue than libpruio! I have now changed my service so that it doesn't start until later in the boot process, and everything seems to be functioning correctly. My initial mistake was making multiple changes

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-30 Thread TJF
Am Freitag, 29. März 2019 21:18:58 UTC+1 schrieb CM: > > Your suggested steps did work to connect uio5, thanks! It reverts to the > disconnected state on reboot, however. > Good! > > I do have several services running, including for the IMU and the analog > in (using libpruio). So my service

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread CM
Hello, Your suggested steps did work to connect uio5, thanks! It reverts to the disconnected state on reboot, however. I do have several services running, including for the IMU and the analog in (using libpruio). So my service isn't explicitly changing uio5, but maybe it invokes it too early

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread TJF
I don't understand why uio5 doesn't change. The main issue is it's lenght of 0 bytes (others are 240). The device seems to be disconnected from the driver, and the driver loader cannot change the file. Sorry, you don't have a libpruio issue. You have a problem with LINUX driver loading. And I

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread CM
Yes, I think I should probably take a deep breath, thanks! So my system image was initially written in November, I guess, which is why that date is shown. It updates after being on a bit (via GPS). Now it shows *all* /dev/uio* as Nov 3, until removing/reinstalling uio_pruss. Please see the

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread TJF
Slow down, take a deep breath! I try to understand your system. The first question is why is uio5 different than the others. By default since kernel 4.14 all devices are owned by root users. Why do you get root root for uio5? Why are all dates 2016 Nov., while uio5 is from today? Please reload

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-29 Thread CM
> > Please post the full output of ls -l /dev/uio* > > Do you (your user ID) have write access to that files? > debian@beaglebone:~/analog$ ls -l /dev/uio* crw-rw 1 root users 240, 0 Nov 3 2016 /dev/uio0 crw-rw 1 root users 240, 1 Nov 3 2016 /dev/uio1 crw-rw 1 root users 240, 2

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread TJF
Am Donnerstag, 28. März 2019 16:58:08 UTC+1 schrieb CM: > > When I check the PRU availability, i.e. ls /dev/uio8, it shows uio0-7. All > are yellow but uio5. > Please post the full output of ls -l /dev/uio* Do you (your user ID) have write access to that files? Regards -- For more options,

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread CM
Ok, I already have just AM335X-PRU-UIO-00A0.dtbo enabled. So, if it's safe to say the issue is not with librobotcontrol, that brings me back to the initial problem. I cannot run rb_file (or the code I wrote as a modification of it) - getting "constructor failed (cannot open /dev/uio5)" When I

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread Robert Nelson
On Thu, Mar 28, 2019 at 10:58 AM CM wrote: >> >> You should be fine then, just disable remoteproc_pruss and use >> uio_pruss and ignore any of the librobotcontrol pru warnings.. > > > Forgive me if I'm oblivious, what are the steps I take to disable > remoteproc_pruss and use uio_pruss? > > Do

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread CM
> > You should be fine then, just disable remoteproc_pruss and use > uio_pruss and ignore any of the librobotcontrol pru warnings.. > Forgive me if I'm oblivious, what are the steps I take to disable remoteproc_pruss and use uio_pruss? Do you mean to comment out the PRU-RPROC dtbo files in

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread Robert Nelson
On Thu, Mar 28, 2019 at 10:14 AM CM wrote: > > Hello Robert, > > I am using a colleague's code to read the BeagleBone Blue's IMU/barometer. He > is using some of librobotcontrol in that. To be honest, I don't know > specifically what of librobotcontrol his code is using. > > To my

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread CM
Hello Robert, I am using a colleague's code to read the BeagleBone Blue's IMU/barometer. He is using some of librobotcontrol in that. To be honest, I don't know specifically what of librobotcontrol his code is using. To my understanding, it includes - rc/math/kalman.h, filter.h, and

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread Robert Nelson
On Thu, Mar 28, 2019 at 9:04 AM CM wrote: > > Thank you for the help regarding the driver conflict. I feared that might be > the case. I will have to look into running librobotcontrol with uio_pruss, as > you suggested. > > I also hope that Robert has some insight into my problem. > > Also,

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-28 Thread CM
Thank you for the help regarding the driver conflict. I feared that might be the case. I will have to look into running librobotcontrol with uio_pruss, as you suggested. I also hope that Robert has some insight into my problem. Also, thank you for your efforts on libpruio. The times I am able

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-27 Thread TJF
Am Mittwoch, 27. März 2019 20:44:54 UTC+1 schrieb CM: > > I have read enough of this board to know that question was coming, so I > posted the output of /opt/scripts/tools/version.sh in my initial post. Here > it is in case it wasn't clear: > Hopefully Robert finds any hint here ... >

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-27 Thread CM
> > > Follow Roberts instruction in this post > , > in order to provide the necessary debugging informations. > > I have read enough of this board to know that question was coming, so I posted the output of

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-27 Thread TJF
Am Mittwoch, 27. März 2019 16:56:48 UTC+1 schrieb CM: > > When I run as root I get a bus error, otherwise the error message is: > > constructor failed (cannot open /dev/uio5) > This is a LINUX issue. The kernel driver uio_pruss doesn't load properly. Perhaps it gets listed by lsmod, but it

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-27 Thread CM
> > > Are you using error checks (as in the examples)? You didn't change the > extram_pool_sz, so you should get the message "out of memory" for sample > amounts (= Adc->ChAz x Adc->Samp) greater than 128 kSamples (= default > extram_pool_sz). > Yes, I am still using the error checks per the

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-27 Thread TJF
Am Mittwoch, 27. März 2019 15:25:39 UTC+1 schrieb CM: > > I have tried a few implementations, with the number of samples: 30,000 --> > 300,000 --> 600,000. I had no issues with 30,000 or 300,000, as far as I > can tell. > > I haven't made any changes to extram_pool_sz, and don't actually know

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-27 Thread Robert Nelson
On Wed, Mar 27, 2019 at 9:25 AM CM wrote: > > Hello, > > I have tried a few implementations, with the number of samples: 30,000 --> > 300,000 --> 600,000. I had no issues with 30,000 or 300,000, as far as I can > tell. > > I haven't made any changes to extram_pool_sz, and don't actually know

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-27 Thread CM
Hello, I have tried a few implementations, with the number of samples: 30,000 --> 300,000 --> 600,000. I had no issues with 30,000 or 300,000, as far as I can tell. I haven't made any changes to extram_pool_sz, and don't actually know where the default for this is set. If you could please

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-26 Thread TJF
Hi CM! Am Dienstag, 26. März 2019 22:07:43 UTC+1 schrieb CM: > > ..., and I increased the amount of samples my rb_file code is recording. > How big is your amount of samples? What's the extram_pool_sz in the uio_pruss driver setting? Regards -- For more options, visit

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-26 Thread CM
I have encountered some issues with analog input and libpruio. Last week, I had a working version of some code that is a modification of rb_file. When I run it (or any of the examples) now, I get a Bus error. I am not sure what I did to cause this. I changed some systemd services that I have

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-22 Thread not me
Scratch that, the problem occurs repetively. After a random while the network over USB disappears and connecting to the wifi does not let me reconnect to the cloud9 ide. I got the startup error again, but the problems occurs even if the error isn't there. Message from syslogd@beaglebone at Mar 21

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-22 Thread not me
Hi Robert, That fixed the problem and the examples work fine now. I did get errors on the first two reboots: The connection to my computer was randomly cut on both reboots (the network over USB and the beaglebone wifi became unavailable) and additionally, on the second reboot, I got this error on

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-21 Thread Robert Nelson
On Thu, Mar 21, 2019 at 2:25 PM <78b...@gmail.com> wrote: >> >> Hi Robert, thanks for your quick answer, > > > In the meantime I went for a clean slate, flashed the latest IoT image from > beaglebone.org and changed the kernel to 4.14.103-bone17 > > > here is the output you asked: > > >

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-21 Thread 78ba19
> > Hi Robert, thanks for your quick answer, In the meantime I went for a clean slate, flashed the latest IoT image from beaglebone.org and changed the kernel to 4.14.103-bone17 here is the output you asked: root@beaglebone:/var/lib/cloud9/examplesPRUIO/examples#

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2019-03-21 Thread Robert Nelson
On Thu, Mar 21, 2019 at 10:59 AM <78b...@gmail.com> wrote: >> >> Hi TJF, > > > I was previously using iio but due to ADC sampling rate issues, I've been > trying to use libpruio on my BBB wireless with the latest image from > beaglebone (i.e Debian 9.5, 4.14.71-ti-r80) on an SD card. > > I've

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2017-02-06 Thread William Hermans
On Mon, Feb 6, 2017 at 11:00 AM, wrote: > I got the solutio (i think.. hehe) > If you're happy with the code you've got, who am I to argue about it ? -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2017-02-06 Thread mesquita . rodrigo . c
I got the solutio (i think.. hehe) /*file doiscs.c Compile by: `gcc -Wall -o doiscs doiscs.c -lpruio` */ #include "stdio.h" #include "unistd.h" #include "../c_wrapper/pruio.h" #include "time.h" int main(int argc, char **argv) { float n[256]; float v1[128]; float

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2017-02-06 Thread William Hermans
Or better yet, get rid of the second loop entirely, and just print the values as you receive them. However, printf() *is* a system all that would definitely slow down your ADC read speeds. Unless you pipe the output of the application to a file. Which would not be healthy for the emmc, or sdcard

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2017-02-06 Thread William Hermans
Thinking about how to "throttle" reading from the ADC to get correct values. A little more. One way you could potentially deal with that situation could be to change both loops to a while() loop, and only increment your loop index value if the ADC index value is greater than 0. Or maybe test if

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2017-02-06 Thread William Hermans
On Mon, Feb 6, 2017 at 9:12 AM, Rodrigo Mesquita < mesquita.rodrig...@gmail.com> wrote: > Mr, Willians, thanks for your answer. > > According to the lipruio's documentation, the variable io->DRam[0] > contains the index of the last ADC data read. > > About the part: > > do{ > . . . >

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2017-02-06 Thread mesquita . rodrigo . c
thank you so much for the answer, Mr. William. According do the documentation of the libpruio, the variable io->DRam[0] stores the index of the last data read. This data, is stored in the vector io->Adc->Value[]. I Just want 128 samples of each chanel. In fact, I completely agree with you:

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2017-02-06 Thread William Hermans
On Mon, Feb 6, 2017 at 4:21 AM, wrote: > Hello Mr. TJF > > First of All, thank you so much for providing support on real-time tasks > using a low cost plataform. > I'm trying to apply the libary "libpruio" to make a system for energy > meansurement using the

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2015-03-06 Thread TJF
Thanks for feedback! BR -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2015-03-06 Thread andreas . vogelfrei
[SOLVED] Hello TJF, I will answer in English to give other users the possibility to use this information as well. Thank you for your answer. With this information I was able to compile the supplied libpruio FreeBASIC examples. Steps to take (on the BeagleBone, as root, otherwise use 'sudo'):

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2014-11-11 Thread TJF
Am Montag, 10. November 2014 21:52:26 UTC+1 schrieb William Hermans: TJF, I'd be willing at some point to help you port some code for your project, Hello William, welcome at the libpruio project. I know about many tasks to improve the libpruio package. Some of them might be fun for you.

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2014-11-11 Thread William Hermans
Back in the early to mid 80's I was living in Kitzingen,Germany, and I was young. If you catch my meaning. But anyway, I am still a bit busy, but perhaps in my spare time I can read your documentation a bit at a time to be used to it. It is something I've been wanting to do for a while now . . .

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2014-11-10 Thread William Hermans
TJF, I'd be willing at some point to help you port some code for your project, Do you have a quick setup guide for your library ? I did read some of your documents a couple months ago, but then i got busy with many other things . . . such is life. Other problem is that I am not exactly a

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2014-11-08 Thread William Hermans
*If you want to provide better sample code you're free to go, but please don't be that smart-ass stating facts that are only half or not at all true.* Ok, that is just plain rude. So, since we're being rude now. I should mention the code you pasted is C and not C++. I figured you should

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2014-11-07 Thread William Hermans
Whew ! If you're looking for fast, you're not going about it the right way. 1) Nested loops are bad. 2) A file open, and close every cycle on the outer loop ? Is that really necessary ? Big time performance hit. 3) spintf() as I recall is a fairly slow function. A few things you can do to fix

Re: [beagleboard] Re: libpruio (fast and easy D/A - I/O)

2014-11-07 Thread niroko89
Thanks for the feedback. I know that I'm far from a good c programmer, but I'm not that bad. From reading the book The C++ Programming Language by Bjarne Stourstrup (the maker of c++) I know a thing or two about the compiler. First of, all sizeof(...) are replace at compile time. Secondly, all