Re: Dynamically switching between Host and Device Modes (OTG)

2023-06-15 Thread Ytai Ben-Tsvi
No, that is not possible with the current design.

On Fri, Jun 16, 2023 at 8:50 AM Adir Krafman  wrote:

> Hi all / Ytai,
>
> I need to be able to connect the IOIO-OTG to an android device and then
> dynamically(programmatically) switch the roles of host and device between
> the android and board.
>
> Is it possible? I obviously can't use the physical switch.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ioio-users/c12f4611-b9c4-48b1-943c-bdbbedbf2cfdn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ioio-users/CANfwwrBUHAbDBRY2qHdWM-UpXQERE1s-m0_ee5MyA%2BF8Ap1N8w%40mail.gmail.com.


Re: IOIO-OTG as 'device' in android?

2020-04-30 Thread Ytai Ben-Tsvi
That would involve rebuilding the firmware as the pin is hardcoded in it.

On Thu, Apr 30, 2020, 09:46 Ivan Iveljic  wrote:

> Hey I've got a question, how to change the ioio Bluetooth password?
>
> Thanks in advance
>
> Christian Gutierrez  schrieb am Do., 30. Apr. 2020,
> 18:38:
>
>> Hello,
>> The IOIO-OTG seems to be a great fit for what we are trying to do, but
>> the documentation suggests that it cannot work as a USB device (as opposed
>> to host) with an android device. Is this accurate?
>>
>> We would like to power a project from a smartphone and we would like to
>> test the phone's power delivering capabilities as well.
>>
>> Any help is appreciated, thanks!
>> --
>> Christian
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ioio-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ioio-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ioio-users/aa3a0215-bde6-4cef-9325-f6ae5a92590d%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ioio-users/CAAO5eYu%2BwkzUCteVk3pyEnRDfHrQGpR0VdHp-K9rpVDcRqiX8Q%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ioio-users/CANfwwrCWRo5FrFgqAmivreRd%3D7VC4KWBnCPoXYMH%2BebOWrAmhw%40mail.gmail.com.


Re: IOIO-OTG as 'device' in android?

2020-04-30 Thread Ytai Ben-Tsvi
The IOIO can work as either a device or host, depending on which side of
the USB cable is connected to it. You'd need to include the
IOIOLibAndroidDevice library in your project. It can also work as a USB
device with a PC app in a similar manner.

On Thu, Apr 30, 2020, 09:38 Christian Gutierrez  wrote:

> Hello,
> The IOIO-OTG seems to be a great fit for what we are trying to do, but the
> documentation suggests that it cannot work as a USB device (as opposed to
> host) with an android device. Is this accurate?
>
> We would like to power a project from a smartphone and we would like to
> test the phone's power delivering capabilities as well.
>
> Any help is appreciated, thanks!
> --
> Christian
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ioio-users/aa3a0215-bde6-4cef-9325-f6ae5a92590d%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ioio-users/CANfwwrBEu0cQc%2BLizcrm%2BRJJwqkiJ2dbrHrxF%3De%2B5AYrjnHMdg%40mail.gmail.com.


Re: Programmatically reset ioio USB connection

2019-08-12 Thread Ytai Ben-Tsvi
I haven't put a watchdog in the firmware. Shouldn't be hard to do for
someone who knows what they're doing. Could be triggered either by an
explicit command from the app (which will give you end-to-end) or to USB
status (which will give you zero impact on the app on the expense of less
coverage).
I'm probably not that someone unfortunately (for lack of availability).

On Mon, Aug 12, 2019 at 3:28 PM Paul James 
wrote:

> Ytai - if you still monitor this group - did you ever put such a watch dog
> into firmware? This issue is significantly greater in android 6 than
> android 4. Unfortunately we had to move from 4 to 6, and now having major
> issues with our production system.
>
> On Thursday, February 19, 2015 at 3:38:56 PM UTC-6, Ytai wrote:
>>
>> There are two main causes for what you're seeing:
>>
>>1. The Android USB stack would sometimes not correctly detect and
>>report a quick disconnect/reconnect event. And there are other annoying
>>quality issues like that.
>>2. It is not immediately obvious how to have a Service register for
>>connection events.
>>
>> Not all is lost: it is very possible that there are software workarounds
>> for said Android constraints that would result in a robust AOA connection.
>> This issue has gotten to the point where it is important enough to enough
>> people that I'm intending to take a serious look at it soon and assess what
>> can be done.
>> As a last resort, it may be possible to enable a watchdog on the IOIO
>> that would reset everything if it doesn't here from your app for a certain
>> time and hopefully this would be able to recover from a lost connection
>> under all circumstances regardless of how misbehaved Android is.
>> Feel free to look at the implementation of the AccessoryIOIOConnection
>> yourself, or otherwise wait for updates from me.
>>
>> On Tue, Feb 17, 2015 at 10:25 PM, Andries Kruger 
>> wrote:
>>
>>> Hi,
>>>
>>> I've been using the IOIO for a few weeks now. I have a rooted phone that
>>> connects to the IOIO-OTG and I'm using the IOIOService to handle the board.
>>> Everything has been going pretty well. There is just one issue I am
>>> struggling to fix/workaround.
>>>
>>> A little background: The phone will be installed in a vehicle where I
>>> don't have access to it. It will be collecting data as the driver goes on
>>> his way. I need to IOIO to start and work flawlessly without issues and if
>>> issues are detected, the phone should be able to fix itself. I've got this
>>> working pretty well now.
>>>
>>> The issue I'm currently experiencing is that the IOIO gets disconnected
>>> from the phone (well sort off). The phone is being powered by the IOIO but
>>> the connection to the board is dead. It is kinda hard to replicate this
>>> problem but I have managed to do this by wiggling the USB connection and I
>>> think it might be caused by the vibrations in the vehicle. I do think I
>>> have a pretty good quality USB-OTG cable and the other cable is the stock
>>> Samsung cable that came with the phone. Eventually I'll try to solder the
>>> connections together but I would like to have some sort of way to fix the
>>> problem in the software should it occur. There are 3 things that fix the
>>> problem:
>>> 1) Enable/Disable USB Debugging
>>> 2) Cycle the power on the IOIO
>>> 3) Restart the phone
>>>
>>> Restarting the phone will probably be the easiest solution but then we
>>> loose data for as long as it takes the phone to restart. I have no way of
>>> cycling the power on the IOIO without human intervention and it doesn't
>>> look like I can change the state of USB debugging even when I'm rooted.
>>>
>>> Does anyone know of a way I can programmatically fix this?
>>>
>>> PS: I have latest versions of firmware installed.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ioio-users/ab4d7531-d1b7-4226-bcab-c7ec9f00ec41%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Re: (ADVANCED) Building the IOIO firmware

2018-04-24 Thread Ytai Ben-Tsvi
Do you want to send out a pull request?

On Mon, Apr 23, 2018, 14:39 JP  wrote:

> Thanks!
>
> I can confirm that Mikhail's suggestions also fixed the same errors for me.
>
> /JP
>
>
> Den onsdag 16 augusti 2017 kl. 12:26:13 UTC+2 skrev Mikhail Evstafyev:
>>
>> I've just started to work with IOIO firmware and met both issues noticed
>> by Pranay Sharma.
>>
>> I think that they are related to the latest changes to Microchip
>> development tools. Most likely changes were done because of MCC integration
>> into the development flow.
>> I've started with MPLAB X v3.65 and XC16 v1.31 on Windows7 virtual
>> machine.
>>
>> The issue with missed PPS.h file I fixed by installation of legacy
>> peripheral library via
>> peripheral-libraries-for-pic24-and-dspic-v2.00-windows-installer.exe.
>> The installer asks about location of XC16 compiler and you should give
>> the correct path. Otherwise compiler will not find the header file. If
>> there are several versions of XC16 installed then you should install the
>> library several times giving location of different versions.
>>
>> The issue with _reset symbol undefined is related to changes in linker
>> script file (.gld) syntax and startup code. Probably startup code should be
>> generated by MCC.
>> IOIO projects do not use MCC that results in startup code not found.
>> I was able to fix this issue by rolling back the XC16 version. The
>> version 1.25 compiles and links everything OK.
>>
>> BTW I've also tried C30 v3.30. On my PC linker crashes. So I have to use
>> XC16.
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO keeps resetting when opening analog input

2017-11-26 Thread Ytai Ben-Tsvi
Is this over Bluetooth? If so, try a different dongle. Some dongles seem to
not be able to keep up with the bandwidth required for analog inputs and
corrupt the data, causing the connection to drop.

On Nov 26, 2017 12:27 PM, "Tyler"  wrote:

> Kannan,
>
> I don't see anything that is incorrect in your code. You've opened the
> AnalogInput correctly and I don't see anything conflicting that would cause
> an error such as attempting to use the same pin twice. I would have to see
> more to find a problem - would you mind posting a logcat showing the reset
> and startup of the ioio?
>
> Tyler
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO Protocol Error and severe reliability issue

2017-11-03 Thread Ytai Ben-Tsvi
>From experience, this behavior sometimes occurs as result of saturating the
BT bandwidth with some dongles. Each analog input you open generates an
additional ~1.25kB/s of data.
Your options are either:

   - Try different dongles. Some experience this behavior more than others.
   - Modify the firmware to reduce the analog sample rate (currently
   hard-coded at 1kHz):
   https://github.com/ytai/ioio/blob/master/firmware/app_layer_v1/adc.c#L90


On Mon, Oct 30, 2017 at 11:43 AM, Et Dev  wrote:

> Hello Ytai,
>
> I am using IOIO bluetooth interface connected to my app running on Samsung
> Note 4 device (other devices Note3/2 and S3 all have same issues too).
> Inspite of devices being in close proximity and no other possible
> interference (signal-free facility), I do see sporadic IOIO library
> notifying of disconnects. On closer inspection, it seems a protocol error
> which somehow manifests into a disconnect. There are times when there is no
> such disconnect for more than 20 minutes and there are times when the
> disconnect happens within a minute. Moreover, once the disconnect happens,
> it keeps on disconnecting frequently - usually within a minute. Here is a
> summary trace of the logcat dump of the failure (- see complete trace at
> end of this mail).
>
> 10-28 19:46:12.519 13132 13882 E IOIOProtocol: Protocol error:
> 10-28 19:46:12.519 13132 13882 E IOIOProtocol: 
> ioio.lib.impl.IOIOProtocol$ProtocolError:
> Received unexpected command: 0xff
> 10-28 19:46:12.519 13132 13882 E IOIOProtocol:  at
> ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:928)
> 10-28 19:46:12.529 13132 13882 D IOIOImpl: Physical disconnect.
> 10-28 19:46:12.529 13132 13882 V BluetoothIOIOConnection: Client initiated
> disconnect
>
> *Hardware Configuration:*
> Project uses IOIO [Hardware ID: SPRK0020 Bootloader ID: IOIO0401 Firmware
> ID: IOIO0506] in following configuration:
>  15 digital output pins  [Open-Drain]: 3, 6, 7, 10, 11, 12, 13, 14,
> 18, 19, 20, 21, 22, 23, 24
>6 analog input pins: 41,42, 43, 44, 45, 46
>   3 TWI sets  [100KHz]: 1, 2, 4, 5, 25, 26
>
> *Application processing*:
>
>- *[Re]Connect-setup*: MyService extends IOIOService. In
>createIOIOLooper(String connectionType, Object extra), it checks if
>connection-type is bluetooth and creates an IOIOLooper. Setup in this
>looper instantiates DigitalOutput, AnalogInput and TwiMaster. Henceforth,
>loop() does Thread.sleep(500). All the digital outputs are also set to
>false state. The IOIO board and these controls are saved by the service for
>future use. If this is a reconnect, old IOIO board and controls are
>discarded and new board and controls take their place.
>- *Monitor-input:* Once application is ready, application starts three
>threads - each monitoring a two AnalogInput in a loop with a sleep of
>10secs in loop and 1 sec between the two inputs. These threads may be
>started either as part of IOIOLooper.setup processing (if app is ready) or
>later by application UI thread (if app gets ready later on). The TWI
>devices may be used in lieu of the Analog-inputs here but I have disabled
>them for now.
>- *Operate-outputs:* A thread-pool performs application processing and
>based on application business logic, worker pool threads operate the
>DigitalOutputs.
>- *Disconnect-cleanup*: On disconnect, MyService discards the IOIO
>board and the DigitalOutput, AnalogInput and TwiMaster(100KHz).
>
> *Additional Observations*:
>
>- Disabling the *Operate-outputs* does not have any effect - IOIO
>still disconnects.
>- Disabling the *Monitor-input *and *Operate-outputs *seems to
>eliminate disconnects. The IOIO board is essentially left unused for
>extended period.
>- Once the protocol error happens, the application keeps getting
>frequent disconnects (within a minute).
>- Completely stopping the application and restarting the application
>can sometimes prolong the disconnect - however, this is not always true.
>- I have disabled the TWI sets for now as they seem to make debugging
>harder and more unpredictable.
>
> *Request: *
>
>- Please help me identify what may cause these protocol errors and
>recommend a way to debug these diisconnects.
>- Do you recommend changes in my application structure that can
>improve the reliability - stopping/restarting some threads, consolidating
>some threads etc.
>- Is there a way to resume operation reliably after a disconnect?
>
> *Complete Logcat filtered for IOIO*:
> 10-28 19:38:30.459 13132 13132 I IOIOBaseApplicationHelper: Using IOIOLib
> version: IOIO0507
> 10-28 19:38:30.459 13132 13132 D IOIOConnectionRegistry: Successfully
> added bootstrap class: ioio.lib.impl.SocketIOIOConnectionBootstrap
> 10-28 19:38:30.479 13132 13132 D IOIOConnectionRegistry: Successfully
> added bootstrap class: ioio.lib.android.accessory.
> 

Re: bluetooth pairing

2017-11-03 Thread Ytai Ben-Tsvi
BF:EB are the last 4 digits of the address (which depends on the dongle)
and 4545 is the pin (always).

On Fri, Nov 3, 2017 at 7:24 AM, Ilan Tal  wrote:

> According to the documentation pair of a phone to IOIO is given by IOIO
> (xx:yy) where these give the last 4 numbers.
> I get IOIO (BF:EB). bfef = 49131 which didn't work. In the documentation
> the example had 4545.
> I tried 4545 and it paired. What is the connection between bfeb and 4545?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: otg on the latest phones

2017-10-23 Thread Ytai Ben-Tsvi
On Mon, Oct 23, 2017 at 12:10 AM, Ilan Tal  wrote:

> Thanks Ytai,
> I couldn't see clear enough to see there are 5 pins on the micro USB,
> unlike the 4 pins on the USB.
> Maybe this explains why I don't remember ever seeing a male micro USB to
> male micro USB.
>
> Am I correct in thinking an "OTG" cable has the ID pin shorted to GND on
> the male micro USB?
>

Correct, which is what tells whoever is on that side of the cable "you
should act as host".


> I assume nothing is shorted in the female micro USB connector?
>

Not sure what you mean by "female micro USB connector".


> In any case I see where the symmetry is broken.
> I guess your red cable has the ID shorted to GND?
>

Yes.

> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: otg on the latest phones

2017-10-22 Thread Ytai Ben-Tsvi
The "A" side of the cable (host) has ID pin shorted to the GND net and the
B side (guest) doesn't.

On Oct 21, 2017 21:57, "Ilan Tal"  wrote:

> As a sanity check, I would like to ask what is the difference if you plug
> in the cable one way or the other.
> On my computer I get:
>
> ilan@ilan-Desktop:~$ lsusb
> Bus 002 Device 005: ID 1b4f:0008
> Bus 002 Device 004: ID 046d:081b Logitech, Inc. Webcam C310
> Bus 002 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
> Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 005 Device 002: ID 0e8d:1806 MediaTek Inc. Samsung SE-208 Slim
> Portable DVD Writer
> Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> The first entry on the list is the IOIO board, and it goes away if I
> unplug it.
> As far as I can see there is no electronics in these splitter cables, so
> what difference could it make which direction you plug it in?
>
> We will do the test, but I am at a loss to try to explain any difference.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: otg on the latest phones

2017-10-21 Thread Ytai Ben-Tsvi
See inline

On Sat, Oct 21, 2017 at 9:26 AM, Ilan Tal  wrote:

> I would very much like that what you imply would be true.
> I don't know what the "direction of the cable" really means.
> There is a red cable which comes with the board which is a male microUSB
> connected to a female USB.
> That male microUSB is a bid odd in that it plugs into the IOIO but not
> into the phone.
> Something in the physical dimensions of the plug are such that it fits
> only into the IOIO.
>

The red cable has a USB micro A, and as I mentioned, some phones will not
accept it, but rather need a USB micro B even for operating as host. This
is against the USB standard, but very common in practice.


>
> My brother isn't using this cable, but he spliced together 2 male microUSB
> cables, so there is no preferred direction.
>

This is a rather bad idea. Specifically, this cable configuration doesn't
let either side know it is supposed to be a host. On the IOIO, you can work
around this problem by moving the switch to the "H" position (force host),
but you'll never be able to get the phone into host mode this way to test
what might be a solution to your problem.


> Perhaps you are talking about that cable I originally asked you about
> which splits 1 male into 2 female: one USB and one microUSB?
>
I suspect this too has a physical splicing of the wires so again there is
> no intrinsic direction?
>

If you buy what's called an "OTG cable" such as this

+
a standard USB A-to-micro-B cable and plug them together you'd get the
cable that you need, which can be used in either direction.


>
> My brother says that he can tell if the board is "working" because he gets
> a message asking something about the IOIO, permission of some sort.
> With the new phones (all of them), he sees no messages, no sign of life.
> If you can explain exactly what to test, I can have him give it a try.
>

First thing I would test is have the phone be the host, by using the cable
I described and flipping the direction. Otherwise, try following up with
the people on the bug, which claim they have a solution, they might be able
to send you a modified firmware image file that you can use.


>
> On my side, I am developing the software so I use Android Studio and the
> ioioBridge, where the IOIO is connected to the computer.
> Again, my phone is old (less than 2 years) and works just fine. It passes
> the USB OTG checker program as well.
>
> Thanks for all your help,
> Ilan
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: otg on the latest phones

2017-10-21 Thread Ytai Ben-Tsvi
I don't think there's necessarily a connection between this OTG checker and
whether or not the IOIO works on a given phone.
Seems like you haven't tried reversing the roles (i.e. running the IOIO as
a device), so might be worth a shot. This requires reversing the direction
of the cable that's between the IOIO and the phone. Sometimes those phones
will not have an AB receptacle, so you may need a little adapter cable,
often called an OTG adapter.
Lastly, I still think that the main reason you're seeing this issues has to
do with the bug I linked to earlier on this thread.

On Oct 20, 2017 21:33, "Ilan Tal" <ilan@gmail.com> wrote:

