Tethering to a tablet

Interfacing to the codebug
Post Reply
Posts: 3
Joined: Sat Oct 17, 2015 2:14 am

Tethering to a tablet

Post by danhalbert »

I was thinking about how I could demonstrate Codebug to someone without lugging along a laptop or using a nearby computer. The Codebug datasheet says: "Can be tethered to be controlled from a computer or tablet". The "tablet" part is intriguing.

Since the Codebug can act as a USB mass-storage device, one could build and download programs from a tablet if the tablet supports connecting such a device. I didn't know much about this, but I did a little research. Apparently if the tablet supports USB OTG ("On-The-Go") mode, it will work. A special OTG adapter/cable is needed. Some but not all Android tablets support USB OTG; Apple devices do not. Unfortunately my only Android tablet does not do OTG, so I can't try this out.

Is there some other tablet tethering mode that the Codebug creators had in mind? Perhaps eventually there might be iOS or Android apps for Codebug?
Posts: 67
Joined: Sat Aug 15, 2015 1:41 pm

Re: Tethering to a tablet

Post by pigraham »

I think you need OTG to access the bug as a drive and copy the compiled blockly programs.
You could use a Pi to share the bug drive on WiFi and connect your tablet that way.
Mount the Cude Bug connect by USB on the Pi and share it as a network drive. Access that network drive from your tablet.
Copy the downloaded compiled Blockly .cbg file to the drive.

You could take a look at miker's work on tethering the bug to a Bluno beetle. You could pair your tablet with the blueno to control the bug. I don't think you can write blockly code to it's flash memory that way though. I think you would need to implement code on the Bluno to allow acceess to the thered commands from the Bluetooth host (tablet).

There is a serial comms tethered mode so you could use a Bluno or a bluetooth to serial adaptor to communicate with the bug from a serial terminal app on the tablet. That has the possible advantage of using the stock serial tethered API.

In each case you will need an additional power source for the Pi / Bluno / BT-serial adaptor
Posts: 86
Joined: Fri Jul 31, 2015 10:37 am

Re: Tethering to a tablet

Post by mikerr »

iphones and ipads look a no go:

The apple "camera connection kit" allows USB mass storage devices to be used on the iOS device,
but it didn't work with the codebug:

I had great success with android and an OTG cable though. I could create / edit sketches in the browser, download the CBG file, and copy it with ES_Explorer to the codebug drive.
Twitter @mikered codebug profile mikerr
Post Reply