Skip to first unread message

Kevin Wizard

unread,
Mar 29, 2018, 6:46:40 PM3/29/18
to MIT App Inventor Forum
Request for some help:.... I am hoping to use the usb port on my phone / tablet with the app inventor otg usb serial bridge. 

I THINK I have to start a new activity calling upon the

bp.usbbridge.appinv activity package and the 
bp.usb.bridge.appinventor class as "documented in the 
Communication_Appinventor_Arduino.pdf

It says in the app inventor concepts that i can start this activity but..... I have no methods to call, properties to use, or values to pass or receive for the activity as it is not documented anywhere. Am i being a bit thick ?

Also I found the github to be profoundly useless at providing any help. Maybe good for developing big programs. 

I am really excited about writing apps for my android. I have managed a few "hello world" apps. My usb otg bridge efforts involve a bit of code which opens the activity when button 1 is pressed and the next button i would like it to send about 256 characters to the usb-to-ttl board. This otg plugin board works with another ogt app i found in google play.

I'm just stuck. Can anyone tell me how to progress ?

Kevin

Chris Ward

unread,
Mar 30, 2018, 5:34:10 AM3/30/18
to MIT App Inventor Forum
Hi Kevin

I'm really itching to try some of this stuff myself!

Juan Antonio

unread,
Mar 31, 2018, 4:30:57 PM3/31/18
to MIT App Inventor Forum
Hi Kevin,

here other example of OTG+AppInventor+Arduino (It is in Spanish).

Uses extension of Pavitra, this extension works with original Arduino (It doesn`t work with chinese Arduino with chip driver usb CH-340)

Kevin Wizard

unread,
Apr 1, 2018, 7:20:56 PM4/1/18
to MIT App Inventor Forum
Hi Chris.... thanks for the reply / interest.... yes Im itching to get something working..... But I still haven't. The link to the video is a view of the Communication_Appinventor_Arduino.pdf file. I have read it through but cant figure out where they get the "Control"  part of the blocks in the app inv2 android program (shown in my screen shot (Control.bmp)......... I think it might help a lot if I can implement these code blocks.
Control.bmp

SteveJG

unread,
Apr 1, 2018, 7:28:13 PM4/1/18
to MIT App Inventor Forum
Learn how to define a Procedure here  


Here are some resources to help you learn to use the AI2 tools  A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  

How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

If you are going to get your OTG going you need to learn how to use the App Inventor 2 code blocks.  Reading the Inventor's Guide (it will take an hour or less) will give you insight.

Regards,
Steve

Kevin Wizard

unread,
Apr 1, 2018, 7:35:28 PM4/1/18
to MIT App Inventor Forum
Wow ! That looks like a good serial program.... I am hoping to get my android serially communicating with all sorts of other serial devices. I wish I could understand Spanish but all the same I have imported the extension and can see the blocks,, Initialise, baud rate change, open, close, read and write;... and the feedback on his web page is good. lots of comments about it working ! :-)

I will study his pages and see if I can make an app2.

Kevin Wizard

unread,
Apr 1, 2018, 7:58:22 PM4/1/18
to MIT App Inventor Forum
Hey Steve ! Another good help. Thankyou all so far ! I guess I am going to have to Start at the beginning and end at the end with this problem.........I will read the book ! I hope it isn't in spanish otherwise I will have to learn that first to ! ha ha.

I have already checked it is in English. I have done some VERY simple tests with the Create part of app inventor. I had the following block so far and got stuck. (See my next Picture screen-shot Upload attached. Thanks for the help I will take the time out to learn properly.

Kevin.. 
Lost.bmp
Reply all
Reply to author
Forward
0 new messages