Hey TFJ,

Thanks for clarifying my questions. 
About Libpruio0.2, I tried exactly that command and stills giving the same 
error (setValue P1 error (no pin control).

<https://lh6.googleusercontent.com/-kVwivx99dlQ/VI8wbeiBuFI/AAAAAAAAACU/sPzdf5AUrGk/s1600/error2.JPG>

In BBB, I'm using Debian (BeagleBone Black - 2GB eMMC) 2014-05-14, available 
by the beagleboard.org latest images. I don't know if it might have 
something related with the version, because I get an error like below when 
I execute the command "echo libpruio > /sys/devices/bone_capemgr.slots".

<https://lh6.googleusercontent.com/-J3-owpYHc9Y/VI8w_zsDeOI/AAAAAAAAACc/qNikoJffUiM/s1600/error1.JPG>

But when I went to /sys/devices/ it shows bone_capemgr.9, like was in 
Libpruio0.0.2.

<https://lh3.googleusercontent.com/--TX2rkNjPJw/VI8xedP61ZI/AAAAAAAAACk/p54xErK8hao/s1600/cape.JPG>

So, when I want to run the other examples like io_input.c, I use the 
command echo PRUSSDRV> /sys/devices/bone_capemgr.9/slots, it works, except 
stepper and pwm_cap, giving the same error as before (setValue P1 error (no 
pin control).

About the installation I did all the steps required with admin previleges 
(http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html+/ChaPreparation.html
).

Pardon my ignorance, but I really don't know what I'm doing wrong. So, if 
you could help me again, I would aprecciate very much. Already thank you 
for your attention.

Best regards,

Luciano.





Quinta-feira, 11 de Dezembro de 2014 16:35:18 UTC, TJF escreveu:
>
> Hello Luciano,
>
> Am Mittwoch, 10. Dezember 2014 17:55:50 UTC+1 schrieb [email protected]
> :
>>
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to