Hello Luciano, Am Mittwoch, 10. Dezember 2014 17:55:50 UTC+1 schrieb luciano...@gmail.com: > > Pardon my ignorance but about the ADC, how can I activate less steps? > And how can I remove the default configuration (open delay 0x98, > avaraging 4)? It is in the library "pruio_c_wrapper.h"? If so for what > value should I change (#define PRUIO_DEF_AVRAGE 4)? > never change the header file(s) unless you realy know what you're doing!
Instead, change the parameters in the function calls. - pruio_new() configures default steps for ADC (1 to 8 for AIN-0 to AIN-7). Set all parameters to 0 (zero) for maximum speed, like pruio_new(io, 0, 0, 0); Find details here in the documentation. <http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/class_pru_io.html#af82d57b4a8ece54e57576463c1be9b9e> - pruio_config() configures the steps to use in its second parameter (third for C wrapper). Obviously you used step 2 (AIN-1), so write pruio_config(io, 1, 1 << 2, 0, 4); // 1 << 2 = step 2 !!! libpruio-0.2 !!! Find details here in the documentation <http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/class_pru_io.html#ae3f7d3561ab2642dd822c41a0be63a6d>. > The thing about libpruio 0.2, is that I've already installed yesterday, > but when I try to do the stepper example, it gives the message (setValue > P1 error (no pin control)), and I don't know yet what the problem might > be, and I need to use the GPIO to do the same algorithm above. So I was > still trying something on libpruio0.0.2. Maybe you can help me figure it > out, if possible. > The thing about libpruio-0.0.x is that pinmuxing doesn't work at all. In your above case the pin P9_14 is in a matching mode by default. But other pins may not work with version 0.0.2. The 'no pin control' error is because you executed the example as normal user, but pinmuxing requires admin privileges. Either configure all four pins before you start the example. Or, more simple, start the example with admin privileges like sudo ./stepper (On Ubuntu you've to enter your password and hit Return.) Good luck! And take some time to read the docu. -- 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 beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.