> Because of the distance between Haifa and London I can only tell you what
> my brother reports. He says the play store USB OTG checker doesn't install
> properly on the new phones, but works fine on old phones, reporting that
> they work properly.
> With my own 2 eyes, I saw a checker on my grandson's new phone. It seems
> to install but gives a message that the phone is incompatible - so it knows
> up front that something is "wrong" with the phone. There is no need to even
> attach the IOIO board for this test.
> There are a couple of versions of the USB OTG checker programs and both
> fail on new phones, and work on old phones. Naturally they are free and
> have ads.
>
> On Fri, Oct 20, 2017 at 11:54 PM, Ytai Ben-Tsvi <yta...@gmail.com> wrote:
>
>> Can you please explain the sentence "The play store USB OTG says the the
>> OTG isn't compatible"?
>>
>> On Oct 19, 2017 21:54, "Ilan Tal" <ilan@gmail.com> wrote:
>>
>>> Just to remove all doubt I asked my brother to try the auto mode. With
>>> the old phones, both of his boards work fine. With the new phones, the
>>> boards don't exist.
>>> When he plugs in the IOIO into the phone he gets a message indicating
>>> that the phone knows the IOIO is there. With the new phone, the phone will
>>> recognize charging but no IOIO.
>>> The play store USB OTG says the the OTG isn't compatible, so we can't
>>> ignore that.
>>> I was hoping that the splitter cable's claims to somehow magically add
>>> OTG, would work, but I see no magic.
>>>
>>> On Wednesday, October 18, 2017 at 9:48:40 PM UTC+3, Ytai wrote:
>>>>
>>>> I would recommend:
>>>>
>>>>1. Using the precompiled HelloIOIO for doing these tests (just to
>>>>rule out the possibility that you're building something wrong).
>>>>2. Trying either the IOIO as host or as device (which has to do
>>>>with with side of the cable goes into the IOIO and which one to the
>>>>Android). Make sure the switch on the IOIO is in the "A" (auto) mode.
>>>>
>>>>
>>>> On Tue, Oct 17, 2017 at 4:04 AM, Ilan Tal <ilan...@gmail.com> wrote:
>>>>
>>>>> I finally managed to understand your question. No, the phone is
>>>>> definitely controlling the IOIO and the IOIO is not the host.
>>>>> I used your looper to control the IOIO - staying as close as i could
>>>>> to your examples (Hello IOIO etc.)
>>>>>
>>>>> On Tuesday, October 17, 2017 at 7:35:17 AM UTC+3, Ytai wrote:
>>>>>>
>>>>>> I think you might be somewhat misusing the term OTG. USB OTG has to
>>>>>> do with the ability of a device to switch between being a host on the USB
>>>>>> bus to bring a device, based on which side of the cable it is connected 
>>>>>> to.
>>>>>> Since all phones used to be only devices, manufacturers started using the
>>>>>> term OTG to mean that their device can also be a host.
>>>>>> The IOIO worked with Android long before any phones had host mode, so
>>>>>> the lack of OTG support in itself is not a problem. Since it sounds like
>>>>>> from your description that you're using the IOIO as a host, it is more
>>>>>> likely that what you're seeing is a result of the bug I linked to rather
>>>>>> than lack of support.
>>>>>> Makes sense?
>>>>>>
>>>>>>
>>>>>> On Oct 16, 2017 21:28, "Ilan Tal" <ilan...@gmail.com> wrote:
>>>>>>
>>>>>> With the new phones your board simply doesn't exist under OTG.
>>>>>> Nothing we could do would give signs of life.
>>>>>> That is the contribution of the UTB OTG checker programs - they have
>>>>>> no co

Re: otg on the latest phones

2017-10-20 Thread Ytai Ben-Tsvi
Can you please explain the sentence "The play store USB OTG says the the
OTG isn't compatible"?

On Oct 19, 2017 21:54, "Ilan Tal"  wrote:

> Just to remove all doubt I asked my brother to try the auto mode. With the
> old phones, both of his boards work fine. With the new phones, the boards
> don't exist.
> When he plugs in the IOIO into the phone he gets a message indicating that
> the phone knows the IOIO is there. With the new phone, the phone will
> recognize charging but no IOIO.
> The play store USB OTG says the the OTG isn't compatible, so we can't
> ignore that.
> I was hoping that the splitter cable's claims to somehow magically add
> OTG, would work, but I see no magic.
>
> On Wednesday, October 18, 2017 at 9:48:40 PM UTC+3, Ytai wrote:
>>
>> I would recommend:
>>
>>1. Using the precompiled HelloIOIO for doing these tests (just to
>>rule out the possibility that you're building something wrong).
>>2. Trying either the IOIO as host or as device (which has to do with
>>with side of the cable goes into the IOIO and which one to the Android).
>>Make sure the switch on the IOIO is in the "A" (auto) mode.
>>
>>
>> On Tue, Oct 17, 2017 at 4:04 AM, Ilan Tal  wrote:
>>
>>> I finally managed to understand your question. No, the phone is
>>> definitely controlling the IOIO and the IOIO is not the host.
>>> I used your looper to control the IOIO - staying as close as i could to
>>> your examples (Hello IOIO etc.)
>>>
>>> On Tuesday, October 17, 2017 at 7:35:17 AM UTC+3, Ytai wrote:

 I think you might be somewhat misusing the term OTG. USB OTG has to do
 with the ability of a device to switch between being a host on the USB bus
 to bring a device, based on which side of the cable it is connected to.
 Since all phones used to be only devices, manufacturers started using the
 term OTG to mean that their device can also be a host.
 The IOIO worked with Android long before any phones had host mode, so
 the lack of OTG support in itself is not a problem. Since it sounds like
 from your description that you're using the IOIO as a host, it is more
 likely that what you're seeing is a result of the bug I linked to rather
 than lack of support.
 Makes sense?


 On Oct 16, 2017 21:28, "Ilan Tal"  wrote:

 With the new phones your board simply doesn't exist under OTG. Nothing
 we could do would give signs of life.
 That is the contribution of the UTB OTG checker programs - they have no
 connection to your board.
 All of these programs claim that OTG is dead, so big surprise that the
 phone can't see your board under OTG.


 On Tuesday, October 17, 2017 at 7:21:59 AM UTC+3, Ytai wrote:

> Is this the case for both directions? I.e. the IOIO as either host or
> device?
>
> On Oct 16, 2017 21:11, "Ilan Tal"  wrote:
>
>> Hi Yitai,
>> Unfortunately we have to accept the fact that phones less than about
>> 1 year old no longer support OTG.
>> Blue tooth is the only solution.
>> The cable I asked about does nothing.
>>
>> There are several programs to check USB OTG on the phone itself.
>> These are useful as an independent check, independent from your board.
>> Any of them will work on "old" phones but will fail on new phones,
>> indicating that the phone does not support OTG.
>> The cable is simply a red herring and contributes nothing.
>>
>> Too bad that the OTG technology came and went within 5 years, but
>> this seems to be the case.
>> So we will switch our system from OTG to blue tooth.
>>
>> Thanks,
>> Ilan
>>
>>
>> On Thursday, October 12, 2017 at 5:04:44 PM UTC+3, Ilan Tal wrote:
>>>
>>> I would like to ask about the IOIO OTG on the latest phones.
>>> To my amazement many of the latest phones no longer seem to support
>>> OTG.
>>> (What I see is that I can't make any connection with Hello IOIO.)
>>>
>>> There is a cable you can buy
>>> https://www.amazon.com/dp/B009YPYORM?tag=won00-20
>>> that seems to solve the problem, but I'd like some feedback.
>>>
>>> Ideally, this might work: plug the micro usb into the phone and then
>>> make a connection between one of the 2 male connectors to the IOIO.
>>> I don't know who has experience with this.
>>>
>>> If that fails perhaps another possibility is to plug the micro usb
>>> into the IOIO and use a male connector to blue tooth.
>>> This is using the cable as a simple pass through, but I might be
>>> able to use the other connector to supply 5 volts to the IOIO?
>>>
>>> Any suggestions?
>>> Thanks,
>>> Ilan
>>>
>>> --
>> You received this message because you are subscribed to the Google
>> Groups "ioio-users" group.
>> To unsubscribe from this group and stop receiving 

Re: otg on the latest phones

2017-10-16 Thread Ytai Ben-Tsvi
I think you might be somewhat misusing the term OTG. USB OTG has to do with
the ability of a device to switch between being a host on the USB bus to
bring a device, based on which side of the cable it is connected to. Since
all phones used to be only devices, manufacturers started using the term
OTG to mean that their device can also be a host.
The IOIO worked with Android long before any phones had host mode, so the
lack of OTG support in itself is not a problem. Since it sounds like from
your description that you're using the IOIO as a host, it is more likely
that what you're seeing is a result of the bug I linked to rather than lack
of support.
Makes sense?

On Oct 16, 2017 21:28, "Ilan Tal"  wrote:

With the new phones your board simply doesn't exist under OTG. Nothing we
could do would give signs of life.
That is the contribution of the UTB OTG checker programs - they have no
connection to your board.
All of these programs claim that OTG is dead, so big surprise that the
phone can't see your board under OTG.


On Tuesday, October 17, 2017 at 7:21:59 AM UTC+3, Ytai wrote:

> Is this the case for both directions? I.e. the IOIO as either host or
> device?
>
> On Oct 16, 2017 21:11, "Ilan Tal"  wrote:
>
>> Hi Yitai,
>> Unfortunately we have to accept the fact that phones less than about 1
>> year old no longer support OTG.
>> Blue tooth is the only solution.
>> The cable I asked about does nothing.
>>
>> There are several programs to check USB OTG on the phone itself. These
>> are useful as an independent check, independent from your board.
>> Any of them will work on "old" phones but will fail on new phones,
>> indicating that the phone does not support OTG.
>> The cable is simply a red herring and contributes nothing.
>>
>> Too bad that the OTG technology came and went within 5 years, but this
>> seems to be the case.
>> So we will switch our system from OTG to blue tooth.
>>
>> Thanks,
>> Ilan
>>
>>
>> On Thursday, October 12, 2017 at 5:04:44 PM UTC+3, Ilan Tal wrote:
>>>
>>> I would like to ask about the IOIO OTG on the latest phones.
>>> To my amazement many of the latest phones no longer seem to support OTG.
>>> (What I see is that I can't make any connection with Hello IOIO.)
>>>
>>> There is a cable you can buy
>>> https://www.amazon.com/dp/B009YPYORM?tag=won00-20
>>> that seems to solve the problem, but I'd like some feedback.
>>>
>>> Ideally, this might work: plug the micro usb into the phone and then
>>> make a connection between one of the 2 male connectors to the IOIO.
>>> I don't know who has experience with this.
>>>
>>> If that fails perhaps another possibility is to plug the micro usb into
>>> the IOIO and use a male connector to blue tooth.
>>> This is using the cable as a simple pass through, but I might be able to
>>> use the other connector to supply 5 volts to the IOIO?
>>>
>>> Any suggestions?
>>> Thanks,
>>> Ilan
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "ioio-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ioio-users+...@googlegroups.com.
>> To post to this group, send email to ioio-...@googlegroups.com.
>>
>> Visit this group at https://groups.google.com/group/ioio-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Issues connecting IOIO to bigger phone

2017-10-15 Thread Ytai Ben-Tsvi
The latest version (as of almost two years now) of the IOIO from SparkFun
and SeeedStudio has improved protection for the regulator.
If you want to bypass the on-board regulator, just feed 5v directly into
the 5v rail from an external regulator. Your damaged regulator might be
shorting the 5v rail so check that first, you may have to remove it.


On Oct 15, 2017 07:28, "kkannan"  wrote:

Hello IOIO users,

I've been struggling to use my Lenovo Phap 2 Pro with IOIO due to power
issues. My setup is IOIO is powered thru JST connector by an external
battery  about 11.5 v and under 15v. It works for a day or two and then
nothing, even if it is powered from wall adapter, but it works when
connected with the laptop USB.  So it is clear that the regulator is gone
for good.

I damaged two boards so far and decided to try the Arduino ADK board.
Surprisingly after a day it too stopped working, this time it was powered
from wall adapter all along. I could connect to USB port and upload from
laptop with no issues, but same as with IOIO its regulator is gone.

Lenovo p2p draws more current and it could be the reason behind the
failures. My question is can I power the phone using separate wires while
the data (+D & -D) connected to IOIO board? I am planning to use an
external regulator with higher rating.

Any pointers to solve this issue is highly appreciated.

Rgds
Kannan

-- 
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: otg on the latest phones

2017-10-12 Thread Ytai Ben-Tsvi
You won't be able to charge the phone if you're using the IOIO in device
mode, since it is always the host that supplies power to the device and not
the other way around. When you say "OTG" I'm assuming you mean that the
phone is the host and the IOIO is the device. Otherwise, I don't see a
reason why the phone wouldn't talk to the IOIO according to its specs.
Some people have found issues with the IOIO as host in OpenAccessory mode
which may be relevant to you: https://github.com/ytai/ioio/issues/119

Hope this helps!

On Thu, Oct 12, 2017 at 12:48 PM, Ilan Tal  wrote:

> The power on IOIO comes from Vin (7.5 volts). In fact the plan was to
> charge the phone via IOIO (certainly not mandatory, but nice).
> Put in an old phone, it works. Put in a new one and it doesn't.
> My old phone is ht17 with specs https://www.devicespecifications.com/en/
> model/dac33c05
> They put in the OTG as a feature.
> The new phone is ht87 with specs https://www.devicespecifications.com/en/
> model/9f8c41c3
> Now no mention of OTG as a feature.
> If it were one phone, OK, but it seems that the majority of new phones
> don't support OTG - which is a real pity.
>
> The cable seems like it might be filling the gap, but I'm not at all sure.
>
> On Thursday, October 12, 2017 at 9:35:07 PM UTC+3, Ytai wrote:
>>
>> If I had to guess I'd say that the problem is likely that those phones
>> only use the data lines of the USB cable, but do not feed power into the
>> device.
>> Have you tried simply powering the IOIO via the Vin plug or the Vin pins?
>>
>> On Thu, Oct 12, 2017 at 7:04 AM, Ilan Tal  wrote:
>>
>>> I would like to ask about the IOIO OTG on the latest phones.
>>> To my amazement many of the latest phones no longer seem to support OTG.
>>> (What I see is that I can't make any connection with Hello IOIO.)
>>>
>>> There is a cable you can buy
>>> https://www.amazon.com/dp/B009YPYORM?tag=won00-20
>>> that seems to solve the problem, but I'd like some feedback.
>>>
>>> Ideally, this might work: plug the micro usb into the phone and then
>>> make a connection between one of the 2 male connectors to the IOIO.
>>> I don't know who has experience with this.
>>>
>>> If that fails perhaps another possibility is to plug the micro usb into
>>> the IOIO and use a male connector to blue tooth.
>>> This is using the cable as a simple pass through, but I might be able to
>>> use the other connector to supply 5 volts to the IOIO?
>>>
>>> Any suggestions?
>>> Thanks,
>>> Ilan
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: I2C waitReady with timeout, I2C ping and async-processing

2017-10-04 Thread Ytai Ben-Tsvi
There are a few issues here, I hope I didn't forget anything.

   - Timeout: the approach I took with all blocking operations is that they
   all handle Thread.interrupt() correctly. This way, you can implement your
   timeout externally without having to change the IOIO library internals.
   Simply set a timer that will interrupt the current thread on your deadline
   and remember to cancel this timer if the operation succeeds.
   - Async API: can be implemented on top of the sync API by creating a
   thread per call or using a pool, etc. The risk you mentioned with a native
   async API (blocking the internal threads of the IOIO) is one of the reasons
   why I chose this route. The other is that synchronous code is generally a
   lot more straightforward. There's obviously a trade-off.
   - I don't know why writeRead with empty in/out buffers doesn't work. I
   agree that this is the preferred way to just check whether a device is on
   the bus or not. Do you happen to have a logic analyzer capture of what
   happens on the bus in this case?
   - As a side-note, I haven't been actively maintaining the code-base in a
   couple of years now and have no strong desire to do so. I'm happy to answer
   questions or engage in discussions, but just wanted to set your
   expectations as far as making changes per your request.

Cheers.

On Tue, Oct 3, 2017 at 12:57 PM, Et Dev  wrote:

> Hello Ytai,
>
> Great product - just love it!
>
> I am not sure if this is the right group to send this request, if not
> please guide. I am hoping to make a positive contribution to this community.
>
> I have used IOIO in past and have started using it for a pretty big
> project using some intricate hardware. I ran into problems for effectively
> using I2C devices and most of these were attributed to the fact that
> ioio.lib.api.TwiMaster.Result has a waitReady that blocks forever.  This is
> problematic esp. when the I2C slave's behavior is not always completely
> determistic - as is the case with many complex hardwares. The thread blocks
> forever and recovery logic becomes more complex than original operation
> esp. when monitoring multiple such devices. For now I had to resort to some
> pretty ugly work-arounds. However, a waitReady in Result that times out -
> would make an application developer's task a lot easier. So I have the
> following suggestion, which I would appreciate if you can please consider
> to make something similar to this available in your next API release.
>
> In ioio.lib.impl.ResourceLifeCycle, add the following method:
>
> protected synchronized void safeWait*(long millis)* throws 
> ConnectionLostException, InterruptedException {
>
>if (state_ == State.CLOSED) {
>   throw new InterruptedException("Resource closed");
>} else if (state_ == State.DISCONNECTED) {
>   throw new ConnectionLostException();
>}
>wait(*millis*);
> }
>
>
> In ioio.lib.api.TwiMaster.Result interface, add the following method:
>
> public boolean waitReady*(long millis)* throws ConnectionLostException,
>
>   InterruptedException;
>
>
> In ioio.lib.impl.TwiMasterImpl.TwiResult class, add the following method:
>
> @Override
> public synchronized boolean waitReady*(long millis)* throws 
> ConnectionLostException,
>   InterruptedException {
>checkState();
>while (!ready_) {
>   safeWait(*millis*);
>}
>return success_;
> }
>
>
> Another issue for working with I2C devices, I was not able to come up with
> a reliable solution to "ping" a I2C slave with IOIO master to determine if
> slave is indeed present. For example, connecting my I2C device to a
> bus-pirate, master can write an address of the slave on the bus and obtain
> an ACK and this would be an indication that a slave is indeed present at
> that address. My logic analyzer shows the same with this bus-pirate setup.
> However, I did not have any such luck making it work with IOIO's
> TwiMaster.writeRead. I tried writing a 0-byte buffer (with read null
> buffer) and reading 0-byte buffer (with write null buffer) but seems I dont
> get any results - calls simply block. I would appreciate any help in this
> regards.
>
> It would also help to obtain information on what was NACKed when
> writing+reading using TwiMaster.writeRead or TwiMaster.writeReadAsync returns
> false as currently, we have to split write and read into two separate
> invocations to know what failed esp. when error recovery depends on what
> failed.
>
> I was able to handle most trivial apps fairly easily with the current APIs
> and I like the synchronous API in its elegance and simplicity. I recognize
> this is a subjective viewpoint - however, when time-critical processing,
> reliability and performance are critical, it becomes harder to overcome the
> absence of asynchronous event handling paradigm in API esp for devices such
> as I2C, UART. User ends up dedicating a thread per item to operate and for
> complex apps, thread synchronization 

Re: weighing scale testing based on IOIO.

2017-09-20 Thread Ytai Ben-Tsvi
The "small MCU" option is along the line of putting something like an
Arduino between the IOIO and the sensor, which will translate the unusual
protocol of the sensor into something more standard, such as serial (UART).
That is, this middleman will constantly wait for samples from the HX711 and
as soon as one arrives, it will write the value on a serial output. The
IOIO can then read those values by listening for serial input, which is
easy.

Custom firmware means changing the inner workings of the IOIO and client
library so that it can talk to this specific sensor. The advantage is that
you're saving the middleman. However, it requires you to study the inner
workings of the IOIO, be comfortable in developing software for a PIC24
microcontroller, which can be quite a steep learning curve if you haven't
done this before.

On Tue, Sep 19, 2017 at 7:47 PM, Maximillian 
wrote:

> Can you give some hint for the "Custom Firmware" or the small MCU you
> talking about on your previous response?
>
> On Wednesday, September 20, 2017 at 9:43:57 AM UTC+7, Ytai wrote:
>>
>> See my previous response about your options
>>
>> On Sep 19, 2017 6:51 PM, "Maximillian"  wrote:
>>
>>> Hi Ytai,
>>>
>>>
>>> Thanks for reply and sorry for the confusion.
>>>
>>> I plan to use this weight sensor with IOIO
>>>
>>>
>>> 
>>>
>>> The item title is "(Load Cell) 20Kg + Driver HX711 24bit gain amplifier
>>> ADC Module"
>>>
>>> There is one illustration for connecting it to arduino
>>>
>>>
>>> 
>>>
>>> Based on this illustration, can I assume that I can just connect the
>>> load cell to the Driver, and connect the driver to the IOIO?
>>>
>>> Or I will need anything else? Maybe the "custom firmware" that you and
>>> Juan talking about.
>>>
>>> Thanks a lot.
>>>
>>>
>>> On Wednesday, September 20, 2017 at 5:26:52 AM UTC+7, Ytai wrote:

 I don't understand the question. Are you talking about not using the
 HX711 altogether or something else?
 From what I can tell, using the HX711 with the IOIO would inevitably
 require either custom firmware or some small MCU between the IOIO and HX711
 to act as an adapter.

 On Mon, Sep 18, 2017 at 11:23 PM, Maximillian 
 wrote:

> Hi Juan/Ytai,
>
> Can I just use the HX711 weight sensor + Driver HX711 24bit gain
> amplifier ADC Module
> and connect it to the analog input pin of IOIO, then read the value?
>
> Or I really need a "custom firmware" as you say?
>
> Please advise.
>
> Thanks.
>
>
> On Tuesday, March 8, 2016 at 10:41:25 AM UTC+7, Juan Carlos Contador
> wrote:
>>
>> why: I had the same problem that appears in this publication (
>> https://groups.google.com/forum/#!topic/ioio-users/t9xaSr8yZNI ). I
>> finally decided by the most elegant solution.
>>
>> How: First of all, it seemed I was too exaggerated change (or extend)
>> IOIO much of the code and java interfaces, only to support a particular
>> sensor. I found that the port used for logging was a good choice to 
>> output
>> sensor data. Then use this port for output, and this same signal is
>> forwarded to the next pin (put a jumper). On the Java side, I open the
>> latter for UART reading.
>> The data are collected from the sensor by a function located in
>> main.c, and sent along with the model of the connected load cell, which
>> then in the Java side will be used to configure and calibrate the scale
>> automatically.
>> Something I forgot ... on the wish list for future versions I think
>> we need a memory area for storing certain data like cookies (Java
>> interface: putInt (name, value), putString (name, value), etc. ... And 
>> then
>> ... support for WiFi adapters.
>>
>> greetings and thanks for your excellent work.
>>
>> (Sorry if something is not understood quite right, I use Google
>> translator)
>>
>> El lunes, 7 de marzo de 2016, 13:36:08 (UTC-3), Ytai escribió:
>>>
>>> That's awesome! Thanks for sharing. Nice job on the GUI too!
>>> Care to say a few words about your custom firmware, why and how?
>>>
>>> On Thu, Mar 3, 2016 at 10:12 PM, Juan Carlos Contador <
>>> bake...@gmail.com> wrote:
>>>
 hi, I mean that the IOIO board is the best way to make new
 accessories for android.

 I finally managed to connect a weight sensor ( hx711 ) with the
 IOIO , using a custom firmware , it reads the sensor only when a 
 device is
 

Re: weighing scale testing based on IOIO.

2017-09-19 Thread Ytai Ben-Tsvi
See my previous response about your options

On Sep 19, 2017 6:51 PM, "Maximillian"  wrote:

> Hi Ytai,
>
>
> Thanks for reply and sorry for the confusion.
>
> I plan to use this weight sensor with IOIO
>
>
> 
>
> The item title is "(Load Cell) 20Kg + Driver HX711 24bit gain amplifier
> ADC Module"
>
> There is one illustration for connecting it to arduino
>
>
> 
>
> Based on this illustration, can I assume that I can just connect the load
> cell to the Driver, and connect the driver to the IOIO?
>
> Or I will need anything else? Maybe the "custom firmware" that you and
> Juan talking about.
>
> Thanks a lot.
>
>
> On Wednesday, September 20, 2017 at 5:26:52 AM UTC+7, Ytai wrote:
>>
>> I don't understand the question. Are you talking about not using the
>> HX711 altogether or something else?
>> From what I can tell, using the HX711 with the IOIO would inevitably
>> require either custom firmware or some small MCU between the IOIO and HX711
>> to act as an adapter.
>>
>> On Mon, Sep 18, 2017 at 11:23 PM, Maximillian 
>> wrote:
>>
>>> Hi Juan/Ytai,
>>>
>>> Can I just use the HX711 weight sensor + Driver HX711 24bit gain
>>> amplifier ADC Module
>>> and connect it to the analog input pin of IOIO, then read the value?
>>>
>>> Or I really need a "custom firmware" as you say?
>>>
>>> Please advise.
>>>
>>> Thanks.
>>>
>>>
>>> On Tuesday, March 8, 2016 at 10:41:25 AM UTC+7, Juan Carlos Contador
>>> wrote:

 why: I had the same problem that appears in this publication (
 https://groups.google.com/forum/#!topic/ioio-users/t9xaSr8yZNI ). I
 finally decided by the most elegant solution.

 How: First of all, it seemed I was too exaggerated change (or extend)
 IOIO much of the code and java interfaces, only to support a particular
 sensor. I found that the port used for logging was a good choice to output
 sensor data. Then use this port for output, and this same signal is
 forwarded to the next pin (put a jumper). On the Java side, I open the
 latter for UART reading.
 The data are collected from the sensor by a function located in main.c,
 and sent along with the model of the connected load cell, which then in the
 Java side will be used to configure and calibrate the scale automatically.
 Something I forgot ... on the wish list for future versions I think we
 need a memory area for storing certain data like cookies (Java interface:
 putInt (name, value), putString (name, value), etc. ... And then ...
 support for WiFi adapters.

 greetings and thanks for your excellent work.

 (Sorry if something is not understood quite right, I use Google
 translator)

 El lunes, 7 de marzo de 2016, 13:36:08 (UTC-3), Ytai escribió:
>
> That's awesome! Thanks for sharing. Nice job on the GUI too!
> Care to say a few words about your custom firmware, why and how?
>
> On Thu, Mar 3, 2016 at 10:12 PM, Juan Carlos Contador <
> bake...@gmail.com> wrote:
>
>> hi, I mean that the IOIO board is the best way to make new
>> accessories for android.
>>
>> I finally managed to connect a weight sensor ( hx711 ) with the IOIO
>> , using a custom firmware , it reads the sensor only when a device is
>> connected to this.
>>
>> On the Java side , I made an application using IOIOLib and WebView .
>> This app exposes JavaScript interfaces, which are used by small mini 
>> -apps
>> that emulate different weight indicators used more commonly. These mini
>> -apps can be created on a website and be available immediately for 
>> testing .
>>
>> https://www.youtube.com/watch?v=i4qJ2Rk2740
>>
>> https://www.youtube.com/watch?v=Cawv5VZGuDY
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "ioio-users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to ioio-users+...@googlegroups.com.
>> To post to this group, send email to ioio-...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/ioio-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at 

Re: IOIO Thread Stuck

2017-09-06 Thread Ytai Ben-Tsvi
I'm assuming you're using OpenAccessory? It is not unlikely that there are
problems in this area, my impression is that this feature of Android was
poorly designed and even more poorly implemented in some cases. It is also
possibly that there's a bug somewhere in the IOIO code that interacts with
it.
Can you check the logs generated by running your failure case and attach
them?

On Tue, Sep 5, 2017 at 1:41 AM, Maximillian 
wrote:

> Hi,
>
> I have some issue in IOIOActivity.
>
> My Android app have several screen.
>
> First, user will enter the app to main screen.
>
> From main screen, user can tap a button to go to Transaction Screen.
>
> Transaction Screen uses TransactionActivity.
>
> TransactionActivity extend IOIOActivity.
>
> When I enter TransactionActivity, I get a toast connected to IOIO.
>
> When I press back, I get a toast disconnected from IOIO.
>
> Here is the problem, when I click the transaction button to enter
> transaction screen again,
> I can't connect to IOIO and didn't get any toast.
> The app freeze and I need to force close the app via task manager.
>
> When I start the app again, it works just like before, works for the 1st
> transaction, then freeze again for the 2nd transaction.
>
> This only happens when I connect my phone to IOIO using cable.
>
> When I use IOIOBridge to debug via PC, everything went smooth for the 2nd
> transaction afterward.
>
> So I kind of frustated cannot debug it.
>
> Can anybody tell me what I'm missing here?
>
> I believe just missed something silly here.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Pulse counter for hall sensor flow meter

2017-09-06 Thread Ytai Ben-Tsvi
The downside of your approach is that you cannot use scaling, so you'll be
bloating the bandwidth between the IOIO and the application 16x. Maybe not
a problem for the rates you're talking about. Removing the check just means
delete the block that says:

if (mode_ != PulseMode.POSITIVE && mode_ != PulseMode.NEGATIVE) {
  throw new IllegalStateException(
"Cannot wait for pulse when module was not opened in pulse
mode.");
   }


On Tue, Sep 5, 2017 at 6:46 PM, Maximillian 
wrote:

> Hi Ytai,
>
> I managed to use Mode.POSITIVE without scaling, and it seems working fine
> for now.
>
> I think I'll use it for now, since I'm not really sure how to "remove the
> mode check"
>
> Would you mind to take a look on my other issue?
> I posted it here:
> https://groups.google.com/forum/#!topic/ioio-users/38OThc8IJq0
>
> Thanks Ytai
> I really owe you a beer
>
> On Wednesday, September 6, 2017 at 12:42:01 AM UTC+7, Ytai wrote:
>>
>> Yeah, I see. Well, since you're going to be ignoring the value anyway,
>> you can simply remove the mode check.
>>
>> On Thu, Aug 31, 2017 at 6:32 PM, Maximillian 
>> wrote:
>>
>>> Hi Ytai,
>>>
>>> Sorry I think the logic is ok.
>>>
>>> It's just we cannot use *getDurationBuffered()* along with
>>> *PulseMode.FREQ_SCALE_16*,
>>> We can only use *getDurationBuffered()* when in *PulseMode.POSITIVE* or
>>> *PulseMode.NEGATIVE*.
>>>
>>> Then the question is, how to apply the scaling as you mentioned earlier?
>>>
>>> On Monday, August 28, 2017 at 11:15:05 AM UTC+7, Ytai wrote:

 You can use getDurationBuffered() and apply scaling (to reduce the
 pulse rate)

>>>
>>>
>>> On Friday, September 1, 2017 at 8:07:51 AM UTC+7, Maximillian wrote:
>>>
 Hi Ytai,

 Maybe the logic checking is wrong?

 IncapImpl.java line 108

 @Override
 public synchronized float getDurationBuffered() throws 
 InterruptedException,
   ConnectionLostException {
if (mode_ != PulseMode.POSITIVE && mode_ != PulseMode.NEGATIVE) {
   throw new IllegalStateException(
 "Cannot wait for pulse when module was not opened in pulse 
 mode.");
}
checkState();
while (pulseQueue_.isEmpty()) {
   safeWait();
}
return timeBase_ * pulseQueue_.remove();
 }


 Maybe we should change it to

 if (mode_ == PulseMode.POSITIVE || mode_ == PulseMode.NEGATIVE) {

 throw new IllegalStateException(
 "Cannot wait for pulse when module was not opened in pulse mode.");
 }


 if the mode is *PulseMode.POSITIVE* or *PulseMode.NEGATIVE* then we
 cannot wait for pulse.

 We need the PulseMode is either in *PulseMode.FREQ, 
 **PulseMode.FREQ_SCALE_4,
 OR **PulseMode.FREQ_SCALE_16* mode to use *getDurationBuffered()*

 Or maybe I miss something here?

 On Friday, September 1, 2017 at 7:46:31 AM UTC+7, Maximillian wrote:

> Hi Ytai,
>
> I got this exception
>
> E/IOIOBaseApplicationHelper: Unexpected exception caught:
> java.lang.IllegalStateException: Cannot wait for pulse when module
> was not opened in pulse mode.
> at ioio.lib.impl.IncapImpl.getDurationBuffered(IncapImpl.java:112)
> at ioio.test.activities.FillActivity$1.loop(FillActivity.java:328)
> at ioio.lib.util.IOIOBaseApplicationHelper$IOIOThread.run(IOIOB
> aseApplicationHelper.java:67)
>
> I have initialized the flowmeter like this:
>
> PulseInput flowMeter;
>
> //in the setup()
>
> flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, 
> PulseInput.PulseMode.FREQ_SCALE_16);
>
> //in the loop()
> float durationBuffered = flowMeter.getDurationBuffered();
> totalPulse += 16
>
>
> I don't get the exception when I use getFrequencySync(), but I'd like
> to you getDurationBuffered() as you suggested for more detailed count.
>
> Any suggestion?
>
> On Wednesday, August 30, 2017 at 2:02:57 PM UTC+7, Maximillian wrote:
>
>> I guess I'll just have to use getVoltage() then..
>>
>> Big thanks Ytai!
>>
>> You are a lifesaver! :)
>>
>> On Tuesday, August 29, 2017 at 11:31:16 PM UTC+7, Ytai wrote:
>>
>>> Analog samples get pushed from the IOIO to the Android at 1kHz (one
>>> sample every 1ms). So if you use getVoltage(), whatever sample you're
>>> getting is only a few milliseconds old (since there's some latency too).
>>> I'm guessing that for pH measurements this is completely insignificant. 
>>> The
>>> *Sync version is only interesting for example in case where you want to 
>>> set
>>> some output which affects the voltage you're measuring and then make 
>>> sure
>>> that the reading you're getting is one that was captured after the 
>>> output
>>> has been set. Doesn't seem relevant for your case.

Re: Pulse counter for hall sensor flow meter

2017-09-05 Thread Ytai Ben-Tsvi
Yeah, I see. Well, since you're going to be ignoring the value anyway, you
can simply remove the mode check.

On Thu, Aug 31, 2017 at 6:32 PM, Maximillian 
wrote:

> Hi Ytai,
>
> Sorry I think the logic is ok.
>
> It's just we cannot use *getDurationBuffered()* along with
> *PulseMode.FREQ_SCALE_16*,
> We can only use *getDurationBuffered()* when in *PulseMode.POSITIVE* or
> *PulseMode.NEGATIVE*.
>
> Then the question is, how to apply the scaling as you mentioned earlier?
>
> On Monday, August 28, 2017 at 11:15:05 AM UTC+7, Ytai wrote:
>>
>> You can use getDurationBuffered() and apply scaling (to reduce the pulse
>> rate)
>>
>
>
> On Friday, September 1, 2017 at 8:07:51 AM UTC+7, Maximillian wrote:
>
>> Hi Ytai,
>>
>> Maybe the logic checking is wrong?
>>
>> IncapImpl.java line 108
>>
>> @Override
>> public synchronized float getDurationBuffered() throws InterruptedException,
>>   ConnectionLostException {
>>if (mode_ != PulseMode.POSITIVE && mode_ != PulseMode.NEGATIVE) {
>>   throw new IllegalStateException(
>> "Cannot wait for pulse when module was not opened in pulse 
>> mode.");
>>}
>>checkState();
>>while (pulseQueue_.isEmpty()) {
>>   safeWait();
>>}
>>return timeBase_ * pulseQueue_.remove();
>> }
>>
>>
>> Maybe we should change it to
>>
>> if (mode_ == PulseMode.POSITIVE || mode_ == PulseMode.NEGATIVE) {
>>
>> throw new IllegalStateException(
>> "Cannot wait for pulse when module was not opened in pulse mode.");
>> }
>>
>>
>> if the mode is *PulseMode.POSITIVE* or *PulseMode.NEGATIVE* then we
>> cannot wait for pulse.
>>
>> We need the PulseMode is either in *PulseMode.FREQ, **PulseMode.FREQ_SCALE_4,
>> OR **PulseMode.FREQ_SCALE_16* mode to use *getDurationBuffered()*
>>
>> Or maybe I miss something here?
>>
>> On Friday, September 1, 2017 at 7:46:31 AM UTC+7, Maximillian wrote:
>>
>>> Hi Ytai,
>>>
>>> I got this exception
>>>
>>> E/IOIOBaseApplicationHelper: Unexpected exception caught:
>>> java.lang.IllegalStateException: Cannot wait for pulse when module was
>>> not opened in pulse mode.
>>> at ioio.lib.impl.IncapImpl.getDurationBuffered(IncapImpl.java:112)
>>> at ioio.test.activities.FillActivity$1.loop(FillActivity.java:328)
>>> at ioio.lib.util.IOIOBaseApplicationHelper$IOIOThread.run(IOIOB
>>> aseApplicationHelper.java:67)
>>>
>>> I have initialized the flowmeter like this:
>>>
>>> PulseInput flowMeter;
>>>
>>> //in the setup()
>>>
>>> flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, 
>>> PulseInput.PulseMode.FREQ_SCALE_16);
>>>
>>> //in the loop()
>>> float durationBuffered = flowMeter.getDurationBuffered();
>>> totalPulse += 16
>>>
>>>
>>> I don't get the exception when I use getFrequencySync(), but I'd like to
>>> you getDurationBuffered() as you suggested for more detailed count.
>>>
>>> Any suggestion?
>>>
>>> On Wednesday, August 30, 2017 at 2:02:57 PM UTC+7, Maximillian wrote:
>>>
 I guess I'll just have to use getVoltage() then..

 Big thanks Ytai!

 You are a lifesaver! :)

 On Tuesday, August 29, 2017 at 11:31:16 PM UTC+7, Ytai wrote:

> Analog samples get pushed from the IOIO to the Android at 1kHz (one
> sample every 1ms). So if you use getVoltage(), whatever sample you're
> getting is only a few milliseconds old (since there's some latency too).
> I'm guessing that for pH measurements this is completely insignificant. 
> The
> *Sync version is only interesting for example in case where you want to 
> set
> some output which affects the voltage you're measuring and then make sure
> that the reading you're getting is one that was captured after the output
> has been set. Doesn't seem relevant for your case.
>
> On Tue, Aug 29, 2017 at 12:17 AM, Maximillian 
> wrote:
>
>> Hi Ytai,
>>
>> I'd like to have the pulse counting to be as accurrate as possible.
>>
>> I'm not really sure about the difference of getVoltageSync() and
>> getVoltage().
>>
>> But when I use the *sync method, the method block until new sample
>> arrive right?
>>
>> I don't mind if i lost a few pH input.
>>
>> So in order to achieve that goal, would it be better if I use
>> getVoltage() rather than getVoltageSync()?
>> Or maybe I should try another method?
>>
>> Many thanks
>>
>>
>> On Tuesday, August 29, 2017 at 1:17:37 PM UTC+7, Ytai wrote:
>>
>>> I don't think there's a lot of value in using the *Sync version.
>>> Otherwise it's fine, as long as you don't mind that the sample rate 
>>> varies
>>> with the flow rate. Otherwise, create a separate thread for one or the
>>> other.
>>>
>>> On Aug 28, 2017 18:21, "Maximillian"  wrote:
>>>
 Thanks a lot Ytai.

 One more thing.

 I plan to use pH sensor along with this flow sensor.

 

Re: Pulse counter for hall sensor flow meter

2017-08-29 Thread Ytai Ben-Tsvi
Analog samples get pushed from the IOIO to the Android at 1kHz (one sample
every 1ms). So if you use getVoltage(), whatever sample you're getting is
only a few milliseconds old (since there's some latency too). I'm guessing
that for pH measurements this is completely insignificant. The *Sync
version is only interesting for example in case where you want to set some
output which affects the voltage you're measuring and then make sure that
the reading you're getting is one that was captured after the output has
been set. Doesn't seem relevant for your case.

On Tue, Aug 29, 2017 at 12:17 AM, Maximillian 
wrote:

> Hi Ytai,
>
> I'd like to have the pulse counting to be as accurrate as possible.
>
> I'm not really sure about the difference of getVoltageSync() and
> getVoltage().
>
> But when I use the *sync method, the method block until new sample arrive
> right?
>
> I don't mind if i lost a few pH input.
>
> So in order to achieve that goal, would it be better if I use getVoltage()
> rather than getVoltageSync()?
> Or maybe I should try another method?
>
> Many thanks
>
>
> On Tuesday, August 29, 2017 at 1:17:37 PM UTC+7, Ytai wrote:
>>
>> I don't think there's a lot of value in using the *Sync version.
>> Otherwise it's fine, as long as you don't mind that the sample rate varies
>> with the flow rate. Otherwise, create a separate thread for one or the
>> other.
>>
>> On Aug 28, 2017 18:21, "Maximillian"  wrote:
>>
>>> Thanks a lot Ytai.
>>>
>>> One more thing.
>>>
>>> I plan to use pH sensor along with this flow sensor.
>>>
>>> more or less it will be like this:
>>>
>>> PulseInput flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, PulseInput.
>>> PulseMode.FREQ_SCALE_16); //using frequency measurement with 16x scaling
>>> AnalogInput phMeter = ioio_.openAnalogInput(PH_METER_PIN);
>>>
>>>
>>> float phVolt;
>>>
>>> int totalPulse = 0; //set initial value of totalPulse
>>>
>>> (this is inside the loop)
>>>
>>> {
>>>
>>> duration = flowMeter.getDurationBuffered(); //the loop will wait here 
>>> for 16 pulse then continue to next line
>>>
>>> totalPulse += 16; //add total pulse by 16 because we use FREQ_SCALE_16
>>>
>>> 
>>> phVolt = phMeter.getVoltageSync();
>>> phValue = calculatePhFromVolt(phVolt);
>>>
>>> 
>>>
>>> }
>>>
>>>
>>> I think the phMeter will always has a value to return and will not block
>>> the UI.
>>>
>>> Would it be an issue if combined with the PulseInput.getDurationBuffered
>>> ()?
>>>
>>> Thanks.
>>>
>>> On Monday, August 28, 2017 at 9:03:16 PM UTC+7, Ytai wrote:

 Yup, that's what I meant. And you don't need the sleep.

 On Aug 28, 2017 1:21 AM, "Maximillian"  wrote:

> Hi Ytai, thanks for the reply,
>
> Based from your suggestion,
>
> PulseInput flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, 
> PulseInput.PulseMode.FREQ_SCALE_16); //using frequency measurement with 
> 16x scaling
>
>
> int totalPulse = 0; //set initial value of totalPulse
>
> (this is inside the loop)
>
> {
>
> duration = flowMeter.getDurationBuffered(); //the loop will wait here 
> for 16 pulse then continue to next line
>
> totalPulse += 16; //add total pulse by 16 because we use FREQ_SCALE_16
>
> 
>
> 
>
> Thread.sleep(100);
>
> }
>
>
> Do you mean like this?
>
> And also, do I still need the Thread.sleep(100)? As the
> getDurationBuffered() will do pause the loop while waiting for 16
> pulse to come.
>
> Thanks
>
>
> do I still need to use Thread.sleep(100) when using this
> implementation? Since getDurationBuffered will do pausing the loop
> waiting for 16 pulse to come.
>
> On Monday, August 28, 2017 at 11:15:05 AM UTC+7, Ytai wrote:
>>
>> You can use getDurationBuffered() and apply scaling (to reduce the
>> pulse rate). This will ensure you don't miss any pulses. You can even
>> ignore the actual value returned, since you don't seem to care about the
>> rate, but rather about the count. Each time getDurationBuffered() 
>> returns,
>> it would mean that 16 pulses (or whatever your scaling is) were observed.
>> So you'll end up with a somewhat cumbersome, yet accurate way to count 
>> your
>> pulses.
>>
>> On Wed, Aug 23, 2017 at 7:39 PM, Maximillian 
>> wrote:
>>
>>> Fyi, I use this sensor.
>>> https://www.seeedstudio.com/Water-Flow-Sensor-YF-B1-p-2878.html
>>>
>>>
>>> On Thursday, August 24, 2017 at 9:38:08 AM UTC+7, Maximillian wrote:

 I think I could get around ~40 pulse per each call of flowMeter.
 getFrequencySync() in a Thread.sleep(100) loop.

 Is it still unsafe to just use the getFrequencySync() method for
 that amount of pulse?


Re: Pulse counter for hall sensor flow meter

2017-08-29 Thread Ytai Ben-Tsvi
I don't think there's a lot of value in using the *Sync version. Otherwise
it's fine, as long as you don't mind that the sample rate varies with the
flow rate. Otherwise, create a separate thread for one or the other.

On Aug 28, 2017 18:21, "Maximillian"  wrote:

> Thanks a lot Ytai.
>
> One more thing.
>
> I plan to use pH sensor along with this flow sensor.
>
> more or less it will be like this:
>
> PulseInput flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, PulseInput.
> PulseMode.FREQ_SCALE_16); //using frequency measurement with 16x scaling
> AnalogInput phMeter = ioio_.openAnalogInput(PH_METER_PIN);
>
>
> float phVolt;
>
> int totalPulse = 0; //set initial value of totalPulse
>
> (this is inside the loop)
>
> {
>
> duration = flowMeter.getDurationBuffered(); //the loop will wait here for 
> 16 pulse then continue to next line
>
> totalPulse += 16; //add total pulse by 16 because we use FREQ_SCALE_16
>
> 
> phVolt = phMeter.getVoltageSync();
> phValue = calculatePhFromVolt(phVolt);
>
> 
>
> }
>
>
> I think the phMeter will always has a value to return and will not block
> the UI.
>
> Would it be an issue if combined with the PulseInput.getDurationBuffered()
> ?
>
> Thanks.
>
> On Monday, August 28, 2017 at 9:03:16 PM UTC+7, Ytai wrote:
>>
>> Yup, that's what I meant. And you don't need the sleep.
>>
>> On Aug 28, 2017 1:21 AM, "Maximillian"  wrote:
>>
>>> Hi Ytai, thanks for the reply,
>>>
>>> Based from your suggestion,
>>>
>>> PulseInput flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, 
>>> PulseInput.PulseMode.FREQ_SCALE_16); //using frequency measurement with 16x 
>>> scaling
>>>
>>>
>>> int totalPulse = 0; //set initial value of totalPulse
>>>
>>> (this is inside the loop)
>>>
>>> {
>>>
>>> duration = flowMeter.getDurationBuffered(); //the loop will wait here 
>>> for 16 pulse then continue to next line
>>>
>>> totalPulse += 16; //add total pulse by 16 because we use FREQ_SCALE_16
>>>
>>> 
>>>
>>> 
>>>
>>> Thread.sleep(100);
>>>
>>> }
>>>
>>>
>>> Do you mean like this?
>>>
>>> And also, do I still need the Thread.sleep(100)? As the
>>> getDurationBuffered() will do pause the loop while waiting for 16 pulse
>>> to come.
>>>
>>> Thanks
>>>
>>>
>>> do I still need to use Thread.sleep(100) when using this
>>> implementation? Since getDurationBuffered will do pausing the loop
>>> waiting for 16 pulse to come.
>>>
>>> On Monday, August 28, 2017 at 11:15:05 AM UTC+7, Ytai wrote:

 You can use getDurationBuffered() and apply scaling (to reduce the
 pulse rate). This will ensure you don't miss any pulses. You can even
 ignore the actual value returned, since you don't seem to care about the
 rate, but rather about the count. Each time getDurationBuffered() returns,
 it would mean that 16 pulses (or whatever your scaling is) were observed.
 So you'll end up with a somewhat cumbersome, yet accurate way to count your
 pulses.

 On Wed, Aug 23, 2017 at 7:39 PM, Maximillian 
 wrote:

> Fyi, I use this sensor.
> https://www.seeedstudio.com/Water-Flow-Sensor-YF-B1-p-2878.html
>
>
> On Thursday, August 24, 2017 at 9:38:08 AM UTC+7, Maximillian wrote:
>>
>> I think I could get around ~40 pulse per each call of flowMeter.
>> getFrequencySync() in a Thread.sleep(100) loop.
>>
>> Is it still unsafe to just use the getFrequencySync() method for
>> that amount of pulse?
>>
>> Or maybe I can just lower the sleep time to maybe Thread.sleep(50)
>> for better accuracy?
>>
>> Thanks for the hint, I'll try to look into that.
>>
>>
>> On Thursday, August 24, 2017 at 6:18:52 AM UTC+7, Ytai wrote:
>>>
>>> What's the maximum pulse rate for your application?
>>>
>>> On Wed, Aug 23, 2017 at 3:36 PM, Maximillian 
>>> wrote:
>>>
 Can you give more hint about how to count?

 I'm not really sure how to do it.

 Big thanks

 On Wednesday, August 23, 2017 at 11:56:20 PM UTC+7, Ytai wrote:
>
> Sampling the frequency and integrating will give you an estimate
> of the total. If it's not accurate enough, you'll need to count.
>
> On Aug 22, 2017 2:51 PM, "Maximillian" 
> wrote:
>
>> Hi Ytai,
>>
>> This is my current code (trimmed for this post)
>>
>>
>> int FLOW_METER_PIN = 14;
>>
>> volatile float pulseFreq, totalPulse;
>>
>> PulseInput flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, 
>> PulseInput.PulseMode.FREQ);
>>
>>
>> totalPulse = 0;
>>
>> public void loop() throws ConnectionLostException, 
>> InterruptedException
>> {
>>
>> pulseFreq = 

Re: Pulse counter for hall sensor flow meter

2017-08-23 Thread Ytai Ben-Tsvi
Here's a hint:
https://groups.google.com/forum/#!msg/ioio-users/SE-I_iSCdYs/bLehlYJWDvQJ

On Wed, Aug 23, 2017 at 4:18 PM, Ytai Ben-Tsvi <yta...@gmail.com> wrote:

> What's the maximum pulse rate for your application?
>
> On Wed, Aug 23, 2017 at 3:36 PM, Maximillian <felix.c.sapu...@gmail.com>
> wrote:
>
>> Can you give more hint about how to count?
>>
>> I'm not really sure how to do it.
>>
>> Big thanks
>>
>> On Wednesday, August 23, 2017 at 11:56:20 PM UTC+7, Ytai wrote:
>>>
>>> Sampling the frequency and integrating will give you an estimate of the
>>> total. If it's not accurate enough, you'll need to count.
>>>
>>> On Aug 22, 2017 2:51 PM, "Maximillian" <felix.c...@gmail.com> wrote:
>>>
>>>> Hi Ytai,
>>>>
>>>> This is my current code (trimmed for this post)
>>>>
>>>>
>>>> int FLOW_METER_PIN = 14;
>>>>
>>>> volatile float pulseFreq, totalPulse;
>>>>
>>>> PulseInput flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, 
>>>> PulseInput.PulseMode.FREQ);
>>>>
>>>>
>>>> totalPulse = 0;
>>>>
>>>> public void loop() throws ConnectionLostException, InterruptedException
>>>> {
>>>>
>>>> pulseFreq = flowMeter.getFrequencySync();
>>>> totalPulse += pulseFreq;
>>>> //display totalPulse value to a textView;
>>>>
>>>> Thread.sleep(100);
>>>> }
>>>>
>>>>
>>>> Current behavior is already as I expected, the totalPulse textView will
>>>> updated only when the hall sensor is spinning (flow detected)
>>>>
>>>> If I use the getFrequencySync() method, I think the loop is paused,
>>>> waiting the flowMeter to receive input.
>>>>
>>>> If it received input, the totalPulse will increase by the amount of
>>>> pulseFreq from getFrequencySync().
>>>>
>>>> I haven't tested with real water yet (I just blow the flow sensor to
>>>> make the hall spin for early development test)
>>>>
>>>> My question, is it correct to use this approach with the
>>>> getFrequencySync() method?
>>>> Or I still need to hack the DigitalInputImpl to count the pulses?
>>>>
>>>> Thanks
>>>>
>>>> On Wednesday, August 23, 2017 at 4:18:28 AM UTC+7, Ytai wrote:
>>>>>
>>>>> It is known, but there isn't currently a plan to add it. If anyone
>>>>> wants to contribute a patch, I will happily consider adopting it.
>>>>>
>>>>> On Aug 13, 2017 8:21 PM, "Maximillian" <felix.c...@gmail.com> wrote:
>>>>>
>>>>>> Is this still a known missing feature? As this post is from 2013.. I
>>>>>> need to use flow sensor as well..
>>>>>>
>>>>>> On Monday, September 9, 2013 at 10:31:46 AM UTC+7, Ytai wrote:
>>>>>>>
>>>>>>> This is known missing feature. You can work around this by hacking
>>>>>>> DigitalInputImpl to count the pulses: its setValue() method will get 
>>>>>>> called
>>>>>>> on every edge.
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Sep 6, 2013 at 11:21 AM, jorge sb <jsbri...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi. I want to connect a hall sensor flow meter to ioio.
>>>>>>>> Perhaps, I could use "PulseInput" but after reading ioio-wiki, I
>>>>>>>> see that I can't do it with it.
>>>>>>>> Really, I need a simple pulse counter but without loosing any pulse.
>>>>>>>> With flow meter I will like to get:
>>>>>>>> - Total liquid flow (accumulated countered pulses)
>>>>>>>> - Instant flow (reading difference between two counts in a measured
>>>>>>>> time).
>>>>>>>>
>>>>>>>> With this sensor I could get a pulse every 50 msec or less at max
>>>>>>>> rate.
>>>>>>>> I think I could loose pulses doing periodic read of digital input.
>>>>>>>>
>>>>>>>> Some suggestion.
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>>
>>

Re: Pulse counter for hall sensor flow meter

2017-08-23 Thread Ytai Ben-Tsvi
What's the maximum pulse rate for your application?

On Wed, Aug 23, 2017 at 3:36 PM, Maximillian 
wrote:

> Can you give more hint about how to count?
>
> I'm not really sure how to do it.
>
> Big thanks
>
> On Wednesday, August 23, 2017 at 11:56:20 PM UTC+7, Ytai wrote:
>>
>> Sampling the frequency and integrating will give you an estimate of the
>> total. If it's not accurate enough, you'll need to count.
>>
>> On Aug 22, 2017 2:51 PM, "Maximillian"  wrote:
>>
>>> Hi Ytai,
>>>
>>> This is my current code (trimmed for this post)
>>>
>>>
>>> int FLOW_METER_PIN = 14;
>>>
>>> volatile float pulseFreq, totalPulse;
>>>
>>> PulseInput flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, 
>>> PulseInput.PulseMode.FREQ);
>>>
>>>
>>> totalPulse = 0;
>>>
>>> public void loop() throws ConnectionLostException, InterruptedException
>>> {
>>>
>>> pulseFreq = flowMeter.getFrequencySync();
>>> totalPulse += pulseFreq;
>>> //display totalPulse value to a textView;
>>>
>>> Thread.sleep(100);
>>> }
>>>
>>>
>>> Current behavior is already as I expected, the totalPulse textView will
>>> updated only when the hall sensor is spinning (flow detected)
>>>
>>> If I use the getFrequencySync() method, I think the loop is paused,
>>> waiting the flowMeter to receive input.
>>>
>>> If it received input, the totalPulse will increase by the amount of
>>> pulseFreq from getFrequencySync().
>>>
>>> I haven't tested with real water yet (I just blow the flow sensor to
>>> make the hall spin for early development test)
>>>
>>> My question, is it correct to use this approach with the
>>> getFrequencySync() method?
>>> Or I still need to hack the DigitalInputImpl to count the pulses?
>>>
>>> Thanks
>>>
>>> On Wednesday, August 23, 2017 at 4:18:28 AM UTC+7, Ytai wrote:

 It is known, but there isn't currently a plan to add it. If anyone
 wants to contribute a patch, I will happily consider adopting it.

 On Aug 13, 2017 8:21 PM, "Maximillian"  wrote:

> Is this still a known missing feature? As this post is from 2013.. I
> need to use flow sensor as well..
>
> On Monday, September 9, 2013 at 10:31:46 AM UTC+7, Ytai wrote:
>>
>> This is known missing feature. You can work around this by hacking
>> DigitalInputImpl to count the pulses: its setValue() method will get 
>> called
>> on every edge.
>>
>>
>> On Fri, Sep 6, 2013 at 11:21 AM, jorge sb  wrote:
>>
>>> Hi. I want to connect a hall sensor flow meter to ioio.
>>> Perhaps, I could use "PulseInput" but after reading ioio-wiki, I see
>>> that I can't do it with it.
>>> Really, I need a simple pulse counter but without loosing any pulse.
>>> With flow meter I will like to get:
>>> - Total liquid flow (accumulated countered pulses)
>>> - Instant flow (reading difference between two counts in a measured
>>> time).
>>>
>>> With this sensor I could get a pulse every 50 msec or less at max
>>> rate.
>>> I think I could loose pulses doing periodic read of digital input.
>>>
>>> Some suggestion.
>>> Thanks.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>> --
> You received this message because you are subscribed to the Google
> Groups "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ioio-users+...@googlegroups.com.
> To post to this group, send email to ioio-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>
 --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit 

Re: Avoid Open Accessory Popup

2017-08-23 Thread Ytai Ben-Tsvi
If I understand correctly, what you're seeing is typical to forgetting to
include the intent filters in the manifest, such as here:
https://github.com/ytai/ioio/blob/master/software/applications/HelloIOIO/src/main/AndroidManifest.xml#L8

On Fri, Aug 18, 2017 at 6:46 AM, 'Marcel Brandenburg' via ioio-users <
ioio-users@googlegroups.com> wrote:

> Hey,
>
> i use the IOIO Board with the Galaxy S6 and Android 7.0.
> i include  the IOIOLibCore, IOIOLibAndroid and IOIOLibAndroidAccessory to
> my Project.
>
> With the USB Debugging *OFF* i have all the functions i want to use. But
> one Problem: The Popup when i plug in the cable, where i can go to a
> Website and the USB Accessory Permission popup. Can I Avoid this 2 popups ?
>
> Thanks for your help
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Pulse counter for hall sensor flow meter

2017-08-23 Thread Ytai Ben-Tsvi
Sampling the frequency and integrating will give you an estimate of the
total. If it's not accurate enough, you'll need to count.

On Aug 22, 2017 2:51 PM, "Maximillian"  wrote:

> Hi Ytai,
>
> This is my current code (trimmed for this post)
>
>
> int FLOW_METER_PIN = 14;
>
> volatile float pulseFreq, totalPulse;
>
> PulseInput flowMeter = ioio_.openPulseInput(FLOW_METER_PIN, 
> PulseInput.PulseMode.FREQ);
>
>
> totalPulse = 0;
>
> public void loop() throws ConnectionLostException, InterruptedException
> {
>
> pulseFreq = flowMeter.getFrequencySync();
> totalPulse += pulseFreq;
> //display totalPulse value to a textView;
>
> Thread.sleep(100);
> }
>
>
> Current behavior is already as I expected, the totalPulse textView will
> updated only when the hall sensor is spinning (flow detected)
>
> If I use the getFrequencySync() method, I think the loop is paused,
> waiting the flowMeter to receive input.
>
> If it received input, the totalPulse will increase by the amount of
> pulseFreq from getFrequencySync().
>
> I haven't tested with real water yet (I just blow the flow sensor to make
> the hall spin for early development test)
>
> My question, is it correct to use this approach with the
> getFrequencySync() method?
> Or I still need to hack the DigitalInputImpl to count the pulses?
>
> Thanks
>
> On Wednesday, August 23, 2017 at 4:18:28 AM UTC+7, Ytai wrote:
>>
>> It is known, but there isn't currently a plan to add it. If anyone wants
>> to contribute a patch, I will happily consider adopting it.
>>
>> On Aug 13, 2017 8:21 PM, "Maximillian"  wrote:
>>
>>> Is this still a known missing feature? As this post is from 2013.. I
>>> need to use flow sensor as well..
>>>
>>> On Monday, September 9, 2013 at 10:31:46 AM UTC+7, Ytai wrote:

 This is known missing feature. You can work around this by hacking
 DigitalInputImpl to count the pulses: its setValue() method will get called
 on every edge.


 On Fri, Sep 6, 2013 at 11:21 AM, jorge sb  wrote:

> Hi. I want to connect a hall sensor flow meter to ioio.
> Perhaps, I could use "PulseInput" but after reading ioio-wiki, I see
> that I can't do it with it.
> Really, I need a simple pulse counter but without loosing any pulse.
> With flow meter I will like to get:
> - Total liquid flow (accumulated countered pulses)
> - Instant flow (reading difference between two counts in a measured
> time).
>
> With this sensor I could get a pulse every 50 msec or less at max rate.
> I think I could loose pulses doing periodic read of digital input.
>
> Some suggestion.
> Thanks.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ioio-users+...@googlegroups.com.
> To post to this group, send email to ioio-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

 --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Pulse counter for hall sensor flow meter

2017-08-22 Thread Ytai Ben-Tsvi
It is known, but there isn't currently a plan to add it. If anyone wants to
contribute a patch, I will happily consider adopting it.

On Aug 13, 2017 8:21 PM, "Maximillian"  wrote:

> Is this still a known missing feature? As this post is from 2013.. I need
> to use flow sensor as well..
>
> On Monday, September 9, 2013 at 10:31:46 AM UTC+7, Ytai wrote:
>>
>> This is known missing feature. You can work around this by hacking
>> DigitalInputImpl to count the pulses: its setValue() method will get called
>> on every edge.
>>
>>
>> On Fri, Sep 6, 2013 at 11:21 AM, jorge sb  wrote:
>>
>>> Hi. I want to connect a hall sensor flow meter to ioio.
>>> Perhaps, I could use "PulseInput" but after reading ioio-wiki, I see
>>> that I can't do it with it.
>>> Really, I need a simple pulse counter but without loosing any pulse.
>>> With flow meter I will like to get:
>>> - Total liquid flow (accumulated countered pulses)
>>> - Instant flow (reading difference between two counts in a measured
>>> time).
>>>
>>> With this sensor I could get a pulse every 50 msec or less at max rate.
>>> I think I could loose pulses doing periodic read of digital input.
>>>
>>> Some suggestion.
>>> Thanks.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Inconsistent data - IOIO damaged?

2017-08-22 Thread Ytai Ben-Tsvi
There could possibly be intermittent shorts to ground that would explain
that. Otherwise, I'm not aware of anything more obvious that would explain
that behavior.

On Aug 19, 2017 2:18 PM, "JP"  wrote:

> Hi Ytai!
>
> The IOIO V1 board I'm using for my anemometer probably took a blow when
> some punks broke into our club house (I found the box on the floor with
> shattered glas from the window in it and the Android phone was gone).
>
> I have replaced the missing Android phone with a Nexus 4 running Android
> 4.4.4 and updated the app to use AOA instead of ADB.
>
> I'm getting some strange and inconsistent behavior. Both the digital input
> for wind speed and analog input for wind direction return zero every now
> and then. This happens when both should return non-zero values. Sometimes
> both at the same time and sometimes only one of them. Sometimes only one
> sample and sometimes several samples in a row.
>
> I haven't changed anything in my app concerning the measurement of data
> and calls to the IOIO API and the inconsistent data are not systematic so I
> reckon it's not a software problem (not in the app at least).
>
> Do you think that the board or PIC could be damaged in such a way that
> this could happen?
>
> Best regards,
> JP
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Analog Input gives positive and negative voltage

2017-08-09 Thread Ytai Ben-Tsvi
I don't think the probe actually emits negative voltage. I think the table
is an example with voltages relative to some offset that the next section
describes how to measure. Essentially, you're doing a 2-parameter
calibration.
If you're unsure, connect a voltmeter to the sensor before connecting it to
the IOIO.

On Aug 8, 2017 9:11 PM, "Maximillian"  wrote:

Hi All,

I need to read pH using this product

https://www.dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161).

I found this table on the description:
[image: Ph-mv.jpg]

The table said that it will give negative voltage (0.00 mV to -414.12 mV)
for pH value 7-14..

I've been searching through this group, I think I found that I should not
feed IOIO analog input pin with negative value (only 0v - 3.3v CMIIW).

I'm not really experienced with electicity, so any suggestion is really a
big help.

Is there any solution for the negative value?

Maybe using another componen to convert flip it to positive,

or offset the voltage to be positive since it only have around 828mV range
(-414.42 mv to +414.42 mV). So maybe I can just set the 7pH from 0V to
maybe 2V, then the lowest voltage will only be 2V - 414.42mV, and the
highest voltage will only be 2V + 414.42mV

or any better/proper solution?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Insufficient charging current issue

2017-08-02 Thread Ytai Ben-Tsvi
I don't know that there's anything that can be done about this, as it is
the phone that determines how much current to draw (up to a 500mA limit,
specified by the USB standard). Perhaps there's some protocol that I'm not
aware of to let the phone know it can draw more.

To make sure that what you're seeing is not IOIO specific, try comparing
the charging rate to that obtained by connecting the phone to a PC (or any
other source that provides a data connection and not just power).

On Tue, Aug 1, 2017 at 11:49 PM, kkannan  wrote:

> Hello Ytai & IOIO users,
>
> Thanks for the nice board and concept. it simplifies lot of things for me.
>
> This is my first project using IOIO and Android phone to control a rover
> using google Tango API. I am using a Lenovo phap 2 pro with Tango and
> custom build app which does all the navigation. The problem is that the
> phone needs to be charged continuously since it consumes lot of power due
> to the Tango.  I was hoping the IOIO board will top up the phone if
> connected using an external power. It charges the phone alright but only
> barely.
>
> When I measured the current going through IOIO it show 220 ma with
> trimming pot cranked all the way up clockwise. Lenovo p2p is capable of
> quick charging and I want to keep it charged fully or at least not letting
> it down. At this rate, the phone looses 1% over every hr and I want to keep
> the phone embedded and never to be taken out.
>
> Since the 5V reg on IOIO is capable of putting out 1.5A, is there anyway I
> can increase the charging current beyond what it is now ?
>
> Appreciate any pointers to solve this issue.
>
> Thanks
> Kannan
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: No Open Accessory popup

2017-08-01 Thread Ytai Ben-Tsvi
IOIO Hardware Tester is not part of the official IOIO codebase. I have
never seen the source code and can not vouch for its quality or feature set.
Adding AOA support to your app should be a simple matter of adding a
dependency on the IOIOLibAndroidAccessory library via your Eclipse project
or Gradle file.

On Sun, Jul 30, 2017 at 3:48 PM, JP  wrote:

> Ok, after searching high and low I found a post suggesting to activate MTP
> as USB connection type in order to get a Nexus 4 working with AOA.
>
> I updated to Android 4.4 this can be changed. It is hidden in Settings >
> Storage > (more) > USB computer connection.
>
> After selecting MTP, an AOA pop up is displayed when I connect the IOIO
> using USB and having USB debugging off.
>
> In the pop up I can choose between IOIO Manager and HelloIOIO (which are
> both installed).
>
> IOIO Hardware Tester app is not possible to select (although it is
> installed) making me think that its AOA support is not correct (despite
> being included as a connection option in the Google Play description).
>
> So, my next step is to figure out what I need to change in my old app to
> add AOA support.
>
> Any hints?
>
> Best regards,
> JP
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO voltage regulator burns out when i connect Android phone

2017-06-22 Thread Ytai Ben-Tsvi
Just post it somewhere and send me a link.

On Jun 21, 2017 15:23, "Ante Brkic"  wrote:

> Thanks a lot for the answer and suggestion!
>
> I figured out that the reason for failure was custom made usb cable which
> probably got short-wired during the stress test. So I got new cable,
> connected it to new Sparkfun IOIO and now everything works perfectly :)
>
> Btw, I would like to present my project to the wider audience, any ideas
> how can I share it on IOIO Pinterest group?
>
>
> Dana četvrtak, 15. lipnja 2017. u 19:48:43 UTC+2, korisnik Ytai napisao je:
>>
>> It is hard to tell exactly what was the failure mode. If you indeed
>> correlate the failures with physical damage, consider making sure the
>> electronics are well protected against shorting or cutting off during
>> flipping. What I often do in my hacky projects is bury electrical
>> connections in hot glue once everything is working. This ensure nothing
>> shorts and nothing moves. But of course, there are more elegant ways to
>> achieve that :)
>> The v2.2 fix is designed to survive many possible fault conditions, such
>> as (short) high voltage spikes on the input and overload / short conditions
>> on the output. So that would possibly give you another safety net for
>> reliability, although it is of course recommended to try to prevent these
>> conditions from occurring.
>>
>> I hope this helps!
>> Ytai
>>
>> On Thu, Jun 8, 2017 at 11:34 PM, Ante Brkic  wrote:
>>
>>> Hi,
>>>
>>> First of all, kudos to ioio and ytai, I really appreciate and love IOIO
>>> project.
>>>
>>> My issue is that the moment I connect IOIO to the Android device, the
>>> power led on IOIO turns off. IOIO is still functioning properly when I
>>> connect it to the PC but does not get power when I connect it to the
>>> external power source. I've been studying this issue on the net (this very
>>> group) to figure out that it must be IOIO voltage regulator burn-out
>>> syndrome.
>>>
>>> I had a working setup - basically it is a remotely controlled tank
>>> (which I plan to present as soon as I get it working again) and I was
>>> stress testing it driving it around my room. Everything worked fine but my
>>> tank flipped several times after which it first started to experience
>>> random but frequent IOIO reconnects (increasingly frequent), culminating
>>> with definitive failure.
>>>
>>> In the aftermath of this stress test I figured out that:
>>>
>>>1. IOIO power cables (connected to power JST on IOIO) were
>>>disconnected on the soldering point (due to physical damage when tank
>>>flipped I suppose).
>>>2. IOIO couldn't be powered any more from the JST and neither VIN
>>>line but only from the PC when running in the device mode.
>>>
>>>
>>> After that I ordered another IOIO from the net, fixed my cables in the
>>> meantime, but as soon as I connected the new IOIO it's voltage regulator
>>> got burned - power led turned off and I couldn't get power any more unless
>>> I connected IOIO to the PC.
>>>
>>>
>>> Both mentioned IOIO's were IOIO OTG but not v2.2 with voltage regulation
>>> fix although my power cables are short (20cm) so I can not identify the
>>> issue as the one that was addresses through v2.2 fix.
>>>
>>>
>>> And this is what troubles me. I have now ordered two new IOIO's, one
>>> from Sparkfun and one from ebay but I am very afraid to connect them to my
>>> project before understanding what is causing the issue.
>>>
>>>
>>> It is worth mentioning that the USB cable I was using was custom made
>>> cable which I made from two USB cables, one OTG and one common which I've
>>> done because I wanted to have micro-USB to micro-USB OTG cable (which I
>>> can't find anywhere to purchase btw). But this cable was working properly -
>>> issue happened only after the tank flipped. I am now returning to original
>>> OTG cable but I'm still afraid not to burn any more IOIO's.
>>>
>>>
>>> I've tested the Andorid device USB port by connecting it to PC and it's
>>> both charging and enabling data transfer.
>>>
>>>
>>> Could it be that my custom cable went shortwired for a while and that
>>> caused the voltage regulator to burn?
>>>
>>>
>>> How would you proceed here?
>>>
>>>
>>> My debug plan is as following:
>>>
>>>1. Connect the new IOIO to PC.
>>>2. Connect IOIO to Android with original OTG cable + male USB to
>>>micro USB.
>>>3. Connect JST power to IOIO.
>>>4. Attach electronic circuit to IOIO.
>>>
>>> Is there anything else I can do in the debug process to prevent
>>> additional damage?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit 

Re: IOIO voltage regulator burns out when i connect Android phone

2017-06-15 Thread Ytai Ben-Tsvi
It is hard to tell exactly what was the failure mode. If you indeed
correlate the failures with physical damage, consider making sure the
electronics are well protected against shorting or cutting off during
flipping. What I often do in my hacky projects is bury electrical
connections in hot glue once everything is working. This ensure nothing
shorts and nothing moves. But of course, there are more elegant ways to
achieve that :)
The v2.2 fix is designed to survive many possible fault conditions, such as
(short) high voltage spikes on the input and overload / short conditions on
the output. So that would possibly give you another safety net for
reliability, although it is of course recommended to try to prevent these
conditions from occurring.

