Andrew, I'd like to add my thanks as well. You're libraries and assistance to Forum members have been so much help to many of us (and will continue to do so). Thanks for all your body of work in B4A, and enjoy your future endeavors.
Would you consider posting your ioio eclipse project? I've spent the last few days getting familiar with eclipse. I can create the sample ioio apks and created the forum's example library. Not being very familiar with java, I'd appreciate your project as a wrapper example. No promises but I'm at least going to give it a try.
I was hoping Tomas or Markus would show an interest in this library but...
Here are the two present projects for IOIOBT. As far as I can remember IOIOlib is a straight recompilation of the original source with no modifications. I put it in a project so I could see the source code I was interfacing to.
Here is a bit of code that gives you an idea how to use pwm and what it does.
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim yoyo As IOIOBT
Dim led As PwmOutput
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ToggleButton1 As ToggleButton
Dim SeekBar1 As SeekBar
Dim SeekBar2 As SeekBar
Sub Activity_Create(FirstTime As Boolean)
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then yoyo.Disconnect
Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)
led.PulseWidth=Value 'value is in microseconds
Activity.Title="pulse width is "&Value&" microseconds"
Sub SeekBar2_ValueChanged (Value As Int, UserChanged As Boolean)
led.DutyCycle=Value/100 'value is in %
Activity.Title="duty cycle is "&Value&"% of 10Hz"
Sub ToggleButton1_CheckedChange(Checked As Boolean)
If Checked Then
led = yoyo.OpenPwmOutput( 0,led.OP_NORMAL,10) ' Enable LED_PIN for output