From andrew at coldbits.com Fri Nov 6 01:41:18 2015 From: andrew at coldbits.com (Andrew Penhorwood) Date: Thu, 5 Nov 2015 20:41:18 -0500 Subject: Raspberry PI Model 2 - PWM Message-ID: <563C053E.6000705@coldbits.com> Is it possible to do PWM with jdk.dio and the raspberry pi Model 2? I know that my hardware is setup correctly and I can get an LED to blink but I need to get PWM working for my motor control sub-system. Any help or pointers would be welcomed. -- Andrew Penhorwood andrew at coldbits.com From andrew at coldbits.com Tue Nov 10 00:24:16 2015 From: andrew at coldbits.com (Andrew Penhorwood) Date: Mon, 9 Nov 2015 19:24:16 -0500 Subject: dio.properties for RPI model 2 Message-ID: <56413930.2050603@coldbits.com> Does anyone have a good example of the dio.properties file for the Raspberry PI model 2? The one in the dev branch appears to be for one of the earlier models. I would be good if there was a file for each model of the raspberry pi. I would be willing to help produce these files but I only have a RPI model 2 for testing. -- Andrew Penhorwood From snazarkin at azul.com Wed Nov 11 11:43:27 2015 From: snazarkin at azul.com (Sergey Nazarkin) Date: Wed, 11 Nov 2015 11:43:27 +0000 Subject: [PATCH] java.nio.BufferUnderflowException at GPIOInputSample application Message-ID: <23187DBC-E311-4447-B045-B319C3C33C62@azul.com> Hi! Please review changes to fix unhandled java.nio.BufferUnderflowException thrown at GPIOInputSample application. http://cr.openjdk.java.net/~snazarki/gpio-notify-BUFE/ /Sergey From andrew at coldbits.com Wed Nov 11 22:21:01 2015 From: andrew at coldbits.com (Andrew Penhorwood) Date: Wed, 11 Nov 2015 17:21:01 -0500 Subject: Active project? Message-ID: <5643BF4D.2080705@coldbits.com> Is this project active? I was hoping for some pointers on how to do PWM with the raspberry PI. -- Andrew Penhorwood From jeffprestes at gmail.com Thu Nov 12 04:55:25 2015 From: jeffprestes at gmail.com (Jeff Prestes) Date: Wed, 11 Nov 2015 23:55:25 -0500 Subject: Active project? In-Reply-To: <5643BF4D.2080705@coldbits.com> References: <5643BF4D.2080705@coldbits.com> Message-ID: 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 wrote: > Is this project active? I was hoping for some pointers on how to do PWM > with the raspberry PI. > > -- > Andrew Penhorwood > > From snazarkin at azul.com Thu Nov 12 09:19:13 2015 From: snazarkin at azul.com (Sergey Nazarkin) Date: Thu, 12 Nov 2015 09:19:13 +0000 Subject: Active project? In-Reply-To: References: <5643BF4D.2080705@coldbits.com> Message-ID: Jeff is right. Linux kernel contains no public API for PWM, therefore DIO doesn?t support such kind of devices /Sergey > On 12 Nov 2015, at 07:55, Jeff Prestes 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 > wrote: > >> Is this project active? I was hoping for some pointers on how to do PWM >> with the raspberry PI. >> >> -- >> Andrew Penhorwood >> >> From robert at savage7.com Thu Nov 12 11:47:07 2015 From: robert at savage7.com (Robert Savage) Date: Thu, 12 Nov 2015 06:47:07 -0500 Subject: Active project? In-Reply-To: References: <5643BF4D.2080705@coldbits.com> Message-ID: 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 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 > wrote: > > > Is this project active? I was hoping for some pointers on how to do PWM > > with the raspberry PI. > > > > -- > > Andrew Penhorwood > > > > > From jeffprestes at gmail.com Thu Nov 12 15:13:21 2015 From: jeffprestes at gmail.com (Jeff Prestes) Date: Thu, 12 Nov 2015 10:13:21 -0500 Subject: Active project? In-Reply-To: References: <5643BF4D.2080705@coldbits.com> Message-ID: 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 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 > 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 >> wrote: >> >> > Is this project active? I was hoping for some pointers on how to do PWM >> > with the raspberry PI. >> > >> > -- >> > Andrew Penhorwood >> > >> > >> > > From robert at savage7.com Thu Nov 12 15:21:40 2015 From: robert at savage7.com (Robert Savage) Date: Thu, 12 Nov 2015 10:21:40 -0500 Subject: Active project? In-Reply-To: References: <5643BF4D.2080705@coldbits.com> Message-ID: Hi Jeff, I'll test PWM out later today on a RPI2b just to verify that its still working. Maybe some bug or update was introduced that now causes it to fail but it was certainly working at one point in the past. I will verify PWM output with an oscilloscope. (Pi4J used WiringPi under the covers which writes directly to the Broadcom SoC memory to control GPIO, so it should not be limited to the Linux device/sysfs interface.) Thanks, Robert On Thu, Nov 12, 2015 at 10:13 AM, Jeff Prestes wrote: > 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 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 >> 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 >>> wrote: >>> >>> > Is this project active? I was hoping for some pointers on how to do >>> PWM >>> > with the raspberry PI. >>> > >>> > -- >>> > Andrew Penhorwood >>> > >>> > >>> >> >> > From robert at savage7.com Thu Nov 12 19:51:53 2015 From: robert at savage7.com (Robert Savage) Date: Thu, 12 Nov 2015 14:51:53 -0500 Subject: Active project? In-Reply-To: References: <5643BF4D.2080705@coldbits.com> Message-ID: Hi Jeff, I tested PWM using Pi4J on a Raspberry Pi 2B today and it seems to be working properly. I tested the following hardware supported PWM pins on the RPi-2B: http://pi4j.com/pins/model-2b-rev1.html - GPIO_01 - GPIO_23 - GPIO_24 - GPIO_26 I tested on the following versions of Pi4J. - 1.0 (release) - 1.0.1-SNAPSHOT - 1.1-SNAPSHOT The link below is a snapshot image of the oscilloscope output I used to verify the PWM signal was present. https://dl.dropboxusercontent.com/u/24688272/RPI2B-Pi4J-PWM-24.png Thanks, Robert On Thu, Nov 12, 2015 at 10:13 AM, Jeff Prestes wrote: > 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 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 >> 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 >>> wrote: >>> >>> > Is this project active? I was hoping for some pointers on how to do >>> PWM >>> > with the raspberry PI. >>> > >>> > -- >>> > Andrew Penhorwood >>> > >>> > >>> >> >> > From mark.reinhold at oracle.com Thu Nov 19 17:10:57 2015 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Thu, 19 Nov 2015 09:10:57 -0800 Subject: New lead for Device I/O Project: Olga Nazarkina In-Reply-To: <561EA0D5.4030803@oracle.com> References: <561EA0D5.4030803@oracle.com> Message-ID: <20151119091057.728559@eggemoggin.niobe.net> 2015/10/14 11:37 -0700, alan.bateman at oracle.com: > Sergey Nazarkin has resigned as lead for the Device I/O project [1]. > > Under the bylaws for Project Leads [2], a new Project Lead may be > nominated by the Group Leads of the Project's sponsoring groups. > > As lead for the Core Libraries Group that sponsored this project, I > would like to nominate Olga Nazarkina as the new Project Lead. Olga is > in the IoT organization in Oracle and had been contributing to the > Device I/O project in recent months. > > As the Core Libraries Group is the only sponsoring group for this > project then I believe that the nomination is automatically approved. So recorded. Olga will be listed as the new Project Lead as soon as she accepts her forthcoming registration invitation. - Mark From olga.milovskaya at oracle.com Fri Nov 20 11:38:33 2015 From: olga.milovskaya at oracle.com (olga nazarkina) Date: Fri, 20 Nov 2015 14:38:33 +0300 Subject: New lead for Device I/O Project: Olga Nazarkina In-Reply-To: <20151119091057.728559@eggemoggin.niobe.net> References: <561EA0D5.4030803@oracle.com> <20151119091057.728559@eggemoggin.niobe.net> Message-ID: <564F0639.6090607@oracle.com> Thank you Mark. I've accepted registration invitation. I hope my status will change soon. Olga On 19.11.2015 20:10, mark.reinhold at oracle.com wrote: > 2015/10/14 11:37 -0700, alan.bateman at oracle.com: >> Sergey Nazarkin has resigned as lead for the Device I/O project [1]. >> >> Under the bylaws for Project Leads [2], a new Project Lead may be >> nominated by the Group Leads of the Project's sponsoring groups. >> >> As lead for the Core Libraries Group that sponsored this project, I >> would like to nominate Olga Nazarkina as the new Project Lead. Olga is >> in the IoT organization in Oracle and had been contributing to the >> Device I/O project in recent months. >> >> As the Core Libraries Group is the only sponsoring group for this >> project then I believe that the nomination is automatically approved. > So recorded. > > Olga will be listed as the new Project Lead as soon as she accepts her > forthcoming registration invitation. > > - Mark From jeffprestes at gmail.com Fri Nov 20 16:49:14 2015 From: jeffprestes at gmail.com (Jeff Prestes) Date: Fri, 20 Nov 2015 08:49:14 -0800 Subject: New lead for Device I/O Project: Olga Nazarkina In-Reply-To: <564F0639.6090607@oracle.com> References: <561EA0D5.4030803@oracle.com> <20151119091057.728559@eggemoggin.niobe.net> <564F0639.6090607@oracle.com> Message-ID: Congratulations, Olga. Good luck in this new challenge. On Fri, Nov 20, 2015 at 3:38 AM, olga nazarkina wrote: > Thank you Mark. > > I've accepted registration invitation. I hope my status will change soon. > > Olga > > On 19.11.2015 20:10, mark.reinhold at oracle.com wrote: > >> 2015/10/14 11:37 -0700, alan.bateman at oracle.com: >> >>> Sergey Nazarkin has resigned as lead for the Device I/O project [1]. >>> >>> Under the bylaws for Project Leads [2], a new Project Lead may be >>> nominated by the Group Leads of the Project's sponsoring groups. >>> >>> As lead for the Core Libraries Group that sponsored this project, I >>> would like to nominate Olga Nazarkina as the new Project Lead. Olga is >>> in the IoT organization in Oracle and had been contributing to the >>> Device I/O project in recent months. >>> >>> As the Core Libraries Group is the only sponsoring group for this >>> project then I believe that the nomination is automatically approved. >>> >> So recorded. >> >> Olga will be listed as the new Project Lead as soon as she accepts her >> forthcoming registration invitation. >> >> - Mark >> > > From olga.milovskaya at oracle.com Mon Nov 23 10:18:30 2015 From: olga.milovskaya at oracle.com (olga nazarkina) Date: Mon, 23 Nov 2015 13:18:30 +0300 Subject: New lead for Device I/O Project: Olga Nazarkina In-Reply-To: References: <561EA0D5.4030803@oracle.com> <20151119091057.728559@eggemoggin.niobe.net> <564F0639.6090607@oracle.com> Message-ID: <5652E7F6.2020403@oracle.com> Thank you! On 20.11.2015 19:49, Jeff Prestes wrote: > Congratulations, Olga. > Good luck in this new challenge. > > On Fri, Nov 20, 2015 at 3:38 AM, olga nazarkina > > wrote: > > Thank you Mark. > > I've accepted registration invitation. I hope my status will > change soon. > > Olga > > On 19.11.2015 20:10, mark.reinhold at oracle.com > wrote: > > 2015/10/14 11:37 -0700, alan.bateman at oracle.com > : > > Sergey Nazarkin has resigned as lead for the Device I/O > project [1]. > > Under the bylaws for Project Leads [2], a new Project Lead > may be > nominated by the Group Leads of the Project's sponsoring > groups. > > As lead for the Core Libraries Group that sponsored this > project, I > would like to nominate Olga Nazarkina as the new Project > Lead. Olga is > in the IoT organization in Oracle and had been > contributing to the > Device I/O project in recent months. > > As the Core Libraries Group is the only sponsoring group > for this > project then I believe that the nomination is > automatically approved. > > So recorded. > > Olga will be listed as the new Project Lead as soon as she > accepts her > forthcoming registration invitation. > > - Mark > > >