Having troublle adding IOIO control to my app

26 views
Skip to first unread message

Vincent Yegenoglu

unread,
Apr 2, 2015, 4:48:12 AM4/2/15
to ioio-...@googlegroups.com
Hi, 

Last summer I wrote an OpenCV app for university, now I want to control servos attached to a IOIO board from the same app. 

I'm trying for a start by just flashing an LED but I'm having trouble adding the IOIO code to my code. 
The problem is I'm trying to use the demo app that came with the IOIO library as an example, it requires "IOIOActivity" to be extended but my main code already extends "Activity" and you can't extend two classes in one line.

If you would have any suggestions on how to accomplish this I would be grateful.

Here is a link to my code. http://pastebin.com/aBgyKxSb

The app currently tracks a red ball and generates a point. I will use that point to control two servos later on, right now I just want the LED on the IOIO board to flash. 

Ytai Ben-Tsvi

unread,
Apr 2, 2015, 4:50:16 AM4/2/15
to ioio-...@googlegroups.com
IOIOActivity extends Activity so this should not be a problem.

--
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.

Vincent Yegenoglu

unread,
Apr 3, 2015, 2:16:16 PM4/3/15
to ioio-...@googlegroups.com
So I tried replacing "Activity" (line 69 and 72) with IOIOActivity but that didn't work, the app would instantly crash.  
Did you mean something else ?

Ytai Ben-Tsvi

unread,
Apr 4, 2015, 2:23:27 PM4/4/15
to ioio-...@googlegroups.com
Well, you need to at least overload createIOIOLooper() in order for something useful to happen.
Look at the logcat output next time, so you can see what's wrong yourself. See the simple examples (HelloIOIO, IOIOSimpleApp) to get an idea of what the common patterns for creating a IOIO app are.

Reply all
Reply to author
Forward
0 new messages