I hope this helps!
Ytai

On Thu, Jun 8, 2017 at 11:34 PM, Ante Brkic  wrote:

> Hi,
>
> First of all, kudos to ioio and ytai, I really appreciate and love IOIO
> project.
>
> My issue is that the moment I connect IOIO to the Android device, the
> power led on IOIO turns off. IOIO is still functioning properly when I
> connect it to the PC but does not get power when I connect it to the
> external power source. I've been studying this issue on the net (this very
> group) to figure out that it must be IOIO voltage regulator burn-out
> syndrome.
>
> I had a working setup - basically it is a remotely controlled tank (which
> I plan to present as soon as I get it working again) and I was stress
> testing it driving it around my room. Everything worked fine but my tank
> flipped several times after which it first started to experience random but
> frequent IOIO reconnects (increasingly frequent), culminating with
> definitive failure.
>
> In the aftermath of this stress test I figured out that:
>
>1. IOIO power cables (connected to power JST on IOIO) were
>disconnected on the soldering point (due to physical damage when tank
>flipped I suppose).
>2. IOIO couldn't be powered any more from the JST and neither VIN line
>but only from the PC when running in the device mode.
>
>
> After that I ordered another IOIO from the net, fixed my cables in the
> meantime, but as soon as I connected the new IOIO it's voltage regulator
> got burned - power led turned off and I couldn't get power any more unless
> I connected IOIO to the PC.
>
>
> Both mentioned IOIO's were IOIO OTG but not v2.2 with voltage regulation
> fix although my power cables are short (20cm) so I can not identify the
> issue as the one that was addresses through v2.2 fix.
>
>
> And this is what troubles me. I have now ordered two new IOIO's, one from
> Sparkfun and one from ebay but I am very afraid to connect them to my
> project before understanding what is causing the issue.
>
>
> It is worth mentioning that the USB cable I was using was custom made
> cable which I made from two USB cables, one OTG and one common which I've
> done because I wanted to have micro-USB to micro-USB OTG cable (which I
> can't find anywhere to purchase btw). But this cable was working properly -
> issue happened only after the tank flipped. I am now returning to original
> OTG cable but I'm still afraid not to burn any more IOIO's.
>
>
> I've tested the Andorid device USB port by connecting it to PC and it's
> both charging and enabling data transfer.
>
>
> Could it be that my custom cable went shortwired for a while and that
> caused the voltage regulator to burn?
>
>
> How would you proceed here?
>
>
> My debug plan is as following:
>
>1. Connect the new IOIO to PC.
>2. Connect IOIO to Android with original OTG cable + male USB to micro
>USB.
>3. Connect JST power to IOIO.
>4. Attach electronic circuit to IOIO.
>
> Is there anything else I can do in the debug process to prevent additional
> damage?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Problem with SPI Implementation for beginner

2017-05-31 Thread Ytai Ben-Tsvi
What does the log say?

On May 18, 2017 1:12 PM,  wrote:

> Hi,
>
> I have tried to implement the SPI  master using the example HELLOIOIO
> SPI example. My application is terminating (It says ioio disconnected ) on
> toggling the button.
>
> Here is my looper code
>
> class Looper extends BaseIOIOLooper {
> /** The on-board LED. */
> private DigitalOutput led_;
> private SpiMaster SPI;
>
> int[] slaves = new int[]{0,1,2};
> int[] SS_PINS = new int[]{45,46,47};
> static final int MISO_ = 3;
> static final int MOSI_ = 4;
> static final int CLCK_ = 5;
> final int DATA_SIZE = 19;
> byte[] request = new byte[5];
> byte[] response = new byte[5];
> byte[] incoming = new byte[DATA_SIZE+1];
> /**
>  * Called every time a connection with IOIO has been
> established.
>  * Typically used to open pins.
>  *
>  *
>  * @throws ConnectionLostException
>  * When IOIO connection is lost.
>  *
>  * @see ioio.lib.util.IOIOLooper#setup()
>  */
> @Override
> protected void setup() throws ConnectionLostException {
> showVersions(ioio_, "IOIO connected!");
>
> //Lite the LED
> led_ = ioio_.openDigitalOutput(0, true);
>
> //open SPI Master here
> //SPI = ioio_.openSpiMaster(MISO_,MOSI
> _,CLCK_,SS_PINS,SpiMaster.Rate.RATE_4M);
> SPI = ioio_.openSpiMaster(new DigitalInput.Spec(MISO_,
> Mode.PULL_UP), new
> DigitalOutput.Spec(MOSI_),
> new DigitalOutput.Spec(CLCK_),
> new DigitalOutput.Spec[] { new
> DigitalOutput.Spec(SS_PINS[0]) },
> new SpiMaster.Config(SpiMaster.Rate.RATE_125K,
> true, true));
>
>
> request = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 };
> enableUi(true);
>
> if(button_.isChecked()){
> //led_.write(!button_.isChecked());
> //just read from slave on pin 45
> try{
> SPI.writeRead(slaves[0],request,
> request.length,1, response, response.length);
> }
> catch (ConnectionLostException e) {
> e.printStackTrace();
> }
> catch (InterruptedException e) {
> e.printStackTrace();
> }
> incoming[request[0]] = response[0];
> }
> }
>
> /**
>  * Called repetitively while the IOIO is connected.
>  *
>  * @throws ConnectionLostException
>  * When IOIO connection is lost.
>  * @throws InterruptedException
>  *  When the IOIO thread has been interrupted.
>  *
>  * @see ioio.lib.util.IOIOLooper#loop()
>  */
> @Override
> public void loop() throws ConnectionLostException,
> InterruptedException {
>
> try {
> led_.write(false);
> Thread.sleep(100);
> led_.write(true);
> Thread.sleep(100);
> if(button_.isChecked()){
> led_.write(true);
> //just read from slave on pin 45
> try{
> SPI.writeRead(slaves[0],request,
> request.length,1, response, response.length);
> }
> catch (ConnectionLostException e) {
> e.printStackTrace();
> }
> catch (InterruptedException e) {
> e.printStackTrace();
> }
> incoming[request[0]] = response[0];
> }
> }
> catch (InterruptedException e) {
> }
> }
>
> /**
>  * Called when the IOIO is disconnected.
>  *
>  * @see ioio.lib.util.IOIOLooper#disconnected()
>  */
> @Override
> public void disconnected() {
> enableUi(false);
> toast("IOIO disconnected");
> }
>
> /**
>  * Called when the IOIO is connected, but has an incompatible
> firmware version.
>  *
>  * @see ioio.lib.util.IOIOLooper#incompatible(IOIO)
>  */
> @Override
> public void incompatible() {
> showVersions(ioio_, "Incompatible firmware version!");
>   

Re: IOIO Won't Connect to Google Pixel

2017-05-31 Thread Ytai Ben-Tsvi
Do the precompiled apps (e.g. HelloIOIO) work? If so, it is probably an
issue with how you're building your app (see build files of example apps).

On May 30, 2017 4:17 PM, "Oscar Prom"  wrote:

> A Google Pixel (running Android 7.1) won't connect to a IOIO board when
> using a USB-OTG cable. I have the same exact app working through the
> IOIOBridge (phone and board connected to computer via USB), but when I
> connect the phone to the board directly, the phone does not recognize the
> IOIO. I turn off USB debugging when connecting directly. I have tried both
> automatic/host modes for the IOIO using the onboard toggle switch. I am
> seeing the charge indicator, and the accessory filter fires which launches
> my application. However, the setup() function in the BaseIOIOLooper does
> not run. I'm going to attempt some downgraded firmwares now. Any insight
> would be greatly appreciated.
>
> IOIO info:
>
> $ ./ioiodude --port=/dev/tty.usbmodem141321 versions
>
> IOIO Application detected.
>
>
> Hardware version: SPRK0020
>
> Bootloader version: IOIO0402
>
> Application version: IOIO0506
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Multiple dex files define Lioio/spi/LogImpl

2017-05-26 Thread Ytai Ben-Tsvi
You need only the aar. See the example apps for how to specify the
dependencies correctly.

On Thu, May 25, 2017 at 6:22 PM,  wrote:

> when I try to add the aar and jar library to the android studio project,
> building failed with this error.
>
> Error:Execution failed for task ':usbCameraTest8:
> transformClassesWithDexForDebug'.
> > com.android.build.api.transform.TransformException:
> com.android.ide.common.process.ProcessException: 
> java.util.concurrent.ExecutionException:
> com.android.dex.DexException: Multiple dex files define
> Lioio/lib/spi/LogImpl;
>
> Do not know why there are multiple LogImpl class?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO-OTG as host, Android as device... no connection

2017-05-26 Thread Ytai Ben-Tsvi
Did you remember to turn USB debugging off?

On Thu, May 18, 2017 at 2:02 PM, theodore peters 
wrote:

> Hello,
>
> I have the IOIO-OTG and when I use it as a Device and the android as the
> Host, the examples(and my app) work well.
> When I switch the Host and Device around(so the IOIO charges the android)
> I have no connection to the IOIO.
> It does charge the device, but no data is passed back and forth.
>
> Is there something i have to do in my software to tell it to treat the
> IOIO as host and android as device?
>
> -Thanks
> Ted
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Updated documentation?

2017-05-17 Thread Ytai Ben-Tsvi
IOIOLibCore translates the main IOIO API (ioio.lib.api.*) into a
bidirectional serial protocol that the IOIO understands.
IOIOLibAndroid adds an implementation of the serial channel over TCP/ADB as
well as ties the IOIO application model (IOIOLooper, etc) into the Android
application framework. Then, other IOIOLibAndroidXXX merely add more
connectivity options.
Similarly, IOIOLibPc adds support for serial ports as the serial channel to
the IOIO as well as bindings to the Java console or Swing application
framework.
Hope this makes things clearer for you.

On Tue, May 16, 2017 at 7:11 PM, Ben Kokes  wrote:

> Thanks for responding!
>
> QT is a bit of a funny beast, where it requires JNI to interface to
> java-land.  To that end, I need to uncompress the java library and
> strategically place them within the project.  (see this link for more
> explicit description: http://doc.qt.io/qt-5/android3rdpartylibs.html).
> Since the IOIO driver is somewhat split up, I was confused as to which was
> the base libraries and which was the extra/add-on libraries.
>
> Clearly the IOIOLibCore-5.07.jar has all the requisite class files to make
> the board talk and work.  I am mostly interested in the UART aspect, but I
> want to get the base operation working first.To that end, I am focusing on
> IOIOLibCore-5.07.jar and IOIOLibAndroid-debug.aar and just getting things
> compiling and linking.
>
> What I am trying to understand is: What is in IOIOLibAndroid-debug.aar
> that helps out the whole operation of the library?  Is the AAR file merely
> there to interface the JAR file into the android studio framework?
>
> Thanks for any insight you may have.
> Cheers!
>
>
>
> On Tuesday, May 16, 2017 at 1:27:11 PM UTC-7, Ytai wrote:
>>
>> The documentation should be fairly up to date.
>> IOIOLibCore is shared between Android and PC, you typically don't use it
>> directly.
>> IOIOLibAndroid is what you would typically use for an Android app (which
>> includes only an ADB-based connection between the Android and IOIO),
>> and IOIOLibAndroid{Device, Accessory, Bluetooth} respectively add other
>> connectivity modes (device = IOIO acts as a USB device, accessory = IOIO
>> acts as a USB host).
>>
>> On Mon, May 15, 2017 at 10:07 PM, Ben Kokes  wrote:
>>
>>> Hello all,
>>>
>>> Is there some place that has some updated documentation for release
>>> 5.07?  The Wiki has some ( what seems) dated info, and I am trying to sort
>>> out which of the libs I should be using for my project.  I am trying to
>>> integrate this into QT, but am having java integration issues.  I would
>>> appreciate if someone could tell me if IOIOLibCore-5.07.jar is the base
>>> library, or if IOIOLibAndroid-release.aar is the base library as the docs
>>> suggest,
>>>
>>> Also, whats the difference between IOIOLibAndroid-release.aar
>>> and IOIOLibAndroidDevice-release.aar ?
>>>
>>> Thank you,
>>> -Ben
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Controlling LoRa radio with IOIO

2017-05-17 Thread Ytai Ben-Tsvi
I don't know specifically about this radio, but indeed SPI is possible.
Usually, unless the device has some weird timing requirements, there should
be no problem. You should be able to translate the Arduino-based library to
Java.
Alternatively, you can leave the Arduino in the loop and use the Android as
display only. In this case, what I would do is have the Arduino present the
data that needs to be displayed over UART or I2C and consume it via a IOIO.
Another option is not to use the IOIO and use one of the Arduino boards
that can talk to Android over USB or add a Bluetooth shield to the Arduino.

On Tue, May 16, 2017 at 2:47 PM, Jerry Howard  wrote:

> We are currently using a small Arduino type board to manage an attached
> LoRa radio similar to the SparkFun RFM69 at 915MHz.  There is a fine
> arduino c++ library (RadioHead) that we use.   We also use sensors attached
> to the arduino board and send sensor data over the LoRa radio to a central
> hub.
>
> We are wanting to use an Android tablet as a display for our
> transmitting/sensing device and would like to use the IOIO or something
> similar that can talk to the Android via usb.   Has anyone used the IOIO to
> control such a radio?   I know SPI can be used to communicate with the
> radio board, but are there any examples or libraries that can give us a
> start?
>
> Or does anyone have other suggestions for using an Android as a display
> for some type of board with sensors and a radio?
>
> Thanks,
> Jerry
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO OTG not connecting to smartphone

2017-02-13 Thread Ytai Ben-Tsvi
With the latest firmware, when powering the IOIO and connecting to the
phone, are you getting a charge icon or a dialog asking for which
application to run?
Also, have you tried using the IOIO as a USB device rather than a host?

On Feb 13, 2017 4:04 PM, "Ahmed Khalil"  wrote:

> Hello all,
>
> I am new to IOIO and have been struggling with connecting to my phone. The
> phone runs Android 6.0.1. I've downloaded a bunch of apps including Hello
> IOIO and IOIO Manager. None recognize a connection. I know most
> connectivity issues can be traced back to incompatible firmware and
> software versions, so to be safe, I've downloaded and tested every version.
> Nothing. I also always made sure that USB debugging is off. Any help would
> be much appreciated.
>
> Best regards,
> Ahmed
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: (ADVANCED) Building the IOIO firmware

2017-01-27 Thread Ytai Ben-Tsvi
Both are path problems:
For the script to work you need to have the mplab bin directory in your
path.
Then you need mplab to know about your toolchain locations. This is done
from the tools menu of mplab, where you can add toolchains.

On Jan 27, 2017 05:24, "Pranay Sharma"  wrote:

> Dear Ytai and all,
> Apologies for the long post. But I have marked my questions in* GREEN*
> and errors are in *RED*
> We had re-setup our whole environment and tried with fresh code.
> It’s now: Linux Mint 64-bit with MPLAB X v3.51 with* xc16 compiler
> v1.30(not the C30 compiler (V3.30c)   --> is this okay?)*.
>
>
>- The commands make-all don't work as I get a “command not found
>error”-->probably incorrect environment. *But is this step still
>required if we are using MPLAB to build code?*
>
>
>>
>>
>>
>>
>>
>>
>> *Error: 
>> ===libusb===./make-all:
>> line 17: prjMakefilesGenerator.sh: command not foundWARNING: failed to
>> regenerate Makefiles.make: *** firmware/libusb: No such file or directory.
>> Stop.FAILURE*
>
>
>- Alternatively we traced the file prjMakefilesGenerator.sh and
>manually ran the command for the module as:
>
>>- /opt/microchip/mplabx/v3.51/mplab_ide/bin/prjMakefilesGenerator.sh
>>   ../firmware/libusb
>>
>- Output :
>>
>>   - ERROR: Has EDS, but no 
>>
>   - Still we used MPLab to build the modules with the following
>settings:
>- For building the Bootloader
>  - libadb device selected: PIC24FJ256GB206.-->build success
>  - -libbstack device selected: PIC24FJ256GB206.-->build success
>  - -libconn device selected: PIC24FJ256GB206.-->build success
>  - -libusb device selected: PIC24FJ256GB206_OTG.-->build success
>  - -Bootloader : SPRK0020.-->*build NOT successful*
>   - For building the App_layer_v1
>  - -libadb device selected: PIC24FJ256GB206.-->build success
>  - -libbstack device selected: PIC24FJ256GB206.-->build success
>  - -libconn device selected: PIC24FJ256GB206.-->build success
>  - -libusb device selected: PIC24FJ256GB206_OTG_ADB.-->build
>  success
>  - -App_layer_v1 : IOIO0030.-->*build NOT successful*
>
>
>- For App_layer_v1: Errors marked in RED, same error was seen for
>   building the boot-loader.
>
>
> CLEAN SUCCESSFUL (total time: 54ms)
>> make -f nbproject/Makefile-IOIO0030.mk SUBPROJECTS= .build-conf
>> make[1]: Entering directory '/home/user/Desktop/park_git/
>> ioio/firmware/app_layer_v1'
>> make  -f nbproject/Makefile-IOIO0030.mk dist/IOIO0030/production/app_
>> layer_v1.production.hex
>> make[2]: Entering directory '/home/user/Desktop/park_git/
>> ioio/firmware/app_layer_v1'
>> "/opt/microchip/xc16/v1.30/bin/xc16-gcc"   digital.c  -o
>> build/IOIO0030/production/digital.o  -c -mcpu=24FJ256GB206  -MMD -MF
>> "build/IOIO0030/production/digital.o.d"  -mno-eds-warn  -g -omf=elf
>> -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3 -I"."
>> -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG
>> -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
>> "/opt/microchip/xc16/v1.30/bin/xc16-gcc"   ../common/logging.c  -o
>> build/IOIO0030/production/_ext/1270477542/logging.o  -c
>> -mcpu=24FJ256GB206  -MMD -MF 
>> "build/IOIO0030/production/_ext/1270477542/logging.o.d"
>>  -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc
>>  -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common"
>> -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
>> "/opt/microchip/xc16/v1.30/bin/xc16-gcc"   ../common/byte_queue.c  -o
>> build/IOIO0030/production/_ext/1270477542/byte_queue.o  -c
>> -mcpu=24FJ256GB206  -MMD -MF 
>> "build/IOIO0030/production/_ext/1270477542/byte_queue.o.d"
>>  -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc
>>  -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common"
>> -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
>> "/opt/microchip/xc16/v1.30/bin/xc16-gcc"   features.c  -o
>> build/IOIO0030/production/features.o  -c -mcpu=24FJ256GB206  -MMD -MF
>> "build/IOIO0030/production/features.o.d"  -mno-eds-warn  -g -omf=elf
>> -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3 -I"."
>> -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG
>> -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
>> "/opt/microchip/xc16/v1.30/bin/xc16-gcc"   i2c.c  -o
>> build/IOIO0030/production/i2c.o  -c -mcpu=24FJ256GB206  -MMD -MF
>> "build/IOIO0030/production/i2c.o.d"  -mno-eds-warn  -g -omf=elf
>> -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3 -I"."
>> -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG
>> -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
>> "/opt/microchip/xc16/v1.30/bin/xc16-gcc"   icsp.c  -o
>> 

Re: IOIO gives wrong data from UART

2017-01-21 Thread Ytai Ben-Tsvi
This smells like an electrical problem. What are the electrical specs of
the modem? How exactly are you connecting it to the IOIO?

As an aside, your loop() doesn't block (i.e. spin-loops) whenever there is
no data in the UART, which is a very bad practice (maxes out CPU, drains
battery). You probably want to simply remove the "if" which would result on
it blocking on the read() as much as needed.

On Fri, Jan 20, 2017 at 7:54 AM, Bobi Zrncev  wrote:

> Hi,
>
> I am trying to connect IOIO to a GSM modem with UART. If I connect it to
> PC it gives the output "10 a1 02 00 00 5d 10 03" every 10 seconds. I
> managed to connect it to the IOIO but it gives the output "d7 d9 ff ff 45
> df f9" every 10 seconds. What can be problem?
>
> I connect to uart using: uart = ioio_.openUart(3, 4, 9600,
> Uart.Parity.NONE, Uart.StopBits.ONE);
>
> public void loop() throws ConnectionLostException, InterruptedException {
> try {
> int availableBytes = in.available();
>
> if (availableBytes > 0) {
> try {
> Log.d("UART", "Received is " + in.read());
> }catch (IOException e) {
> e.printStackTrace();
> }
> }
> }
> }
>
> Best regards,
> BZ
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: (ADVANCED) Building the IOIO firmware

2017-01-21 Thread Ytai Ben-Tsvi
This is not an inductor but a ferrite bead.
Please build with XC16 using a clean clone. I don't want to waste time
troubleshooting a non-standard environment.

On Sat, Jan 21, 2017 at 6:03 AM,  wrote:

> I'm asking this question because I'm in doubt that is this really a
> Inductor ?
> if yes then can you please explain me why are you using this because in
> controller's datasheet there is no explanation of Indutor use.
> and what's the exact value (given value in schematic is 300hm, 1.8A)
>
> On Saturday, January 21, 2017 at 4:46:59 PM UTC+5:30, kri...@parkzap.com
> wrote:
>>
>> hello ytai,
>>
>> can you tell me exact value of Inductor, connected with controller's avdd
>> pin(19).
>>
>> thanks
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: info

2017-01-18 Thread Ytai Ben-Tsvi
Typically relays require significant current through their coils compared
to the amount of current you want to run through your pins. A simple
circuit with a transistor and a flyback diode per relay is recommended.

On Jan 18, 2017 10:46 PM, "Malik Atta ur rehman" <
malikattaurrehman...@gmail.com> wrote:

> I m using this ioio otg in project of home automation if i use pin 1 to 30
> to connect load with the help of relays it will effect the performance of
> IOIO OTG or not ?? current will effect IOIO OTG ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: (ADVANCED) Building the IOIO firmware

2017-01-18 Thread Ytai Ben-Tsvi
Your project might have gotten messed up during the experimentation. Can
you try building a fresh copy now that you have the right compiler?

On Jan 18, 2017 11:49 PM,  wrote:

> Hello Ytai,
> I'm attempting to use MPLAB X v3.50 with xc16 compiler V1.30.  The
> individual sub projects, such as usb, adb, btstack, conn compile fine, but
> I cannot build the app_layer_v1 it is giving the error:
> make -f nbproject/Makefile-IOIO0030.mk SUBPROJECTS= .build-conf
> make[1]: Entering directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master
> (1)/ioio-master/firmware/app_layer_v1'
> make  -f nbproject/Makefile-IOIO0030.mk dist/IOIO0030/production/app_
> layer_v1.production.hex
> make[2]: Entering directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master
> (1)/ioio-master/firmware/app_layer_v1'
> "C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"
> ../common/byte_queue.c  -o 
> build/IOIO0030/production/_ext/1270477542/byte_queue.o
> -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/_
> ext/1270477542/byte_queue.o.d"  -mno-eds-warn  -g -omf=elf
> -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3 -I"."
> -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG
> -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
> "C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"
> ../microchip/common/uart2.c  -o 
> build/IOIO0030/production/_ext/1537399865/uart2.o
> -c -mcpu=24FJ256DA206  -MMD -MF 
> "build/IOIO0030/production/_ext/1537399865/uart2.o.d"
> -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc
> -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common"
> -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
> "C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   adc.c
> -o build/IOIO0030/production/adc.o  -c -mcpu=24FJ256DA206  -MMD -MF
> "build/IOIO0030/production/adc.o.d"  -mno-eds-warn  -g -omf=elf
> -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3 -I"."
> -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG
> -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
> "C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"
> digital.c  -o build/IOIO0030/production/digital.o  -c -mcpu=24FJ256DA206
> -MMD -MF "build/IOIO0030/production/digital.o.d"  -mno-eds-warn  -g
> -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3
> -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030
> -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
> "C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"
> features.c  -o build/IOIO0030/production/features.o  -c
> -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/features.o.d"
> -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc
> -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common"
> -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
> "C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"
> ../common/logging.c  -o build/IOIO0030/production/_ext/1270477542/logging.o
> -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/_
> ext/1270477542/logging.o.d"  -mno-eds-warn  -g -omf=elf
> -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3 -I"."
> -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG
> -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
> "C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   i2c.c
> -o build/IOIO0030/production/i2c.o  -c -mcpu=24FJ256DA206  -MMD -MF
> "build/IOIO0030/production/i2c.o.d"  -mno-eds-warn  -g -omf=elf
> -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3 -I"."
> -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG
> -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
> "C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   icsp.c
> -o build/IOIO0030/production/icsp.o  -c -mcpu=24FJ256DA206  -MMD -MF
> "build/IOIO0030/production/icsp.o.d"  -mno-eds-warn  -g -omf=elf
> -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc-fno-short-double -O3 -I"."
> -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG
> -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
> Options have been disabled due to restricted license
> Visit http://www.microchip.com/ to purchase a new key.
> Options have been disabled due to restricted license
> Visit http://www.microchip.com/ to purchase a new key.
> In file included from i2c.c:36:0:
> ../common/platform.h:104:6: error: #error Platform and MCU mismatch -
> expecting PIC24FJ256GB206
> Options have been disabled due to restricted license
> Visit http://www.microchip.com/ to purchase a new key.
> Options have been disabled due to restricted license
> Visit http://www.microchip.com/ to purchase a new key.
> In file included from pins.h:33:0,
>  from features.c:35:
> ../common/platform.h:104:6: error: 

Re: can we use a usb port in ioio for a internet conection with other devices ???

2017-01-07 Thread Ytai Ben-Tsvi
I'm assuming your question is the one in the subject and not in the message
body. The answer is no, it is not currently supported. At some point I
considered adding WiFi dongle support and never got around to it. Should be
physically possible but new firmware will need to be written.

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Old ioio V1 support for new Android devices

2017-01-03 Thread Ytai Ben-Tsvi
You can install the latest firmware version (v5.06 currently) on the IOIO
v1 and you'll get OpenAccessory support.

On Tue, Jan 3, 2017 at 5:57 AM, Ian Forbes  wrote:

> Hi
>
> I have an old ioio V1 board that I connect to a Dell 5 PDA to run "XCSoar"
> software. The Dell runs Android version 2.2.2. It works very nicely.
>
> However the Dell is getting old and I am investigating replacing it with a
> new device. What I have discovered is that the newer Android versions don't
> support "USB Debugging" and I need to use OpenAccessory instead. My problem
> is that it seems my ioio card is too old to support OpenAccessory.
>
> I am not sure exactly what version my hardware and bios are, but the
> newest application firmware that I can install with the IOIOManager
> application is App-IOIO0300.ioioapp. (I can install Blink V1 and the LED
> starts blinking. Then I try and install successively older versions of the
> Application Firmware and only when I get back to this version does it load
> the firmware and stop led from blinking).
>
> I think it comes down to these two questions:
>
> Can my ioio V1 board be made to support "Openaccessory"?
>
> Do I have to get hold of a programmer device or another IOIO card to
> upgrade the BIOS in order to achieve this?
>
> Thanks
>
> Ian
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Temperature rating of IoIo Board

2016-12-22 Thread Ytai Ben-Tsvi
Why would you use an external oscillator as opposed to just an external
crystal?

On Dec 22, 2016 7:17 AM, "P.S"  wrote:

> Dear Ytai and All,
> We were choosing http://www.mouser.com/ds/2/96/008-0256-0-786323.pdf to
> be used as an external oscillator.
> Any comments or suggestions?
> Best Regards
>
> On Friday, 9 December 2016 05:00:57 UTC+5:30, Ytai wrote:
>>
>> No special tips. Just make sure every component you use is rated for this
>> range and that its critical parameters within the desired range across the
>> temperature range you want to support.
>>
>> On Dec 7, 2016 11:55 PM, "P.S"  wrote:
>>
>>> Dear Ytai,
>>> I will be starting to make a version of IOIO with Crystal and opensource
>>> it. Any tips with respect to hardware/software design so that the board can
>>> withstand higher ambient temperature?
>>>
>>> Thanks in advance
>>>
>>>
>>> On Saturday, 9 July 2016 01:00:24 UTC+5:30, Ytai wrote:

 The table titled "internal RC accuracy" in the datasheet specifies a
 typical 0.15% deviation, but a worst case 1% across the temperature range.
 USB's nominal requirement is 0.25%. So if you want to be 100% certain you'd
 need to add a crystal to the circuit (and make a configuration flag change
 in the bootloader). Otherwise, you can characterize it yourself and see how
 bad it actually gets.

 On Fri, Jul 8, 2016 at 5:18 PM, Pranay Sharma 
 wrote:

> HI Ytai,
> I checked the data sheet of the PIC micro used in IOIO board but I am
> not able to figure out which graph to see to understand the oscillators
> behaviour to temprature changes.
> Further, is there a link to exact BOM of the parts used for IOIO with
> exact part names?
> Thanks for your time
>
> On Friday, July 8, 2016 at 6:56:40 AM UTC+5:30, Ytai wrote:
>>
>> I haven't done any work to characterize the temperature range or
>> design for a specific one. You'd have to do that be checking the 
>> datasheets
>> of the individual parts. I'm assuming that 85C should be safe for most if
>> not all parts. Another thing you'd need to evaluate is how stable the
>> internal oscillator of the PIC is across the temperature range. USB is
>> pretty picky about the precision of its clock.
>>
>> On Wed, Jul 6, 2016 at 12:59 PM, Pranay Sharma <
>> pra...@tollmequick.com> wrote:
>>
>>> Dear ALL,
>>> Could someone put some light on what are the temperature ranges for
>>> proper operation of the IOIO board.
>>>
>>> I was thinking to use this board for a product which would be put
>>> outdoors where maximum temperature in summers is 45Deg Celcius.
>>> So the expected temperature inside the board could easily reach
>>> 55deg or 60Deg.
>>>
>>> BR
>>> Pranay
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google
> Groups "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ioio-users+...@googlegroups.com.
> To post to this group, send email to ioio-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

 --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this 

Re: Is the IOIO OTG still being manufactured?

2016-12-20 Thread Ytai Ben-Tsvi
They're definitely still being manufactured and sold by SparkFun and
SeeedStudio. Might be a temporary holiday-related shortage.

On Tue, Dec 20, 2016 at 12:27 PM, Tim Archer  wrote:

> Hello Ytai,
>
> Is the IOIO OTG board still being manufactured or is a new version in the
> works to be released in the near future?
>
> I have a v1 board and was going to buy an OTG board to play around with.
> Sparkfun only allows a backorder at this point, but has no estimate on when
> available at this link: https://www.sparkfun.com/products/13613
>
> BTW, awesome board you created!
>
> Thanks!
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO-OTG with Android 6.0

2016-12-17 Thread Ytai Ben-Tsvi
I don't know of any specific issues with Android 6. The IOIO hardware
tester app is not an official IOIO tool and has not been maintained in a
very long time so I wouldn't expect it to work.
Regardless of apps, when you disable USB debugging and connect the IOIO,
does the accessory dialog pop up? Have you tried both host mode and device
mode?

On Dec 14, 2016 12:42, "István Rostás"  wrote:

Please some yes or no if somebody use ioio with android 6.0!

-- 
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO-OTG Host to VCP device

2016-12-13 Thread Ytai Ben-Tsvi
Physically, you have everything you need to do that, but you're looking
into weeks of custom firmware development to support this use case. There
are probably easier solutions.

On Dec 13, 2016 09:00, "Ken Perry"  wrote:

> I have a custome VCP device.  It also supports HID.  I am wondering if I
> can use the IOIO-OTG in HOST mode like an Arduino USB shield to connect my
> Arduino board to the VCP or HID device and control it.  The VCP device  is
> a custome tactile display for blind users and I want to write some fun
> little, bouncy ball, pong, and breakout games on it that they can play by
> hand.It has a very simple protocol but I currently am waiting on a USB
> Shield in shipping but I realized I had an IOIO-otg board that might do the
> trick.  I can not find anything that says it won't but I can't find
> anything that says it will either.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Multiple ioio boards

2016-12-13 Thread Ytai Ben-Tsvi
The only way to do it in the existing app framework is to have the service
manager both connections and share one of them with the app through an API.
Alternatively, you can make changes to the application framework, allowing
the client to specify which connection types to consider when starting the
app.

On Dec 13, 2016 09:00,  wrote:

> Hi all!
>
> I am trying to connect a tablet with 2 ioios. One connected over usb and
> the other over bluetooth.
>
> If I start an IOIOActivity, it connects to both of the ioios.. Is there a
> way how i can tell an activity to connect over usb explicitly and a Service
> over bluetooth?
>
> I would appreciate any direction how to solve this, been sitting on this
> problem for quite a while now :( thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Temperature rating of IoIo Board

2016-12-08 Thread Ytai Ben-Tsvi
No special tips. Just make sure every component you use is rated for this
range and that its critical parameters within the desired range across the
temperature range you want to support.

On Dec 7, 2016 11:55 PM, "P.S"  wrote:

> Dear Ytai,
> I will be starting to make a version of IOIO with Crystal and opensource
> it. Any tips with respect to hardware/software design so that the board can
> withstand higher ambient temperature?
>
> Thanks in advance
>
>
> On Saturday, 9 July 2016 01:00:24 UTC+5:30, Ytai wrote:
>>
>> The table titled "internal RC accuracy" in the datasheet specifies a
>> typical 0.15% deviation, but a worst case 1% across the temperature range.
>> USB's nominal requirement is 0.25%. So if you want to be 100% certain you'd
>> need to add a crystal to the circuit (and make a configuration flag change
>> in the bootloader). Otherwise, you can characterize it yourself and see how
>> bad it actually gets.
>>
>> On Fri, Jul 8, 2016 at 5:18 PM, Pranay Sharma 
>> wrote:
>>
>>> HI Ytai,
>>> I checked the data sheet of the PIC micro used in IOIO board but I am
>>> not able to figure out which graph to see to understand the oscillators
>>> behaviour to temprature changes.
>>> Further, is there a link to exact BOM of the parts used for IOIO with
>>> exact part names?
>>> Thanks for your time
>>>
>>> On Friday, July 8, 2016 at 6:56:40 AM UTC+5:30, Ytai wrote:

 I haven't done any work to characterize the temperature range or design
 for a specific one. You'd have to do that be checking the datasheets of the
 individual parts. I'm assuming that 85C should be safe for most if not all
 parts. Another thing you'd need to evaluate is how stable the internal
 oscillator of the PIC is across the temperature range. USB is pretty picky
 about the precision of its clock.

 On Wed, Jul 6, 2016 at 12:59 PM, Pranay Sharma 
 wrote:

> Dear ALL,
> Could someone put some light on what are the temperature ranges for
> proper operation of the IOIO board.
>
> I was thinking to use this board for a product which would be put
> outdoors where maximum temperature in summers is 45Deg Celcius.
> So the expected temperature inside the board could easily reach 55deg
> or 60Deg.
>
> BR
> Pranay
>
> --
> You received this message because you are subscribed to the Google
> Groups "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ioio-users+...@googlegroups.com.
> To post to this group, send email to ioio-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

 --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Frequent disconnect()/setup() in IOIO Service

2016-12-07 Thread Ytai Ben-Tsvi
First, to both of you: I wouldn't use Bluetooth for something that needs to
work flawlessly 24/7. Not sure if the problem is the standard, the Android
stack, the IOIO stack, the dongles or whatever, but from my experience,
connection is not 100% reliable. If your code is tolerant to occasional
drops, you should be much better off.

Kevin, my hunch is that the exceptions you're seeing as result of the
disconnects have to do with your threading model rather than a problem
specific to the IOIO. Given that disconnects to happen, it is not clear to
me how and when your thread would notice that and reopen its streams in a
thread-safe way. Like PS proposes, spawning the UART reader threads from
setup and killing them on disconnect (typically, when they get an
IOException trying to read) is the recommended way to go about this. This
way you never need to worry about changing their pointers under their feet,
since the streams will not change throughout the lifetime of the thread.

On Mon, Dec 5, 2016 at 3:01 AM, P.S  wrote:

> Hi Kevin,
> I have been facing similar issues.
> 1. I tried the code similar to the one you posted on Github. It seems to
> lower down the disconnects if I read from UART in one thread and process
> the read data on another thread.
> 2. At times I saw that whenever the stream got closed IOIO was still
> connected. Its just that the stream somehow got closed. You can test it
> with a TRY/Catch. A BRUTE solution I am using is to restart the thread in
> this situation which is reading the UART. So In the Main service setup() I
> start all the threads. Then in loop() function I Check if all the threads
> reading UART and IO's are alive. If any of them is dead due to an exception
> but IOIO is still connected I re-init the thread.
> THis seems to reduce the number of times the system used to die.
>
> YTai: I have 7-8 IOIO's working with 2-3 different makes of Bluetooth
> dongles. But it seems the disconnection still happens atleast 3-4 times
> each day(my systems run 24x7). The flow for disconnections is similar to
> what Kevin shared. You talked about Calibrating the Oscillators could you
> share the link or give pointers where to search?
> PS
>
> On Monday, 5 December 2016 12:42:04 UTC+5:30, Kevin Miller wrote:
>>
>> On the log, the first highlighted lines, #921 - 924, say "IOIO
>> disconnected, Physical disconnect, and V/BluetoothIOIOConnection: Client
>> initiated disconnect" . That's not evidence of a disconnect? I don't know a
>> lot about the very low-level stuff, so perhaps I'd made some incorrect
>> assumptions.
>>
>> I will include the methods that catch (sometimes just before _flush() is
>> called and sometimes in _flush(), as this LogCat shows) the
>> "java.io.IOException: Stream has been closed", but a couple notes on the
>> Logcat:
>>
>>- Note: When I debug and single-step - it does not fail.
>>- The IOIOService is on a separate thread from the main thread.
>>- The LogCat messages with the S2Handler.* tag are from the
>>IOIOService.
>>- The device handler is on another thread, and its Logcat tags are
>>RpLidar.*
>>- The IOIO Service loop calls RpLidar.connect(UART uart) via a
>>messenger and passes a reference to the Uart configured in the IOIOService
>>setup()
>>- The RpLidar.connect sends a reset command to the Lidar and
>>receives some ASCII info from the Lidar such as serial number, etc.
>>- So far, so good.
>>- At about this point, the "IOIODisconnected" message is thrown, line
>>921 on LogCat
>>- It looks like the IOIO disconnected while receiving the data
>>because there's only 20 bytes available when normally it's 57  (line 941)
>>- In reset(), available() returns 20 just before _flush() is called.
>>Sometimes, a NullPointer Exception is thrown on the 
>> InputStream.available()
>>here.
>>- In this LogCat, the error is in _flush().
>>- Inside _flush() InputStream.available() and InputStream.read()are
>> called from the same try block and IOException "Stream has been closed" 
>> is
>>thrown. (line 942)
>>
>> Here is the flush method:
>>
>> private void _flushInput()
>> {
>> String TAG = "RpLidar._flushInput";
>>
>> final int arrSize = 1000;   // assume no more than this many characters 
>> in response
>> byte[] readBuffer = new byte[arrSize];
>>
>> try
>> {
>> while( _inputStream.available() > 0 )
>> _inputStream.read( readBuffer );
>> } catch (IOException e) {
>> e.printStackTrace();
>> Log.d(TAG,e.getLocalizedMessage()); //line 956 in LogCat
>> }
>> }
>>
>>
>> Here is the reset() method that calls _flush(). It's go a lot of waits and 
>> sleeps and yields because of troubleshooting in progress:
>>
>> /**
>>  * Reset(reboot) the RPLIDAR core
>>  * No response is defined in documentation, but testing shows some text 
>> is returned
>>  * and is flushed - See comments for details.
>>  * 

Re: Frequent disconnect()/setup() in IOIO Service

2016-12-04 Thread Ytai Ben-Tsvi
I would try a different dongle and/or recalibrate the IOIO oscillator as
described in the wiki under calibration wipe. I've seen cases where data
losses occur silently with some dongle/phone combination, resulting in a
disconnect.
>From your logs I see no evidence of disconnects though. Would you share
your code?

On Dec 3, 2016 8:52 PM, "Kevin Miller"  wrote:

> It looks like the problem is related to Bluetooth after all. When I use
> the UART for several exchanges, the Bluetooth disconnects 6 times out of
> 10. See attached Logcat.I've tried two different phones.
>
> I see others have had similar issues. Any suggestions? I only need
> Bluetooth for debugging, but I'm dead in the water now.
>
> Kevin
>
> On Wednesday, November 30, 2016 at 5:54:17 PM UTC-5, Kevin Miller wrote:
>>
>> Hello,
>> I've got a really big project nearing completion, but now that I'm
>> getting into the fine details of UART communication, I'm having a problem
>> with frequent disconnect()/setup() cycles which is interfering with the
>> serial communications. I'm using Bluetooth for developing, but I don't
>> think that is the cause because when I run the basic HelloIOIOService
>> example, it is rock solid. What other reasons could be causing the
>> disconnect? Is there some way to dig deeper to see what is causing the
>> disconnects?
>>
>>
>> Thanks,
>> Kevin
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Can I jump 3.3v pin directly to input pin?

2016-11-19 Thread Ytai Ben-Tsvi
Yes, that should work fine, as long as you remember to use a pull down
resistor on the pin (either internal or external) to assert a valid 'low'
condition when the relay is open.
Another way to accomplish the same thing, which is probably what I would
do, is to have the relay pull to GND while using a pull UP on the pin. It
doesn't really matter.

On Nov 15, 2016 22:18, "David Messem"  wrote:

> I have another device with a relay, and I want to use the IOIO to sense
> the state of that relay.
>
> I thought I would connect the input of the relay to the 3.3v pin, and
> connect the output of the relay to a GPIO pin.
> I this way, the GPIO pin will read 0v when the relay is open, and 3.3v
> when the relay is closed.
>
> On Tuesday, November 15, 2016 at 10:16:51 PM UTC+2, Ytai wrote:
>>
>> Yeah sure, all pins can handle 0..3.3V (and some up to 5V).
>> What you're describing sounds a bit strange, but maybe only because I
>> don't fully understand what you're trying to do.
>>
>> On Mon, Nov 14, 2016 at 10:05 PM, David Messem 
>> wrote:
>>
>>> Hi IOIO users!
>>>
>>> Apologies if this is a silly question, I am an electronics noob, and I
>>> am worried about damaging the board.
>>>
>>> Can I jump a 3.3v pin directly to an input pin?
>>> I want to send 3.3v to a relay, then send back the 3.3v into a pin when
>>> the relay is triggered.
>>>
>>> Thanks!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Can I jump 3.3v pin directly to input pin?

2016-11-15 Thread Ytai Ben-Tsvi
Yeah sure, all pins can handle 0..3.3V (and some up to 5V).
What you're describing sounds a bit strange, but maybe only because I don't
fully understand what you're trying to do.

On Mon, Nov 14, 2016 at 10:05 PM, David Messem 
wrote:

> Hi IOIO users!
>
> Apologies if this is a silly question, I am an electronics noob, and I am
> worried about damaging the board.
>
> Can I jump a 3.3v pin directly to an input pin?
> I want to send 3.3v to a relay, then send back the 3.3v into a pin when
> the relay is triggered.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Max Speed of UART?

2016-10-20 Thread Ytai Ben-Tsvi
Yes. The achievable rates are all of:
400 / N
100 / N

for any N in 1..65536

So, for example, you can do 4M or 2M or 1.33M or 1M, etc.

On Thu, Oct 20, 2016 at 3:12 PM, Jose Rojo  wrote:

> hi..  I tried UART  up to 115200 bps...  question.. can the IOIO OTG go
> beyond  115200 ?   let's say 256k   or even 1 Mbps?   Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Constant disconnect 2x ioio on bluetooth

2016-10-10 Thread Ytai Ben-Tsvi
OK. I will try to use your bundle and see if I can figure it out. Might be
a few days.

On Mon, Oct 10, 2016 at 11:52 AM, Martin Jensen  wrote:

> It's still responsive. With same program I can write the standard firmware
> right after.
> Versions output:
>
> IOIO Bootloader detected.
>
> Hardware version: SPRK0020
> Bootloader version: IOIO0400
> Platform version: IOIO0030
>
>
> Den mandag den 10. oktober 2016 kl. 20.47.14 UTC+2 skrev Ytai:
>>
>> After this failure, is the IOIO bootloader still responsive, i.e. if you
>> run ioiodude versions, what do you get?
>>
>> On Mon, Oct 10, 2016 at 11:42 AM, Martin Jensen  wrote:
>>
>>> There you go:
>>>
>>> Writing image...
>>> java.io.IOException  ]
>>> at purejavacomm.PureJavaSerialPort$1.write(PureJavaSerialPort.
>>> java:642)
>>> at ioio.dude.IOIODudeMain.writeImage(IOIODudeMain.java:213)
>>> at ioio.dude.IOIODudeMain.writeCommand(IOIODudeMain.java:179)
>>> at ioio.dude.IOIODudeMain.main(IOIODudeMain.java:124)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>>> Source)
>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>> at com.simontuffs.onejar.Boot.run(Boot.java:313)
>>> at com.simontuffs.onejar.Boot.main(Boot.java:161)
>>> Caught IOException. Exiting.null
>>>
>>> Den mandag den 10. oktober 2016 kl. 20.30.48 UTC+2 skrev Ytai:

 Yeah, you should be able to build ioiodude yourself from source. It's
 on GitHub as part of the IOIO repository.

 On Mon, Oct 10, 2016 at 11:21 AM, Martin Jensen 
 wrote:

> I managed to put the standard firmware on it just fine with
> ioiodude103. I'm gonna see if I can get the dump from the ioexception on
> ioiodude
>
> Den søndag den 9. oktober 2016 kl. 23.27.53 UTC+2 skrev Ytai:
>>
>> You shouldn't need to change the bootloader. Not sure what the issue
>> is. Does flashing the stock bundles such as the application firmware or
>> blink work OK for you?
>>
>> On Oct 9, 2016 12:20 PM, "Martin Jensen"  wrote:
>>
>>> I think I'm gonna go with 65535 which will give about 30Hz instead.
>>> Should be much easier to handle.
>>>
>>> I have a file of 50 kb with a 50 kb file inside called ioio0030
>>> after using tools/make-ioio-bundle firmware/app_layer_v1/dist
>>> MyOutputBundle.ioioapp IOIO0030
>>> Maybe that's not what I need?
>>> Do I need a new bootloader too? Sorry for my ignorance, I don't play
>>> with the lower levels that often.
>>>
>>> Den onsdag den 5. oktober 2016 kl. 18.41.12 UTC+2 skrev Ytai:

 1. The errors you're seeing are a symptom of data corruption
 between the IOIO and the phone. I works suspect the dongle or the 
 phone.
 2. The timer value you're setting is limited to 16 bit, so 65535 is
 your max. You can slow down the timer or use a different one, but this 
 will
 have other implications, since those timers are used for other things 
 too.
 3. Are you seeing the ioiodude errors with the official ioioapp
 files or only with yours? If the latter, try to assess their validity 
 by
 unzipping them (they're really just zip archives) and examining their
 contents for reasonable size etc.

 On Oct 5, 2016 8:41 AM, "Martin Jensen"  wrote:

> I've got a new tablet Huawei Mediatab T1 with Android 4.4.1
>
> It runs, somewhat.
>
> Every now and then I get this:
>
> E/IOIOProtocol: Protocol error:
> ioio.lib.impl.IOIOProtocol$ProtocolError: Received
> unexpected command: 0x9
> at ioio.lib.impl.IOIOProtocol$IncomingThread.
> run(IOIOProtocol.java:928)
> D/IOIOImpl: Physical disconnect.
> V/BluetoothIOIOConnection: Client initiated disconnect
>
>
> Den mandag den 5. september 2016 kl. 23.09.36 UTC+2 skrev Martin
> Jensen:
>>
>> I've got two IOIO's on bluetooth which works on my two Samsung
>> tablets, Tab 2 7.0 (5.1.1) and Note 10.1 (6.0.1) but not on my 
>> Lenovo Tab 2
>> A7-10 (5.0)
>>
>> It gives me this:
>> 38.174 7938-8162/D/IOIOImpl: Waiting for IOIO connection
>> 38.174 7938-8162/V/IOIOImpl: Waiting for underlying connection
>> 38.174 7938-8162/D/BluetoothDevice: mAddress: 
>> 38.174 7938-8162/V/BluetoothIOIOConnection: Attempting to
>> connect to Bluetooth device: IOIO (71:14)
>> 38.174 7938-8162/W/BluetoothAdapter: getBluetoothService() called
>> 

Re: Constant disconnect 2x ioio on bluetooth

2016-10-10 Thread Ytai Ben-Tsvi
After this failure, is the IOIO bootloader still responsive, i.e. if you
run ioiodude versions, what do you get?

On Mon, Oct 10, 2016 at 11:42 AM, Martin Jensen  wrote:

> There you go:
>
> Writing image...
> java.io.IOException  ]
> at purejavacomm.PureJavaSerialPort$1.write(
> PureJavaSerialPort.java:642)
> at ioio.dude.IOIODudeMain.writeImage(IOIODudeMain.java:213)
> at ioio.dude.IOIODudeMain.writeCommand(IOIODudeMain.java:179)
> at ioio.dude.IOIODudeMain.main(IOIODudeMain.java:124)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at com.simontuffs.onejar.Boot.run(Boot.java:313)
> at com.simontuffs.onejar.Boot.main(Boot.java:161)
> Caught IOException. Exiting.null
>
> Den mandag den 10. oktober 2016 kl. 20.30.48 UTC+2 skrev Ytai:
>>
>> Yeah, you should be able to build ioiodude yourself from source. It's on
>> GitHub as part of the IOIO repository.
>>
>> On Mon, Oct 10, 2016 at 11:21 AM, Martin Jensen  wrote:
>>
>>> I managed to put the standard firmware on it just fine with ioiodude103.
>>> I'm gonna see if I can get the dump from the ioexception on ioiodude
>>>
>>> Den søndag den 9. oktober 2016 kl. 23.27.53 UTC+2 skrev Ytai:

 You shouldn't need to change the bootloader. Not sure what the issue
 is. Does flashing the stock bundles such as the application firmware or
 blink work OK for you?

 On Oct 9, 2016 12:20 PM, "Martin Jensen"  wrote:

> I think I'm gonna go with 65535 which will give about 30Hz instead.
> Should be much easier to handle.
>
> I have a file of 50 kb with a 50 kb file inside called ioio0030 after
> using tools/make-ioio-bundle firmware/app_layer_v1/dist
> MyOutputBundle.ioioapp IOIO0030
> Maybe that's not what I need?
> Do I need a new bootloader too? Sorry for my ignorance, I don't play
> with the lower levels that often.
>
> Den onsdag den 5. oktober 2016 kl. 18.41.12 UTC+2 skrev Ytai:
>>
>> 1. The errors you're seeing are a symptom of data corruption between
>> the IOIO and the phone. I works suspect the dongle or the phone.
>> 2. The timer value you're setting is limited to 16 bit, so 65535 is
>> your max. You can slow down the timer or use a different one, but this 
>> will
>> have other implications, since those timers are used for other things 
>> too.
>> 3. Are you seeing the ioiodude errors with the official ioioapp files
>> or only with yours? If the latter, try to assess their validity by
>> unzipping them (they're really just zip archives) and examining their
>> contents for reasonable size etc.
>>
>> On Oct 5, 2016 8:41 AM, "Martin Jensen"  wrote:
>>
>>> I've got a new tablet Huawei Mediatab T1 with Android 4.4.1
>>>
>>> It runs, somewhat.
>>>
>>> Every now and then I get this:
>>>
>>> E/IOIOProtocol: Protocol error:
>>> ioio.lib.impl.IOIOProtocol$ProtocolError: Received
>>> unexpected command: 0x9
>>> at ioio.lib.impl.IOIOProtocol$IncomingThread.run
>>> (IOIOProtocol.java:928)
>>> D/IOIOImpl: Physical disconnect.
>>> V/BluetoothIOIOConnection: Client initiated disconnect
>>>
>>>
>>> Den mandag den 5. september 2016 kl. 23.09.36 UTC+2 skrev Martin
>>> Jensen:

 I've got two IOIO's on bluetooth which works on my two Samsung
 tablets, Tab 2 7.0 (5.1.1) and Note 10.1 (6.0.1) but not on my Lenovo 
 Tab 2
 A7-10 (5.0)

 It gives me this:
 38.174 7938-8162/D/IOIOImpl: Waiting for IOIO connection
 38.174 7938-8162/V/IOIOImpl: Waiting for underlying connection
 38.174 7938-8162/D/BluetoothDevice: mAddress: 
 38.174 7938-8162/V/BluetoothIOIOConnection: Attempting to connect
 to Bluetooth device: IOIO (71:14)
 38.174 7938-8162/W/BluetoothAdapter: getBluetoothService() called
 with no BluetoothManagerCallback
 38.348 7938-8162/V/BluetoothIOIOConnection: Established connection
 to device IOIO (71:14) address: 
 38.349 7938-8162/V/IOIOImpl: Waiting for handshake
 38.382 7938-8261/I/IncomingState: IOIO Connection established.
 Hardware ID: SPRK0020 Bootloader ID: IOIO0400 Firmware ID: IOIO0506
 38.382 7938-8162/V/IOIOImpl: Querying for required interface ID
 38.407 7938-8162/V/IOIOImpl: Required interface ID is supported
 38.407 7938-8162/I/IOIOImpl: IOIO connection established
 38.609 7938-8261/I/IOIOProtocol: IOIO disconnected
 38.609 7938-8261/D/IOIOImpl: Physical disconnect.

Re: Constant disconnect 2x ioio on bluetooth

2016-10-10 Thread Ytai Ben-Tsvi
Yeah, you should be able to build ioiodude yourself from source. It's on
GitHub as part of the IOIO repository.

On Mon, Oct 10, 2016 at 11:21 AM, Martin Jensen  wrote:

> I managed to put the standard firmware on it just fine with ioiodude103.
> I'm gonna see if I can get the dump from the ioexception on ioiodude
>
> Den søndag den 9. oktober 2016 kl. 23.27.53 UTC+2 skrev Ytai:
>>
>> You shouldn't need to change the bootloader. Not sure what the issue is.
>> Does flashing the stock bundles such as the application firmware or blink
>> work OK for you?
>>
>> On Oct 9, 2016 12:20 PM, "Martin Jensen"  wrote:
>>
>>> I think I'm gonna go with 65535 which will give about 30Hz instead.
>>> Should be much easier to handle.
>>>
>>> I have a file of 50 kb with a 50 kb file inside called ioio0030 after
>>> using tools/make-ioio-bundle firmware/app_layer_v1/dist
>>> MyOutputBundle.ioioapp IOIO0030
>>> Maybe that's not what I need?
>>> Do I need a new bootloader too? Sorry for my ignorance, I don't play
>>> with the lower levels that often.
>>>
>>> Den onsdag den 5. oktober 2016 kl. 18.41.12 UTC+2 skrev Ytai:

 1. The errors you're seeing are a symptom of data corruption between
 the IOIO and the phone. I works suspect the dongle or the phone.
 2. The timer value you're setting is limited to 16 bit, so 65535 is
 your max. You can slow down the timer or use a different one, but this will
 have other implications, since those timers are used for other things too.
 3. Are you seeing the ioiodude errors with the official ioioapp files
 or only with yours? If the latter, try to assess their validity by
 unzipping them (they're really just zip archives) and examining their
 contents for reasonable size etc.

 On Oct 5, 2016 8:41 AM, "Martin Jensen"  wrote:

> I've got a new tablet Huawei Mediatab T1 with Android 4.4.1
>
> It runs, somewhat.
>
> Every now and then I get this:
>
> E/IOIOProtocol: Protocol error:
> ioio.lib.impl.IOIOProtocol$ProtocolError: Received
> unexpected command: 0x9
> at ioio.lib.impl.IOIOProtocol$IncomingThread.run(
> IOIOProtocol.java:928)
> D/IOIOImpl: Physical disconnect.
> V/BluetoothIOIOConnection: Client initiated disconnect
>
>
> Den mandag den 5. september 2016 kl. 23.09.36 UTC+2 skrev Martin
> Jensen:
>>
>> I've got two IOIO's on bluetooth which works on my two Samsung
>> tablets, Tab 2 7.0 (5.1.1) and Note 10.1 (6.0.1) but not on my Lenovo 
>> Tab 2
>> A7-10 (5.0)
>>
>> It gives me this:
>> 38.174 7938-8162/D/IOIOImpl: Waiting for IOIO connection
>> 38.174 7938-8162/V/IOIOImpl: Waiting for underlying connection
>> 38.174 7938-8162/D/BluetoothDevice: mAddress: 
>> 38.174 7938-8162/V/BluetoothIOIOConnection: Attempting to connect to
>> Bluetooth device: IOIO (71:14)
>> 38.174 7938-8162/W/BluetoothAdapter: getBluetoothService() called
>> with no BluetoothManagerCallback
>> 38.348 7938-8162/V/BluetoothIOIOConnection: Established connection
>> to device IOIO (71:14) address: 
>> 38.349 7938-8162/V/IOIOImpl: Waiting for handshake
>> 38.382 7938-8261/I/IncomingState: IOIO Connection established.
>> Hardware ID: SPRK0020 Bootloader ID: IOIO0400 Firmware ID: IOIO0506
>> 38.382 7938-8162/V/IOIOImpl: Querying for required interface ID
>> 38.407 7938-8162/V/IOIOImpl: Required interface ID is supported
>> 38.407 7938-8162/I/IOIOImpl: IOIO connection established
>> 38.609 7938-8261/I/IOIOProtocol: IOIO disconnected
>> 38.609 7938-8261/D/IOIOImpl: Physical disconnect.
>> 38.609 7938-8261/V/BluetoothIOIOConnection: Client initiated
>> disconnect
>>
>>
> Then I get this:
> E/IOIOProtocol: Protocol error:
> ioio.lib.impl.IOIOProtocol$ProtocolError:
> java.lang.ArrayIndexOutOfBoundsException: length=47; index=110
> at ioio.lib.impl.IOIOProtocol$Inc
> omingThread.run(IOIOProtocol.java:941)
>  Caused by: java.lang.ArrayIndexOutOfBoundsException:
> length=47; index=110
> at ioio.lib.impl.IncomingState.ha
> ndleAnalogPinStatus(IncomingState.java:288)
> at ioio.lib.impl.IOIOProtocol$Inc
> omingThread.run(IOIOProtocol.java:762)
>
> Furthermore:
>
> E/IOIOProtocol: Protocol error:
> ioio.lib.impl.IOIOProtocol$ProtocolError:
> java.lang.NullPointerException
> at ioio.lib.impl.IOIOProtocol$Inc
> omingThread.run(IOIOProtocol.java:941)
>  Caused by: java.lang.NullPointerException
> at ioio.lib.impl.IncomingState$Da
> taModuleState.dataReceived(IncomingState.java:120)
> at ioio.lib.impl.IncomingState.ha
> 

Re: UART Best Practices?

2016-10-09 Thread Ytai Ben-Tsvi
Hey, see inline.

On Wed, Oct 5, 2016 at 2:52 PM, Kevin Miller  wrote:

> I'm connecting a IOIO to a hobbyist robot which also has a UART. I plan to
> use the IOIOService because there will be other sensors attached to the
> IOIO by UART and I want to be able to handle I/O in a timely manner. Is
> there a full, simple example of using a UART (or 2) in a service?
>

Not that I'm aware of, but there's not much to it. If you look at the
HelloIOIOService example app together with the UART JavaDocs and/or wiki
page, you should be able to get going fairly easily (at least as far as
using the UART).


> I have several questions:
>
> 1. If there is a temporary loss of connection, say a Bluetooth hiccup,
> what disconnected() do with the UARTs? There may be data in the buffers,
> will it be lost? Will the uart created by openUart() be destroyed/undefined?
>

Upon disconnect, the IOIO instance and all the interfaces created from it
(Uart included) become invalid. If there's any unread data it will be lost.


> Should the setup() skip openUart() if it was opened in a previous setup()?
>

No. The next setup() gets a fresh instance of the IOIO, that is, it start
from a clean state again.


>
> Thanks,
> Kevin
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Constant disconnect 2x ioio on bluetooth

2016-10-05 Thread Ytai Ben-Tsvi
1. The errors you're seeing are a symptom of data corruption between the
IOIO and the phone. I works suspect the dongle or the phone.
2. The timer value you're setting is limited to 16 bit, so 65535 is your
max. You can slow down the timer or use a different one, but this will have
other implications, since those timers are used for other things too.
3. Are you seeing the ioiodude errors with the official ioioapp files or
only with yours? If the latter, try to assess their validity by unzipping
them (they're really just zip archives) and examining their contents for
reasonable size etc.

On Oct 5, 2016 8:41 AM, "Martin Jensen"  wrote:

> I've got a new tablet Huawei Mediatab T1 with Android 4.4.1
>
> It runs, somewhat.
>
> Every now and then I get this:
>
> E/IOIOProtocol: Protocol error:
> ioio.lib.impl.IOIOProtocol$ProtocolError: Received
> unexpected command: 0x9
> at ioio.lib.impl.IOIOProtocol$IncomingThread.run(
> IOIOProtocol.java:928)
> D/IOIOImpl: Physical disconnect.
> V/BluetoothIOIOConnection: Client initiated disconnect
>
>
> Den mandag den 5. september 2016 kl. 23.09.36 UTC+2 skrev Martin Jensen:
>>
>> I've got two IOIO's on bluetooth which works on my two Samsung tablets,
>> Tab 2 7.0 (5.1.1) and Note 10.1 (6.0.1) but not on my Lenovo Tab 2 A7-10
>> (5.0)
>>
>> It gives me this:
>> 38.174 7938-8162/D/IOIOImpl: Waiting for IOIO connection
>> 38.174 7938-8162/V/IOIOImpl: Waiting for underlying connection
>> 38.174 7938-8162/D/BluetoothDevice: mAddress: 
>> 38.174 7938-8162/V/BluetoothIOIOConnection: Attempting to connect to
>> Bluetooth device: IOIO (71:14)
>> 38.174 7938-8162/W/BluetoothAdapter: getBluetoothService() called with no
>> BluetoothManagerCallback
>> 38.348 7938-8162/V/BluetoothIOIOConnection: Established connection to
>> device IOIO (71:14) address: 
>> 38.349 7938-8162/V/IOIOImpl: Waiting for handshake
>> 38.382 7938-8261/I/IncomingState: IOIO Connection established. Hardware
>> ID: SPRK0020 Bootloader ID: IOIO0400 Firmware ID: IOIO0506
>> 38.382 7938-8162/V/IOIOImpl: Querying for required interface ID
>> 38.407 7938-8162/V/IOIOImpl: Required interface ID is supported
>> 38.407 7938-8162/I/IOIOImpl: IOIO connection established
>> 38.609 7938-8261/I/IOIOProtocol: IOIO disconnected
>> 38.609 7938-8261/D/IOIOImpl: Physical disconnect.
>> 38.609 7938-8261/V/BluetoothIOIOConnection: Client initiated disconnect
>>
>>
> Then I get this:
> E/IOIOProtocol: Protocol error:
> ioio.lib.impl.IOIOProtocol$ProtocolError: java.lang.
> ArrayIndexOutOfBoundsException: length=47; index=110
> at ioio.lib.impl.IOIOProtocol$IncomingThread.run(
> IOIOProtocol.java:941)
>  Caused by: java.lang.ArrayIndexOutOfBoundsException:
> length=47; index=110
> at ioio.lib.impl.IncomingState.handleAnalogPinStatus(
> IncomingState.java:288)
> at ioio.lib.impl.IOIOProtocol$IncomingThread.run(
> IOIOProtocol.java:762)
>
> Furthermore:
>
> E/IOIOProtocol: Protocol error:
> ioio.lib.impl.IOIOProtocol$ProtocolError:
> java.lang.NullPointerException
> at ioio.lib.impl.IOIOProtocol$IncomingThread.run(
> IOIOProtocol.java:941)
>  Caused by: java.lang.NullPointerException
> at ioio.lib.impl.IncomingState$
> DataModuleState.dataReceived(IncomingState.java:120)
> at ioio.lib.impl.IncomingState.
> handleUartData(IncomingState.java:297)
> at ioio.lib.impl.IOIOProtocol$IncomingThread.run(
> IOIOProtocol.java:790)
> D/IOIOImpl: Physical disconnect.
> V/BluetoothIOIOConnection: Client initiated disconnect
>
>
>  I'm not sure I figured out how to turn the speed down on ADC, but I found
> Timer3 or something and set it from 1999 to 199 for 1 second instead, I
> might be wrong.
> Also I get:
> ioiodude --port=COM6 --reset --force write myioioApp.ioioapp
> Writing image...
> Caught IOException. Exiting.
>
> When trying to write it with IOIOdude. Maybe I'm not building right?
> I use make-all all with j8 for speed and then I use:
> tools/make-ioio-bundle firmware/app_layer_v1/dist MyOutputBundle.ioioapp
> IOIO0030
>
> to build it with.
>
>
>
>
>> So it's basically disconnecting / connecting all the time.
>>
>> I've noticed this line:
>> getBluetoothService() called with no BluetoothManagerCallback
>>
>> this only shows on my Lenovo tablet, but it's only a warning and Stack
>> Overflow says you can ignore this.
>>
>> Will this not work on my Lenovo tablet? or could I try something to make
>> it work universally? Tell me if you need some more information or I can
>> turn on debugging etc.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to 

Re: Constant disconnect 2x ioio on bluetooth

2016-10-02 Thread Ytai Ben-Tsvi
Should be easy. There are numerous threads on this forum about how to do
this. The first and most significant step is to be able to build and
install the stock firmware yourself. The rest is really easy.

On Oct 2, 2016 3:27 PM, "Martin Jensen"  wrote:

> Can I reprogram the IOIO to send much less frequently? Maybe a custom
> firmware?
>
> I only need something like 1 Hz or so for my project.
>
> Den søndag den 2. oktober 2016 kl. 21.22.41 UTC+2 skrev Martin Jensen:
>>
>> Okay thanks for the help I will be back
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Constant disconnect 2x ioio on bluetooth

2016-10-02 Thread Ytai Ben-Tsvi
The IOIO doesn't support hubs

On Oct 2, 2016 11:31, "Martin Jensen"  wrote:

> Yeah that must be it. I will look into the adapters first,however it seems
> the device is the problem. I've tried with a USB hub, but it said something
> about not having exactly two interfaces and worked only with one of the
> ioios.
> I tried to look it up but came up empty what could that be?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Debug Service Tips?

2016-09-29 Thread Ytai Ben-Tsvi
Can you please try a non IOIO app?

On Sep 29, 2016 16:03, "Kevin Miller"  wrote:

> It is specific to Android services. I can debug activities in the same
> app, but breakpoints and Log commands inside the IOIOService are ignored.
> The app is a slight derivation of the HelloIoioService example.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Debug Service Tips?

2016-09-29 Thread Ytai Ben-Tsvi
Are you able to debug any app using this setup? In other words, is this
problem specific to IOIO apps?

On Sep 29, 2016 12:39, "Kevin Miller"  wrote:

> I did a IOIO project a year ago with the same phone and same IOIO and same
> laptop, same BT dongle for the IOIO, and I'm pretty sure I had no problems
> using the Android Studio 2.0(?) debugger to step through the IOIOService.
> Now I have AS 2.2 and probably some Android updates on the phone and
> Windows updates. Here is my setup:
>
> Windows 7
> Android Studio 2.2
> Galaxy S3 with Android 4.4.2
>
> DDMS is not seeing the phone either - I believe that worked before, too.
>
> Does anyone have any tips for service debugging? Would IOIO bridge be
> helpful?
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Beginners IOIO guide using Android Studio?

2016-09-27 Thread Ytai Ben-Tsvi
https://learn.sparkfun.com/tutorials/ioio-otg-hookup-guide

On Tue, Sep 27, 2016 at 11:47 AM, Cesar Quiroz  wrote:

> Hello Ytai
>
> I wanna to install the software via Linux Ubuntu. How to procedure with
> this?
> I don't found tutorial to explain this.
>
> Can you help me, please?
> I have a ioio board and i want to put the ioio libraries into Android
> studio.
>
> Thanks
>
> Em segunda-feira, 7 de setembro de 2015 12:38:10 UTC-3, Ytai escreveu:
>>
>> Eclipse is deprecated for IOIO. Android studio is now the recommended IDE.
>> Not quite a step be step guide, but this should get you going:
>> https://github.com/ytai/ioio/wiki/Building-IOIO-Applications-With-Gradle
>> On Sep 7, 2015 8:36 AM, "Fried panseller"  wrote:
>>
>>> Hi, I just got an IOIO board. I found many tutorials telling me to
>>> install Eclipse and do stuff there. Is there anyway I can use Android
>>> Studio with it (I read alot of AS tutorials too and it was just confusing)
>>> With AS right now I can plug my android phone in and run apps.
>>> Can anyone post a step by step tutorial on how I could include IOIO with
>>> my app using Android Studio? and get their 'helloIOIO' program working.
>>>
>>> I'm like, completely new to Android Studio and IOIO
>>>
>>> Thanks!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Constant disconnect 2x ioio on bluetooth

2016-09-10 Thread Ytai Ben-Tsvi
Does this happen with the precompiled apps too?

On Mon, Sep 5, 2016 at 10:56 AM, Martin Jensen  wrote:

> I've got two IOIO's on bluetooth which works on my two Samsung tablets,
> Tab 2 7.0 (5.1.1) and Note 10.1 (6.0.1) but not on my Lenovo Tab 2 A7-10
> (5.0)
>
> It gives me this:
> 38.174 7938-8162/D/IOIOImpl: Waiting for IOIO connection
> 38.174 7938-8162/V/IOIOImpl: Waiting for underlying connection
> 38.174 7938-8162/D/BluetoothDevice: mAddress: 
> 38.174 7938-8162/V/BluetoothIOIOConnection: Attempting to connect to
> Bluetooth device: IOIO (71:14)
> 38.174 7938-8162/W/BluetoothAdapter: getBluetoothService() called with no
> BluetoothManagerCallback
> 38.348 7938-8162/V/BluetoothIOIOConnection: Established connection to
> device IOIO (71:14) address: 
> 38.349 7938-8162/V/IOIOImpl: Waiting for handshake
> 38.382 7938-8261/I/IncomingState: IOIO Connection established. Hardware
> ID: SPRK0020 Bootloader ID: IOIO0400 Firmware ID: IOIO0506
> 38.382 7938-8162/V/IOIOImpl: Querying for required interface ID
> 38.407 7938-8162/V/IOIOImpl: Required interface ID is supported
> 38.407 7938-8162/I/IOIOImpl: IOIO connection established
> 38.609 7938-8261/I/IOIOProtocol: IOIO disconnected
> 38.609 7938-8261/D/IOIOImpl: Physical disconnect.
> 38.609 7938-8261/V/BluetoothIOIOConnection: Client initiated disconnect
>
> So it's basically disconnecting / connecting all the time.
>
> I've noticed this line:
> getBluetoothService() called with no BluetoothManagerCallback
>
> this only shows on my Lenovo tablet, but it's only a warning and Stack
> Overflow says you can ignore this.
>
> Will this not work on my Lenovo tablet? or could I try something to make
> it work universally? Tell me if you need some more information or I can
> turn on debugging etc.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO OTG not connecting on Nexus 7 (2013)

2016-09-06 Thread Ytai Ben-Tsvi
I've definitely seen some dongles in the past that are what's called a USB
compound device, meaning they apart as a USB hub with one or more devices
hanging off of it. Those aren't supported since hubs are not supported.
There might be similar quirks with other dongles.

On Sep 6, 2016 6:39 PM, "Joseph Legris"  wrote:

> Hi YTai,
>
> Are you able to say why some BT Dongles work with the IOIO-OTG and others
> don't? Is there an article that explains this in some detail?
>
> Thanks!
>
> --
> Joe Legris
>
>
> On Wednesday, March 5, 2014 at 11:37:58 AM UTC-5, Ytai wrote:
>>
>> Hey,
>> I'm not using anything special. I'm using some dirt-cheap dongles I could
>> find on Amazon. Make sure the trim-pot is all the way clockwise (common
>> problem causing intermittent connection). Otherwise try the oscillator
>> recalibration process (described on the IOIODude wiki page) and/or a
>> different dongle.
>>
>>
>> On Tue, Mar 4, 2014 at 9:50 PM, Derek Fluegge 
>> wrote:
>>
>>> Hi Ytai,
>>> Which BT dongle are you using with your original N7? I haven't had any
>>> luck with the mini Dongle that Sparkfun sells and the OTG. I also tried an
>>> old Jabra BT that I had lying around and it worked okay until I started
>>> doing multichannel AI, and it kept resetting.
>>>
>>> Thanks in advance, and great work on getting the board out!
>>>
>>>
>>> On Saturday, October 19, 2013 9:26:38 PM UTC-7, Ytai wrote:
>>>
 I don't have the N7 2013. I'm regularly using the original N7 with the
 IOIO over USB (host, device) and Bluetooth.
 I need more info to be able to understand what's going on:

1. Does the charging icon on the N7 turn on when you plug in the
IOIO?
2. Make sure USB debugging is off. Does the open accessory dialog
pop up when you plug in the IOIO?

 Until this is resolved, don't bother with any app.


 On Sat, Oct 19, 2013 at 9:17 AM, Eddie Latuta  wrote:

> I have Nexus 7 2013 working very well over Bluetooth. In fact I have
> not experienced any connection problems over BT I have on Galaxy nexus
> On 19 Oct 2013 17:04, "laurent nocy"  wrote:
>
>> Hi,
>> I have the same problem on Nexus 7 2013 with ioio, and it's working
>> on a PC.
>> Some news or update about that ??
>>
>>
>> Le samedi 5 octobre 2013 02:49:27 UTC+2, Ytai a écrit :
>>>
>>> Some comments:
>>>
>>>1. If you're using 12V supply, make sure the wire between the
>>>supply and the IOIO is as short as possible.
>>>2. Forget about any Android application for now. If you plug the
>>>IOIO to the Android and do not get the open accessory connection 
>>> dialog, no
>>>app can save you from this.
>>>3. Is it working with a PC?
>>>4. Try the oscillator recalibration procedure described on the
>>>Wiki (IOIODude page).
>>>
>>>
>>>
>>> On Fri, Oct 4, 2013 at 1:56 AM, Luke O'Donnell 
>>> wrote:
>>>
 Hi All,

 I've recently purchased a Google Nexus 7 (2013), and am having
 trouble getting it to talk to IOIO OTG. At this staging, trying another
 android ROM is the only option i can think of. Any ideas?

 *Tablet Info:*

 Model: Nexus 7
 Manufacturer: Asus
 Product: razorg
 ID: JLS36G
 Android Version: 4.3
 Kernel Vesion: 3.4.0-gcee7856
 Current Rom: CyanogenMod 10.2-20130927 Nightly Build

 *IOIO Setup info:*

 I have 4 IOIO OTG's, all purchased from Sparkfun in the last 2-3
 months. Not sure software/bootloader versions.
 I am connecting them to power via a 12v wall adapter, which is
 rated for 2.0 amps. This is connected to the IOIO via the JTAG port.
 The IOIO is connected to the Nexus via the included OTG cable,
 using new Micro USB cables (i have tried at least 3).
 Charge turnpot turned to max.
 Switch set to "H"

 *Symptoms:*

 I cannot get either Hello IOIO or IOIO Hardware Tester to toggle
 the Status LED.

 *What i've tried:*

 *On Stock ROM (android 4.3):*

 I installed IOIO Hardware Tester on the tablet. I then tried to
 toggle the LED, without USB Debugging enabled. This did not work. I 
 then
 tried turning on USB Debugging and tried toggling the LED, this did not
 work. I also tried toggling USB Debugging on/off a few times, as per 
 the
 wiki article (albiet for the earlier nexus 7), this did not work.

 After trying different OTG and USB cables without success, i
 figured maybe it was something wrong with the stock rom. So i flashed 
 it
 with the latest CyanogenMod 

Re: New IOIO-OTG, dim LEDs?

2016-08-23 Thread Ytai Ben-Tsvi
What you're describing sounds like an electrical issue.
You get what you pay for... Those are low quality knock-offs, which are
unlikely tested before being shipped.
Might have better luck with a board from SparkFun and SeeedStudio, which is
guaranteed to be manufactured to high standard and carefully tested.


On Mon, Aug 22, 2016 at 6:59 PM, David King 
wrote:

> Just got an IOIO-OTG board, when I plug it in directly to my MacBook
> (USB-Micro B to USB) it lights the red PWR light, but immediately dims
> quite a bit. I jumped the boot and ground pins, and plugged it in and the
> stat light came on as well, and also immediately dimmed quite a bit.
>
> IOIO-OTG was bought from Amazon and has http://geeetech.com marked on the
> board itself.
>
> Any ideas to try before exchanging it?
>
> Thanks so much in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: about ioio and android

2016-08-01 Thread Ytai Ben-Tsvi
This doesn't seem like a IOIO specific question, but rather a general
question about exception handling in Java.
In short, you have to either catch the exception or specify it as being
thrown out of the calling method. Why is that a problem in your case?
See IOIOSimpleApp for an example for how to read analog inputs in case
that's what you're doing.

On Aug 1, 2016 1:21 PM,  wrote:

> How can I give the value of ioioController.getBatteryVoltage() [A method I
> wrote to get battery voltage] to a variable I declared as a float in
> android.
>
> The problem is that I need to do the try{} catch{} thing so I cant just
> say float b_v=ioioController.getBatteryVoltage();
>
> And more I hope to toast it
>
> Thanks guys for the help!
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: How to show a line graph?

2016-08-01 Thread Ytai Ben-Tsvi
This doesn't seem like a IOIO-related question. You might have better luck
on StackOverflow.

On Mon, Aug 1, 2016 at 3:53 PM, Ilan Tal  wrote:

> I've got the basic ioio connection going. I can sample 2 analogue pins.
> The next step is to try to graph the results.
> In dependencies I've got
>
> compile 'com.jjoe64:graphview:4.1.0'
>
> In MainActivity, onCreate I have (commented out)
>
> // graph1 = (GraphView) findViewById(R.id.graph1);
>
> In Looper I have (also commented out)
>
> // LineGraphSeries series = new LineGraphSeries<>(new 
> DataPoint[] {
> //   new DataPoint(0,3), new DataPoint(1,3), new DataPoint(2,6)
> //});
>
> In activity_main.xml I have (commented out)
>
> 
>
>
> When I run it I get the message hardware acceleration must be used, but I
> have in main.AndroidManifest.xml
>
> android:allowBackup="true"
>android:icon="@mipmap/ic_launcher"
>android:label="@string/app_name"
>android:supportsRtl="true"
>android:hardwareAccelerated="true"
>android:theme="@style/AppTheme">
>
> Since everything is essentially commented out, the program still runs in the 
> basic mode.
> As soon as I remove the commenting in activity_main.xml, the program crashes.
> I don't know if it is because the hardware acceleration isn't really on, or 
> what else could be wrong?
> Any comments would be greatly appreciated.
>
> Thanks,
> Ilan
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: (ADVANCED) Building the IOIO firmware

2016-07-30 Thread Ytai Ben-Tsvi
Does it work with the stock firmware bundles? If so, probably something
about your custom bundle being corrupted.

On Jul 30, 2016 19:02, "Tinuz77"  wrote:

> Hi Ytai,
>>
>
> Great work on the IOIO. I created a custom firmware for my lasertag
> project but i get the following error when trying to apply the firmware:
>
>
> ./ioiodude --port=/dev/tty.usbmodem1421 --reset write droidtagv1.ioioapp
>
> Protocol error:
>
> Unexpected response.
> Exiting.
>
> So no explicit errors. Can you put me back on track and have a probable
> cause?
>
> Thanks in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Reading simple int over UART from an Arduino

2016-07-30 Thread Ytai Ben-Tsvi
With the risk of stating the obvious, are the grounds of the IOIO and
Arduino connected?
I don't see any fundamental problem with the code, but maybe overlooking
something.

On Jul 30, 2016 05:16, "'Nick Jonas' via ioio-users" <
ioio-users@googlegroups.com> wrote:

> Hello!
>
> I'm trying to have an Arduino UNO send values to a IOIO board (
> https://github.com/ytai/ioio/wiki/UART) over UART.  As someone turns a
> rotary encoder, I want it to send a 0 for CW, 1 for CCW, and 2 for a
> press.  Everything checks out in the Serial Monitor from the Arduino, but I
> don't know how to read the values and parse them on the Java-end
> correctly.  It all comes through as seemingly random numbers, sometimes
> occasionally the correct number is there.
>
> I've tried both of these methods on the Arduino side, all of course work
> fine on Arduino's Serial Monitor:
>
> Serial.write(1);
>
>
> byte data[] = {1};
> Serial.write(data, 1);
>
>
> Serial.println("1");
>
>
> When doing Serial.write() with an integer or a byte array: on the Java
> side, I just get *mostly* 255, occasionally the correct number, and
> occasionally a random number in between 0 and 255:
>
> @Override
>   public void connect() throws ConnectionLostException {
> try{
>   // rx pin = 6
>   mUart = ioio_.openUart(RX_PIN, IOIO.INVALID_PIN, 9600, Parity.NONE,
> StopBits.ONE);
>   mInput = mUart.getInputStream();
>
>
> }
> catch(ConnectionLostException e){
>   Log.e(TAG, "connection lost:" + e.getMessage());
>   ioio_.disconnect();
>   throw e;
> }
>   }
>
>
>   @Override
>   public void loop(int loopCount) throws ConnectionLostException {
>
>
> try{
>   byte[] response = new byte[1];
>   int read = mInput.read();
>
>
> }catch(IOException e){
>   Log.d(TAG, "error: " + e.getMessage());
> }
>   }
>
>
> I've also tried using BufferedReaders, while passing Strings through
> Serial.println, but a lot of crazy characters were getting output from the
> Java side (tried encoding in both UTF-8 and ASCII).
>
> Baud rates are matched up at 9600, and I'm on a 5v RX pin on the IOIO, and
> that pin is connected to the TX pin (pin 1) on the Arduino Uno.
>
> Does anyone point to a simple way of transmitting & receiving an integer?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Problems with Debian ARM

2016-07-29 Thread Ytai Ben-Tsvi
You can check the release notes page on the wiki. I find it surprising that
it had anything to do with the firmware. Are you convinced that the
difference isn't only due to a IOIOLib version difference?

On Jul 25, 2016 00:56, "oliver.hadasch via ioio-users" <
ioio-users@googlegroups.com> wrote:

> It works, but it can not be the final solution.
> Now I am caught on firmware 0500.
>
> Do you ave an idea what changed between the 0500 firmware and the 0506
> firmware that could cause the different behavior?
> But also with 0500 its strange that I must oben and close the serial port
> before I can use it with the IOIO library.
>
>
> Am Samstag, 23. Juli 2016 10:29:57 UTC+2 schrieb Ytai:
>>
>> Yeah, unfortunately PureJavaComm is a bit inconsistent when it comes to
>> handling these corner cases. One opening sequence that works on Linux
>> wouldn't necessarily work on Windows or OSX etc. Glad you found a solution.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Problems with Debian ARM

2016-07-23 Thread Ytai Ben-Tsvi
Yeah, unfortunately PureJavaComm is a bit inconsistent when it comes to
handling these corner cases. One opening sequence that works on Linux
wouldn't necessarily work on Windows or OSX etc. Glad you found a solution.

On Jul 22, 2016 23:02, "oliver.hadasch via ioio-users" <
ioio-users@googlegroups.com> wrote:

> After some more testing I found a solution (or more a work around)
> When I open and close the com port with this code before calling the go
> method
>
> CommPortIdentifier identifier = 
> CommPortIdentifier.getPortIdentifier("/dev/IOIO0");
> CommPort commPort = identifier.open(*"*IOIO*"*, 2000);
>
> commPort.close();
>
> it works immediately after boot. But only with firmware 0500.
>
> With firmware 0506 it works only after disconnect / reconnect USB
>
> It looks like if it is the same problem that "Al Linke" described her:
> https://groups.google.com/forum/#!topic/ioio-users/owX8Zqb2Nj0
> He also mentioned that it works only after the second start of the
> application.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Problems with Debian ARM

2016-07-20 Thread Ytai Ben-Tsvi
Does /dev/IOIO0 exist after boot? If so, what happens if you try to access
it with 'screen'?

On Jul 21, 2016 12:14 AM, "oliver.hadasch via ioio-users" <
ioio-users@googlegroups.com> wrote:

> Sorry for the double posting, I thought it did not work.
>
> With IOIOLibCore-5.05.jar and IOIOLibPC-5.05.jar and firmware IOIO0506
>
> After boot:
>
> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0505
>
> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
>
> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
>
> [D/IOIOImpl] Waiting for IOIO connection
>
> [V/IOIOImpl] Waiting for underlying connection
>
> [V/IOIOImpl] Waiting for handshake
>
>
> After disconnect and reconnect from USB:
>
> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0505
>
> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
>
> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
>
> [D/IOIOImpl] Waiting for IOIO connection
>
> [V/IOIOImpl] Waiting for underlying connection
>
> [V/IOIOImpl] Waiting for handshake
>
> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
> Bootloader ID: IOIO0400 Firmware ID: IOIO0506
>
> [V/IOIOImpl] Querying for required interface ID
>
> [V/IOIOImpl] Required interface ID is supported
>
> [I/IOIOImpl] IOIO connection established
>
> INFO: IOIO-Looper created
>
>
> Am Mittwoch, 20. Juli 2016 21:04:08 UTC+2 schrieb Ytai:
>>
>> Use the latest firmware version. Try downgrading the library version to
>> the previous one.
>>
>> On Jul 20, 2016 9:51 PM, "oliver.hadasch via ioio-users" <
>> ioio-...@googlegroups.com> wrote:
>>
>>> Hi,
>>>
>>> I have a problem with a IOIO PC application on Debian ARM systems.
>>> Same problem on Banana pro with Debian 8, Raspberry PI with Debian 8 and
>>> Cubietruck with Debian 7.
>>> When the IOIO is connected to the USB-Port while the system boots, the
>>> application does not connect to the IOIO.
>>> When I connect the IOIO to the USB port after the system has booted, it
>>> works without any problems.
>>> On a mac book with El Capitan it also works as expected.
>>>
>>> udev rules are installed and in all cases I get the /dev/IOIO0 device
>>> and also the /dev/ttyACM0 device.
>>>
>>> *With aplication version IOIO0500:*
>>> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0507
>>> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
>>> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
>>> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
>>> [D/IOIOImpl] Waiting for IOIO connection
>>> [V/IOIOImpl] Waiting for underlying connection
>>> [V/IOIOImpl] Waiting for handshake
>>> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
>>> Bootloader ID: IOIO0400 Firmware ID: IOIO0500
>>> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
>>> Bootloader ID: IOIO0400 Firmware ID: IOIO0500
>>> [V/IOIOImpl] Querying for required interface ID
>>> -> here it stops
>>>
>>> When I start it once again it works.
>>> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0507
>>> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
>>> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
>>> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
>>> [D/IOIOImpl] Waiting for IOIO connection
>>> [V/IOIOImpl] Waiting for underlying connection
>>> [V/IOIOImpl] Waiting for handshake
>>> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
>>> Bootloader ID: IOIO0400 Firmware ID: IOIO0500
>>> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
>>> Bootloader ID: IOIO0400 Firmware ID: IOIO0500
>>> [V/IOIOImpl] Querying for required interface ID
>>> [V/IOIOImpl] Required interface ID is supported
>>> [I/IOIOImpl] IOIO connection established
>>>
>>>
>>> *With aplication version IOIO0506:*
>>> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0507
>>> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
>>> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
>>> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
>>> [D/IOIOImpl] Waiting for IOIO connection
>>> [V/IOIOImpl] Waiting for underlying connection
>>> -> here it stops
>>>
>>> Starting it once again does also not work with IOIO0506
>>>
>>> After disconnecting the IOIO from USB and reconnecting it, it works:
>>> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0507
>>> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
>>> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
>>> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
>>> [D/IOIOImpl] Waiting for IOIO connection
>>> [V/IOIOImpl] Waiting for underlying connection
>>> [V/IOIOImpl] Waiting for handshake
>>> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
>>> Bootloader ID: IOIO0400 Firmware ID: IOIO0506
>>> 

Re: Problems with Debian ARM

2016-07-20 Thread Ytai Ben-Tsvi
Use the latest firmware version. Try downgrading the library version to the
previous one.

On Jul 20, 2016 9:51 PM, "oliver.hadasch via ioio-users" <
ioio-users@googlegroups.com> wrote:

> Hi,
>
> I have a problem with a IOIO PC application on Debian ARM systems.
> Same problem on Banana pro with Debian 8, Raspberry PI with Debian 8 and
> Cubietruck with Debian 7.
> When the IOIO is connected to the USB-Port while the system boots, the
> application does not connect to the IOIO.
> When I connect the IOIO to the USB port after the system has booted, it
> works without any problems.
> On a mac book with El Capitan it also works as expected.
>
> udev rules are installed and in all cases I get the /dev/IOIO0 device and
> also the /dev/ttyACM0 device.
>
> *With aplication version IOIO0500:*
> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0507
> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
> [D/IOIOImpl] Waiting for IOIO connection
> [V/IOIOImpl] Waiting for underlying connection
> [V/IOIOImpl] Waiting for handshake
> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
> Bootloader ID: IOIO0400 Firmware ID: IOIO0500
> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
> Bootloader ID: IOIO0400 Firmware ID: IOIO0500
> [V/IOIOImpl] Querying for required interface ID
> -> here it stops
>
> When I start it once again it works.
> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0507
> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
> [D/IOIOImpl] Waiting for IOIO connection
> [V/IOIOImpl] Waiting for underlying connection
> [V/IOIOImpl] Waiting for handshake
> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
> Bootloader ID: IOIO0400 Firmware ID: IOIO0500
> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
> Bootloader ID: IOIO0400 Firmware ID: IOIO0500
> [V/IOIOImpl] Querying for required interface ID
> [V/IOIOImpl] Required interface ID is supported
> [I/IOIOImpl] IOIO connection established
>
>
> *With aplication version IOIO0506:*
> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0507
> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
> [D/IOIOImpl] Waiting for IOIO connection
> [V/IOIOImpl] Waiting for underlying connection
> -> here it stops
>
> Starting it once again does also not work with IOIO0506
>
> After disconnecting the IOIO from USB and reconnecting it, it works:
> [I/IOIOBaseApplicationHelper] Using IOIOLib version: IOIO0507
> [D/IOIOConnectionRegistry] Successfully added bootstrap class:
> ioio.lib.pc.SerialPortIOIOConnectionBootstrap
> [D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
> [D/IOIOImpl] Waiting for IOIO connection
> [V/IOIOImpl] Waiting for underlying connection
> [V/IOIOImpl] Waiting for handshake
> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
> Bootloader ID: IOIO0400 Firmware ID: IOIO0506
> [I/IncomingState] IOIO Connection established. Hardware ID: SPRK0020
> Bootloader ID: IOIO0400 Firmware ID: IOIO0506
> [V/IOIOImpl] Querying for required interface ID
> [V/IOIOImpl] Required interface ID is supported
> [I/IOIOImpl] IOIO connection established
>
> The way how I start it is a class derived from IOIOConsoleApp with run,
> createIOIOLooper, ...
>
> Hardware version: SPRK0020
> Bootloader version: IOIO0400
>
> Libraries in my aplication are: IOIOLibCore-5.07.jar and IOIOLibPC-5.07.jar
>
> I am now fighting since days to find a way to get it running automatically
> after the system boots (/etc/init.d/...)
>
> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: How can I connect to ioio?

2016-07-09 Thread Ytai Ben-Tsvi
Since you're not using the provided application framework, what you need to
look at is not how the example applications work (because they *do* use
it), but rather how the framework itself works.
A good starting point is here:
https://github.com/ytai/ioio/blob/master/software/IOIOLibAndroid/src/main/java/ioio/lib/util/android/IOIOActivity.java
Especially pay attention to how this class interacts with
IOIOAndroidApplicationHelper, which is what eventually processes
USB-related events. You don't have to do things the exact same way, but
conceptually you'd have to have the same kind of interaction with Android.
Expect to have some learning to do and probably some trial and error in
order to cover all the corner cases of possible sequences of application
start/stop, USB connect/disconnect etc.


On Sat, Jul 9, 2016 at 10:25 PM, István Rostás  wrote:

> I don't know how to do it. Can you give me some orientation about it? Is
> there some missing thing to work at last?
> The existing apps don't help me, because I can't have directly none of
> activity to extend of or starting service. I would love use them, this
> would be the best way I know, as I can use the helloioio. All the three
> example app is red by me the last byte also the other stuffs but no
> solution for me.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: MPLAB X with IOIO Bootloader

2016-07-08 Thread Ytai Ben-Tsvi
Yes, you can definitely do that. This is exactly how the firmware upgrades
I'm distributing work.
Once you have a hex file, there are a bunch of utilities in the /tools
directory that help you convert it to a .ioioapp bundle file, which can
then be read by IOIODude and flashed on the IOIO over USB.

On Fri, Jul 8, 2016 at 7:17 AM, Mark Hansen  wrote:

> Hello,
>
> Is it possible to download and run a MPLAB X project *without* using a
> programming pod (e.g. PICKit 3) or an Android device? Does the IOIO
> built-in bootloader support downloading MPLAB X projects with C source code
> directly over the USB connection? I am trying to run custom C code on the
> PIC24FJ microcontroller
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Temperature rating of IoIo Board

2016-07-08 Thread Ytai Ben-Tsvi
The table titled "internal RC accuracy" in the datasheet specifies a
typical 0.15% deviation, but a worst case 1% across the temperature range.
USB's nominal requirement is 0.25%. So if you want to be 100% certain you'd
need to add a crystal to the circuit (and make a configuration flag change
in the bootloader). Otherwise, you can characterize it yourself and see how
bad it actually gets.

On Fri, Jul 8, 2016 at 5:18 PM, Pranay Sharma 
wrote:

> HI Ytai,
> I checked the data sheet of the PIC micro used in IOIO board but I am not
> able to figure out which graph to see to understand the oscillators
> behaviour to temprature changes.
> Further, is there a link to exact BOM of the parts used for IOIO with
> exact part names?
> Thanks for your time
>
> On Friday, July 8, 2016 at 6:56:40 AM UTC+5:30, Ytai wrote:
>>
>> I haven't done any work to characterize the temperature range or design
>> for a specific one. You'd have to do that be checking the datasheets of the
>> individual parts. I'm assuming that 85C should be safe for most if not all
>> parts. Another thing you'd need to evaluate is how stable the internal
>> oscillator of the PIC is across the temperature range. USB is pretty picky
>> about the precision of its clock.
>>
>> On Wed, Jul 6, 2016 at 12:59 PM, Pranay Sharma 
>> wrote:
>>
>>> Dear ALL,
>>> Could someone put some light on what are the temperature ranges for
>>> proper operation of the IOIO board.
>>>
>>> I was thinking to use this board for a product which would be put
>>> outdoors where maximum temperature in summers is 45Deg Celcius.
>>> So the expected temperature inside the board could easily reach 55deg or
>>> 60Deg.
>>>
>>> BR
>>> Pranay
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Temperature rating of IoIo Board

2016-07-07 Thread Ytai Ben-Tsvi
I haven't done any work to characterize the temperature range or design for
a specific one. You'd have to do that be checking the datasheets of the
individual parts. I'm assuming that 85C should be safe for most if not all
parts. Another thing you'd need to evaluate is how stable the internal
oscillator of the PIC is across the temperature range. USB is pretty picky
about the precision of its clock.

On Wed, Jul 6, 2016 at 12:59 PM, Pranay Sharma 
wrote:

> Dear ALL,
> Could someone put some light on what are the temperature ranges for proper
> operation of the IOIO board.
>
> I was thinking to use this board for a product which would be put outdoors
> where maximum temperature in summers is 45Deg Celcius.
> So the expected temperature inside the board could easily reach 55deg or
> 60Deg.
>
> BR
> Pranay
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO Wishlist - tell us what you want!

2016-07-01 Thread Ytai Ben-Tsvi
Bit banging is not something that is typically possible with the IOIO.
Implement general purpose support is a lot of work and probably involved
implementing some kind of a small interpreter running the IOIO.
I'm not currently planning on adding 1-wire support either, as it is not a
super popular interface. If you're interested, you can try to add support
yourself and I'll do my best to help.
If you have control over the sensor, I'd say your easiest solution is
probably a sensor with a more standard interface, such as the tmp102.
On Jul 1, 2016 1:22 AM, "Michał Kurasik"  wrote:

> Hi,
> Do you have any plans to add 1-wire support to IOIO?
> Or maybe you can add simple delayUs method? I am trying to implement
> DS18B20 sensor with IOIO lib but without success.
> Problem is that communication with the board is slow and changing pin
> output took around 2ms and for control 1-wire protocol It is too slow.
> I found solution to change pin faster (In batch block od IOIO - it is
> around 10us to change pin output) but I can't get the appropriate times
> without delay function.
> Of course I am talking about delay method on IOIO board side which can be
> called by IOIO lib on Android.
>
> Cheers
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO firmware upgrade using Windows 10

2016-06-30 Thread Ytai Ben-Tsvi
Here's how to force an oscillator calibration:
https://github.com/ytai/ioio/wiki/IOIO-OTG-Bootloader-and-IOIODude#configuration-wipe

The blink app does not identify itself as a USB device, so it is expected
that you'll only be able to talk to your PC from the bootloader at this
point. Does it blink the on-board LED? I don't know why the flashing fails
to complete. I don't believe it is related to Windows 10. Sounds more like
a problem with the IOIO. Did it ever work? Did you get it from a known
manufacturer?

On Wed, Jun 29, 2016 at 10:44 PM,  wrote:

> I have tried to write the small blink.ioioapp, this does not give
> IOException, it seems to write it, but then hangs, and the app does not
> start.
> I upgraded the windows driver to the latest digitally signed version, but
> no help, same IOException.
> I think I have damaged app now, because windows does not recognize the
> IOIO, when in app-mode, but when the bootloader-mode is entered, IOIO is
> detected. Connection is ok, because the version query always succeeds.
> How do I recalibrate the IOIO oscillator ?
>
> torstai 30. kesäkuuta 2016 0.08.44 UTC+3 Ytai kirjoitti:
>>
>> There is now a signed Windows driver on the downloads page. This will get
>> rid of the signing warning, but I don't think this is actually the problem.
>> I've definitely used Windows 10 for IOIO upgrades many times with the old
>> driver. Is the connection to the IOIO solid? Have you tried recalibrating
>> the IOIO oscillator? Have you tried writing a different ioioapp file?
>>
>> On Wed, Jun 29, 2016 at 11:37 AM,  wrote:
>>
>>> Hello !
>>> I just got my latest IOIO board and have to upgrade the firmware. I have
>>> entered the bootloader mode, and Windows 10 is detecting the board as COM7.
>>> So the versions I get the following results:
>>> D:\IOIODude>ioiodude --port=com7 versions
>>> IOIO Bootloader detected.
>>>
>>> Hardware version: SPRK0020
>>> Bootloader version: IOIO0400
>>> Platform version: IOIO0030
>>>
>>> In the IOIOdude directory I have
>>> D:\IOIODude>dir
>>>  Volume in drive D is Data1
>>>  Volume Serial Number is 7092-F163
>>>
>>>  Directory of D:\IOIODude
>>>
>>> 23.06.2016  06:47  .
>>> 23.06.2016  06:47  ..
>>> 19.08.2014  08:24   168 236 App-IOIO0330.ioioapp
>>> 14.08.2014  09:25   185 269 App-IOIO0500.ioioapp
>>> 23.06.2016  06:46   191 319 App-IOIO0506.ioioapp
>>> 19.08.2014  08:20 1 981 Blink-IOIO0003.ioioapp
>>> 14.08.2014  09:40 3 358 ioio.inf
>>> 23.06.2016  06:4363 ioiodude
>>> 23.06.2016  06:4334 ioiodude.bat
>>> 23.06.2016  06:43 1 122 923 ioiodude.jar
>>>8 File(s)  1 673 183 bytes
>>>2 Dir(s)  491 300 593 664 bytes free
>>>
>>> However when upgrading I get:
>>> D:\IOIODude>ioiodude --port=com7  write App-IOIO0506.ioioapp
>>> Comparing fingerprints...
>>> Fingerprint mismatch.
>>> Writing image...
>>> Caught IOException. Exiting.###  ]
>>>
>>> If I add the --force option the write process just hangs. So what is the
>>> problem ?  Do I have to upgrade the USB driver in W10 ? If I try to upgrade
>>> the driver using ioio.inf,
>>> W10 says, that it is not digitally signed.
>>> Has anybody managed to do this upgrade process using Windows 10 ?
>>> Ytai, can you test this upgrade process in W10 and possibly update the
>>> documentation, if something is missing, because we do not have the previous
>>> windows-versions anymore.
>>> Thanks for the great product, If I just could get it working  again !
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO Output

2016-06-25 Thread Ytai Ben-Tsvi
There are various ways to do this. Once of the simpler ones is to have some
communication mechanism between the UI thread and the IOIO thread, such as
a shared variable holding the file object, or null if nothing is to be
sent. You can then use Java's wait/notify to synchronize the threads, e.g.
the main thread would write to the variable, then notify, and the IOIO
thread will block on wait until the variable is not null.
On Jun 25, 2016 10:58 AM, "Mithlesh Gurtoo" 
wrote:

Hlo everyone I'm in need of help. I've a file which has to be output
through ioio pins. Main problem lies in fact that I can't connect my file
out strem for button activity with IoIo looper class. so if anybody have
some reference or suggestion plz feel free to share. Really need some help
being struck at this point for about 4-5 days. Thanks all.

-- 
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Using the IOIO with Android 6

2016-06-24 Thread Ytai Ben-Tsvi
I don't think there's anything fundamentally problematic with Android 6.
You definitely need to have USB debugging off. If the accessory dialog
doesn't pop up, it is more likely a problem with the tablet than with the
IOIO.
You may try running the IOIO in device mode and see whether this works.
On Jun 24, 2016 6:42 PM, "Kris Dos Santos"  wrote:

> Hey all,
>
> I'm currently using the IOIO for a robotics platform that I'm developing
>
> Thing is, I'm getting a custom built tablet to run Android 6 on our
> platform, and the IOIO has already decided that it will not interface with
> it.  Now, I've already enable USB debugging, charging comes up, the little
> "bug" comes up, but I go to run HelloIOIO, and the button does not enable
> (even when I disable USB debugging).
>
> I tested this against my Samsung S7 running Android 6, and it works just
> fine (it's even able to do PWM control).  But I'm stuck right now.  Any
> help would be greatly appreciated.
>
> Thanks,
> Kris
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Parallax Ping))) untrasonic sensor porblems with ioio V1 board

2016-06-22 Thread Ytai Ben-Tsvi
You can check the release notes page on the wiki. I strongly recommend
against using old versions of the library.

On Wed, Jun 22, 2016 at 9:58 AM, <vic.wintr...@jointheleague.org> wrote:

> It's iARoC time again, and we are having ultrasonic problems again!  This
> year I am using only 4-pin sensors like you recommend and OTG.
> I can't find any of the ioio.sync() methods.  What version of the ioiolib
> are they in?  All the robots have 3 or 4 ultrasonic sensors.
>
> On Tuesday, April 12, 2016 at 3:09:22 PM UTC-7, Ytai wrote:
>>
>> Because there's no guarantee hour long it would take between when your
>> command executed on the Android and when the actual pin voltage changes.
>> What you're seeing when having a short (or no) delay between the commands
>> is that sometimes they would end up actually getting executed a very short
>> gap between them.
>> Coming to think of it, if you only care about minimum duration, you can
>> add a ioio.sync() call after starting the pulse and before starting the
>> delay. This will guarantee that the delay begins after the pin has already
>> been set. This will allow you to set a 1ms sleep without the pulse
>> collapsing, but no guarantees on maximum width, it may come out wider than
>> 1ms.
>> On Apr 12, 2016 3:02 PM, "Vic Wintriss" <vic.wi...@jointheleague.org>
>> wrote:
>>
>> Ytai:
>>
>> Why can’t I use:
>>
>> strobe.write(true);
>> strobe.write(false);
>> input.getDuration();
>>
>> Vic
>>
>>
>> On Apr 12, 2016, at 2:57 PM, Ytai Ben-Tsvi <yta...@gmail.com> wrote:
>>
>> Good question. Currently the only way to ensure this level of sync is the
>> motion control API. Alternatively, if your time constants are coarse
>> enough, you can open multiple PWM channels running at slow rates and insert
>> delays between the open command (order of 10's of ms as you have seen with
>> your experiments). The ideal solution would have been a one-shot function,
>> which is easy to implement using an output compare module, but this doesn't
>> currently exist.
>> On Apr 12, 2016 11:07, "Vic Wintriss" <wint...@gmail.com> wrote:
>>
>>> How would you work the PWM with multiple sensors?
>>>
>>> On Tuesday, April 12, 2016 at 10:54:34 AM UTC-7, Ytai wrote:
>>>>
>>>> No threads involved and nothing asynchronous. You set the PWM once
>>>> during setup(), then you getDuration() whenever you please.
>>>> On Apr 12, 2016 10:52 AM, "Vic Wintriss" <wint...@gmail.com> wrote:
>>>>
>>>>> I would rather run the ultrasonics asynchronously.  Also since the
>>>>> kids may not be be that advanced in our curriculum I prefer to stay away
>>>>> from threads.  The last code that I posted works fine.
>>>>>
>>>>> On Tuesday, April 12, 2016 at 10:37:52 AM UTC-7, Ytai wrote:
>>>>>>
>>>>>> Use PWM output to generate periodic, precisely timed trigger pulses.
>>>>>> On Apr 12, 2016 10:36, "Vic Wintriss" <wint...@gmail.com> wrote:
>>>>>>
>>>>>>> I thought I was following your instructions.  I am using the 4-pin
>>>>>>> sensor as suggested and code that I thought was standard.  What did you
>>>>>>> tell me to do that I am not doing?
>>>>>>>
>>>>>>> On Monday, April 11, 2016 at 1:28:48 PM UTC-7, Ytai wrote:
>>>>>>>>
>>>>>>>> I feel like I gave you my best advice, but you seem to insist on
>>>>>>>> doing it in a way that's not supposed to work.
>>>>>>>> On Apr 11, 2016 1:03 PM, "Vic Wintriss" <wint...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> When I use this code:
>>>>>>>>>
>>>>>>>>> ioio.beginBatch();
>>>>>>>>> rightStrobe.write(true);
>>>>>>>>> rightStrobe.write(false);
>>>>>>>>> ioio.endBatch();
>>>>>>>>>
>>>>>>>>> I get this beautiful result:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> <https://lh3.googleusercontent.com/-qyhO2zqtmoY/VwwBnL2vE7I/AAg/xyOLBnQBnuIvFhdp0IdprRb_qVvx6Hckw/s1600/bad.PNG>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> But the code hangs up and I get no duratio

Re: How to implement code servo motor in "IOIO camera robot"

2016-06-19 Thread Ytai Ben-Tsvi
This is no longer a IOIO-specific question. If you want to know more about
how the specific app you found works, I would email directly to Ake (the
author of this app).

On Sun, Jun 19, 2016 at 8:58 AM, David . <
amministratore.tuttelepo...@gmail.com> wrote:

> Hello Ytai, thanks to you I was able to move the servo motor, but only
> where it is physically connected IOIO. I ask tip suggestions on what to
> control it from the other android phone (have control over wifi).
> thanks advance
>
> 2016-06-13 22:54 GMT+02:00 Ytai Ben-Tsvi <yta...@gmail.com>:
>
>> I don't know this app at all, but from a quick scan it seems like the
>> IOIO-related stuff takes place in:
>> https://github.com/akexorcist/IOIO-CameraRobot/blob/master/app/src/main/java/app/akexorcist/ioiocamerarobot/ioio/IOIOControllerActivity.java#L329
>>
>> You'd need to open PwmOutput on whatever pin the servo is on and run it
>> at 50Hz, 1ms-2ms pulse width. IOIOSimpleApp contains and example for using
>> a servo.
>>
>> On Sun, Jun 12, 2016 at 9:08 AM, <amministratore.tuttelepo...@gmail.com>
>> wrote:
>>
>>> hello everyone, I have downloaded the source
>>> https://github.com/akexorcist/IOIO-CameraRobot, works well but would
>>> like how to add a servo motor (Monza ssa27). After 2 weeks of research on
>>> how to insert code, still nothing, of course I am beginner Android
>>> Studio. Someone help me please? My setup: 2 dc motors operated by L293D
>>> - IOIO sprk0016 - 0311 bootloader - FW 0506 - Android Studio 2.1 / 5.1
>>> lollipop (Sorry for my bad English).
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to ioio-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ioio-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ioio-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to ioio-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/ioio-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Nexus 9 IOIO idle disconnect problem

2016-06-17 Thread Ytai Ben-Tsvi
Is this specific to a service or does it also happen with an activity? Does
it happen with the precompiled examples HelloIOIO and/or HelloIOIOService?
On Jun 17, 2016 9:50 AM, "Matthew Pegula"  wrote:

> Following up on Nick's post (we're teammates) this issue only seems to
> present on the Nexus 9, none of the other devices that we have tried.  Same
> android app, app version, IOIO, etc.
>
> Power is set all the way clockwise on the IOIO.
>
>
>
> On Thursday, June 16, 2016 at 7:19:59 PM UTC-4, Nick Stahlnecker wrote:
>>
>> Hi, I'm having a weird issue with the IOIO and a Nexus 9. I'm connecting
>> with the IOIO in service and messaging from my activity when I want to set
>> a pin. That seems to work as expected. I run into a problem when I let the
>> tablet/IOIO sit for a few minutes (screen never turns off, and i never
>> switch apps).
>>
>> After the app idle for a few minutes I seem to lose connection with the
>> IOIO and can't get it back even by stopping and trying to restart the
>> service. The disconnected function never gets run either it just seems like
>> my loop() function stops running. The problem always corrects itself by
>> unplugging and plugging that tablet back in.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: How can I connect to ioio?

2016-06-17 Thread Ytai Ben-Tsvi
There's already a b4a library for IOIO. Maybe use that?
On Jun 17, 2016 6:17 AM, "István Rostás"  wrote:

> Thank you for reply. I red Sparkfun and build my own ioiolibandroid.jar.
> Then I extracted the non-activity part of the HelloIOIO and IOIOService
> example app to transform them into a b4a library, and I can instantiate
> them also. My lib works on android, but the instantiated looper classes
> don't work. There is no error, but no connection to ioio hardware.
> Environment: Android usb debug off, eclipse mars 2 (I need this, because I
> want to create a b4a library)
>
> 2016. június 15., szerda 11:51:26 UTC+2 időpontban István Rostás a
> következőt írta:
>>
>> Hi Guys!
>> I have a small looper class (from the helloioio sample), what I
>> instantiate so:
>> private Looper ls;
>> ls = new Looper();
>> but the ioio connection is dead. Of course the ioio harwdare is connected
>> to the tablet. What have to do to the connection be alive?
>> It is important, the Looper class can't connect to any activity.
>> thanks in advance
>>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: New IOIO-OTG won't connect to existing software on Linux

2016-06-16 Thread Ytai Ben-Tsvi
There are maven targets for the libraries. Please refer to the wiki and or
example apps. Can you please test the precompiled apps before proceeding to
you own built ones?
On Jun 16, 2016 15:58, "Daniel Buchanan"  wrote:

> Hi Ytai,
>
> It does show up as /dev/IOIO0, regardless of which board it is using.
> I'm not sure what the undefined version is, it's always done that.
> This software is a tad old (a couple of years), and as such at the time I
> wrote it there was no pre-compiled version of the ioiolib that I could use,
> so I compiled my own.
>
> They are using the exact same jar file on both the laptop and the
> Raspberry Pi.
>
> Is there somewhere that I can download a pre-compiled ioiolib from? such
> that I could drop it onto the classpath?
>
> Kind Regards,
> Daniel.
>
> On Friday, June 17, 2016 at 10:54:03 AM UTC+12, Ytai wrote:
>>
>> Is the new board appearing as a /dev/IOIOx device? Are you using the
>> exact same jar with both versions? What's the deal with the undefined
>> IOIOLib version?
>> There have been some changes in the library that may have caused this
>> problem, but I cannot see how the firmware version is related.
>> On Jun 16, 2016 15:46, "Daniel Buchanan"  wrote:
>>
>>> Hi There,
>>>
>>> We have just started getting new IOIO boards, and at present they will
>>> not connect to our software running on Linux (Raspberry Pi).
>>>
>>> I can connect to both the old and new IOIO-OTG boards using my Windows
>>> 10 laptop, but the Raspberry Pi will only connect to the old board.
>>>
>>> The only difference I can see between the old and new boards is the
>>> versions of the bootloader and firmware:
>>> Old:
>>>
>>>- Bootloader ID - IOIO0401
>>>- Firmware ID - IOIO0500
>>>
>>> New:
>>>
>>>- Bootloader ID - IOIO0402
>>>- Firmware ID - IOIO0506
>>>
>>> Aside from this, both the Raspberry Pi and my Windows 10 laptop are
>>> using the same version of java, the same version of the ioiolib and
>>> associated libraries, so I'm a bit stumped as to what could be causing
>>> this, the Raspberry Pi just sits there and waits for a connection from the
>>> IOIO (new board) whereas with the old board it just connects and goes on
>>> its merry way. My laptop works correctly with both boards, I thought maybe
>>> it was a difference in the udev rules or something, but I couldn't see any
>>> major differences in the Windows driver that would affect the udev rules
>>> for the Raspberry Pi.
>>>
>>> I've included screen shots from the run of both the old board and new
>>> board, on my laptop as well as the Raspberry Pi (photos from my phone,
>>> sorry about that).
>>>
>>> Any suggestions would be very much appreciated.
>>>
>>> Kind Regards,
>>> Daniel.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ioio-users+...@googlegroups.com.
>>> To post to this group, send email to ioio-...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: IOIO update issues with 5.06

2016-06-16 Thread Ytai Ben-Tsvi
Using the IOIO as a programmer for another is a pretty esoteric feature,
specifically developed to allow users to upgrade the bootloader between
version 1and 2 some five years ago. This need became pretty obsolete as
soon as IOIOs started shipping with newer bootloaders and later with the
introduction of the IOIO-OTG. While I haven't done anything deliberate to
remove this functionality, I haven't bothered to much with testing that it
it's maintained with every firmware version. If this is important to you I
recommend you to either use a known working setup (e.g. an older version
firmware) out get a cheap PICKit3).
On Jun 14, 2016 04:29, "kolbe"  wrote:

Nobody else sees this problem?


On Thursday, 9 June 2016 00:17:52 UTC-4, kolbe wrote:
>
> When using IOIO Manager to update an IOIO and the programing IOIO is
> already updated to 5.06/4.02 or 5.06/3.11, the IOIO Manager can't detect
> the target IOIO. I haven't tried all the application versions but 5.00
> works. I've tried both an OTG and a V1 IOIO.
>
> I also noticed that the IOIO Manager crashes (just the activity actually)
> if I try to load an image from a file. I've had to create QR codes to load
> images that aren't on the wiki download page. This is on a Nexus 6.
>
> On the wiki side of things... There is no 5.06/3.11 posted for the v1
> IOIO. You have to go to the full archives to find it.
>
> Also on the wiki... IOIO Manager is listed as v1.5 but it is only v1.4.
> Thanks Ytai for the OpenAcc support!!
>
-- 
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: How can I connect to ioio?

2016-06-16 Thread Ytai Ben-Tsvi
This is not the intended usage. Please refer to the example apps or the
beginner tutorial from SparkFun.
On Jun 15, 2016 02:51, "István Rostás"  wrote:

> Hi Guys!
> I have a small looper class (from the helloioio sample), what I
> instantiate so:
> private Looper ls;
> ls = new Looper();
> but the ioio connection is dead. Of course the ioio harwdare is connected
> to the tablet. What have to do to the connection be alive?
> It is important, the Looper class can't connect to any activity.
> thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Can't update firmware

2016-06-16 Thread Ytai Ben-Tsvi
The latest firmware assumes xc16
On Jun 15, 2016 12:31, "David"  wrote:

> Thanks. Solved the issue such a silly mistake forgot to take pin 33 to
> ground as I am powering up the phone from the pcb.
>
> To compile code in mplabx I can use the xc16 compiler? Is there anything
> special like linking files first our is it better to use the old mplab with
> c compiler?
>
> Thanks again
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: New IOIO-OTG won't connect to existing software on Linux

2016-06-16 Thread Ytai Ben-Tsvi
Is the new board appearing as a /dev/IOIOx device? Are you using the exact
same jar with both versions? What's the deal with the undefined IOIOLib
version?
There have been some changes in the library that may have caused this
problem, but I cannot see how the firmware version is related.
On Jun 16, 2016 15:46, "Daniel Buchanan"  wrote:

> Hi There,
>
> We have just started getting new IOIO boards, and at present they will not
> connect to our software running on Linux (Raspberry Pi).
>
> I can connect to both the old and new IOIO-OTG boards using my Windows 10
> laptop, but the Raspberry Pi will only connect to the old board.
>
> The only difference I can see between the old and new boards is the
> versions of the bootloader and firmware:
> Old:
>
>- Bootloader ID - IOIO0401
>- Firmware ID - IOIO0500
>
> New:
>
>- Bootloader ID - IOIO0402
>- Firmware ID - IOIO0506
>
> Aside from this, both the Raspberry Pi and my Windows 10 laptop are using
> the same version of java, the same version of the ioiolib and associated
> libraries, so I'm a bit stumped as to what could be causing this, the
> Raspberry Pi just sits there and waits for a connection from the IOIO (new
> board) whereas with the old board it just connects and goes on its merry
> way. My laptop works correctly with both boards, I thought maybe it was a
> difference in the udev rules or something, but I couldn't see any major
> differences in the Windows driver that would affect the udev rules for the
> Raspberry Pi.
>
> I've included screen shots from the run of both the old board and new
> board, on my laptop as well as the Raspberry Pi (photos from my phone,
> sorry about that).
>
> Any suggestions would be very much appreciated.
>
> Kind Regards,
> Daniel.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: How to implement code servo motor in "IOIO camera robot"

2016-06-13 Thread Ytai Ben-Tsvi
I don't know this app at all, but from a quick scan it seems like the
IOIO-related stuff takes place in:
https://github.com/akexorcist/IOIO-CameraRobot/blob/master/app/src/main/java/app/akexorcist/ioiocamerarobot/ioio/IOIOControllerActivity.java#L329

You'd need to open PwmOutput on whatever pin the servo is on and run it at
50Hz, 1ms-2ms pulse width. IOIOSimpleApp contains and example for using a
servo.

On Sun, Jun 12, 2016 at 9:08 AM, 
wrote:

> hello everyone, I have downloaded the source
> https://github.com/akexorcist/IOIO-CameraRobot, works well but would like
> how to add a servo motor (Monza ssa27). After 2 weeks of research on how
> to insert code, still nothing, of course I am beginner Android Studio.
> Someone help me please? My setup: 2 dc motors operated by L293D - IOIO
> sprk0016 - 0311 bootloader - FW 0506 - Android Studio 2.1 / 5.1 lollipop 
> (Sorry
> for my bad English).
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


Re: Can't update firmware

2016-06-11 Thread Ytai Ben-Tsvi
You seem to be doing the right thing. I would suspect your hardware. Did
you deviate in any way from the standard circuit? Especially around the USB
and vbus area.
On Jun 11, 2016 08:08, "David"  wrote:

> HI Can anyone help me. When you download the devboot ioio40-2-APP-ioio56,
> this hex file can it be used to program a completely native( blank) pic
> with a picket 3? I have loaded the SPRK0020 to my pcb which has the micro
> on it, it programs fine.
> When i power down the pcb and connect the boot pin to GND I plug the pcb
> into a computer and the yellow led comes on, once i remove the jumper for
> the boot line the yellow led flashes a few times and then stops.
> This all seems correct the odd thing is this I can not connect to any
> device to it and try the test app to get the yellow led on it will not
> connect.
> In windows when it is connected it brings up com6.
>
> DO I need to build the applayer V1 fisrt and program this then program the
> SPRK0020?
>
> Urgent help needed trying to get a project going ASAP today
>
> Thanks
>
> On Tuesday, March 15, 2016 at 6:29:01 AM UTC+2, Dave Franchino wrote:
>>
>> Howdy,
>>
>> Trying to update IOIO OGT to new firmware - I think the latest is 0506.
>> I am running a Lenovo Windows 10 PC.
>>
>> I am able to see my device in the device manager - (however it is listed
>> as a USB serial device on COM3 - not as IOIO - not sure if this matters).
>>
>> Using IODUDE I can send the following command:
>>
>> ioiodude --port=COM3 versions
>>
>> To which I am getting the following:
>>
>> IOIO Bootloader detected.
>>
>> Hardware version: SPRK0020
>> Bootloader version: IOIO0401
>> Platform version: IOIO0030
>>
>> So far so good.
>>
>> However when I try loading the new firmware:
>>
>> ioiodude --port=3 --reset write App-IOIO0506.ioioapp
>>
>> ... the loader simply hangs.  I need to force the command prompt to close 
>> and there has been no firmware update.
>>
>> Any idea what's going on?  Any help would be greatly appreciated!
>>
>> Dave
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   5   6   7   8   9   10   >