0

Itsy Bitsy as a USB device
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Itsy Bitsy as a USB device

by raviprak on Wed Aug 14, 2019 1:35 am

Hi! I am an absolute beginner to this, so I would humbly request your patience. I have been programming large scale distributed systems (C++ and JAVA) for a while now. I have blinked LEDs on the ItsyBitsy with Arduino and used L298s to drive motors with Raspberry Pis. I have never created a USB device. I have created very simple Android apps a long time ago.

I would like to build a very cheap Cellbot (http://www.cellbots.com/) (because I dream of evangelizing it in places without a lot of resources). If I can drive down cost I am willing to do more. In my mind under $15 for the electronics (dev board + motor drivers + sensors) would be great. Everything I do will be open-source. MVP would be 2 motors controlled by the Android app connected to the dev board through USB.

I have an Itsy Bitsy M0 Express (https://www.adafruit.com/product/3727) (open to using other dev boards) which I would like to connect to my Android phone using USB. I would then like to build an Android app that would send commands to my Itsy Bitsy which would control GPIO pins. (Milestone 20?) Maybe, later I would also like to send sensor readings from the Itsy Bitsy to my Android app.

Could you please suggest what resources I should explore? I did search a lot but at this point I am quite confused. Would https://github.com/adafruit/Adafruit_TinyUSB_Arduino be the way to go? Should I look at the Advanced Software Framework from Microchip (https://asf.microchip.com/docs/latest/)

@the community : if you would like to contribute to the project, I would be delighted to enlist your help too!

raviprak
 
Posts: 4
Joined: Wed Aug 14, 2019 12:57 am

Re: Itsy Bitsy as a USB device

by adafruit_support_mike on Thu Aug 15, 2019 12:36 am

What role do you want the ItsyBitsy to play: USB host or USB client?

adafruit_support_mike
 
Posts: 58406
Joined: Thu Feb 11, 2010 2:51 pm

Re: Itsy Bitsy as a USB device

by raviprak on Thu Aug 15, 2019 11:33 am

Thanks for your reply Mike!

I'm thinking the ItsyBitsy would be a USB client and the phone would be the host (I surmised this can be done with OTG).

I'm definitely open to ideas.

raviprak
 
Posts: 4
Joined: Wed Aug 14, 2019 12:57 am

Re: Itsy Bitsy as a USB device

by adafruit_support_mike on Fri Aug 16, 2019 9:19 pm

Yeah, the ItsyBitsy can work as a USB client with an OTG device as the host.

The ItsyBitsy will register as a Serial device automatically, and you can program it to act as a keyboard or joystick.

adafruit_support_mike
 
Posts: 58406
Joined: Thu Feb 11, 2010 2:51 pm

Re: Itsy Bitsy as a USB device

by raviprak on Fri Aug 16, 2019 9:58 pm

Thanks Mike! Could you please point me to libraries / resources to help me learn understand how to accomplish this?

raviprak
 
Posts: 4
Joined: Wed Aug 14, 2019 12:57 am

Re: Itsy Bitsy as a USB device

by adafruit_support_mike on Fri Aug 16, 2019 11:49 pm

Do you want to program it in C or CircuitPython?

adafruit_support_mike
 
Posts: 58406
Joined: Thu Feb 11, 2010 2:51 pm

Re: Itsy Bitsy as a USB device

by raviprak on Sat Aug 17, 2019 4:39 am

I would like to use C or C++.

raviprak
 
Posts: 4
Joined: Wed Aug 14, 2019 12:57 am

Re: Itsy Bitsy as a USB device

by adafruit_support_mike on Sat Aug 17, 2019 11:13 pm

In that case you'd use the Serial interface for UART communication.

adafruit_support_mike
 
Posts: 58406
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.