Active project?

Jeff Prestes jeffprestes at gmail.com
Thu Nov 12 15:13:21 UTC 2015


Hi All,

Thanks for the answers.

Robert, first, congratulations for your project. It helped me a lot. But
regarding PWN, I am sorry but I've tried to run your code above in my
RaspberryPis (B+ and 2) couple of months ago for my project Brasilino (
https://github.com/jeffprestes/brasilino) and I couldn't control a servo
motor like I do with Arduino. I believe it's not your code's fault but as
Sergey said a lack of Linux functionality.

Gerrit, I will try to see what possible workaround Michael has created for
this. Thanks for sharing it.

Best,

-Jeff

On Thu, Nov 12, 2015 at 6:47 AM, Robert Savage <robert at savage7.com> wrote:

> Hi Jeff,
>
> You should be able to use PWM with Pi4J.
>
> Simple hardware PWM example:
>
> package gpio.test;
>
>
> import com.pi4j.io.gpio.GpioController;
> import com.pi4j.io.gpio.GpioFactory;
> import com.pi4j.io.gpio.GpioPinPwmOutput;
> import com.pi4j.io.gpio.RaspiPin;
>
>
> public class PwmTest {
>
>    /**
>      * @param args the command line arguments
>      * @throws java.lang.InterruptedException
>      */
>     public static void main(String[] args) throws InterruptedException {
>
>         GpioController gpio = GpioFactory.getInstance();
>         GpioPinPwmOutput pwm = gpio.provisionPwmOutputPin(RaspiPin.GPIO_24
> );
>         pwm.setPwm(500);
>
>         // keep program running until user aborts (CTRL-C)
>         for (;;) { Thread.sleep(500); }
>     }
>
> }
>
>
> Thanks, Robert
>
> On Wed, Nov 11, 2015 at 11:55 PM, Jeff Prestes <jeffprestes at gmail.com>
> wrote:
>
>> Hey Andrew,
>>
>> I've tried but using dio or Pi4J I couldn't simulate a PWM.
>>
>> Best,
>>
>> -Jeff
>>
>> On Wed, Nov 11, 2015 at 5:21 PM, Andrew Penhorwood <andrew at coldbits.com>
>> wrote:
>>
>> > Is this project active?  I was hoping for some pointers on how to do PWM
>> > with the raspberry PI.
>> >
>> > --
>> > Andrew Penhorwood
>> >
>> >
>>
>
>


More information about the dio-dev mailing list