Using a Raspberry Pi Pico on an Android phone
Channel: chineseballs
Date: 2021-02-20

You can use a Raspberry Pi Pico with an Android phone and I am here to show you how.
I was using an up to date Google Pixel 3 phone that has a USB C connector.


Can you get your Raspberry Pi Pico working with an Android phone ?
Yes, but it depends
If you plug the Pico into a Phone in USB mode, Android will report the drive as not formatted.
Unfortunately following the formatting steps does not fix this, but it will also not damage your Pico.

So grab a computer, I will be using Windows, but it should be similar on Mac and Linux.

To start we need to get Micropython running on the Pico
Head over to the Raspberry Pi Web site
https://www.raspberrypi.org/
https://www.raspberrypi.org/products/
https://www.raspberrypi.org/products/raspberry-pi-pico/
scroll down to to Documentation
https://www.raspberrypi.org/documentation/pico/getting-started/
and download the MicroPython UF2 file from the "Getting started with MicroyPython" section.

Now hold down the BOOTSEL button on the Pico and connect it to your computer, let go of the button and you should see a new Mass Storage device.
Simply copy over the UF2 file you downloaded and you are finished with the computer, disconnect the Pico.

Connect the Pico to your phone, this time do NOT hold down the BOOTSEL button
Go to the Google Play store and install "Serial USB Terminal" by Kai Morich. There are other USB serial apps, but this is the one that I tried and worked for me.
Open the app and go to settings/devices and click the Custom device, no driver, select CDC and say yes to the prompt about access to FS device

you are now connected to the REPL, a Read-Eval-Print-Loop and you can type commands
type print('hello') and click the send arrow.
The Python environment on the Pico will now answer hello.

I reccomend writing commands in notes or another text editor and then copying and pasting them into the app rather than trying to type them each time.
you can now turn the LED on the Pico on with some code

from machine import Pin
led = Pin(25, Pin.OUT)
led.value(1)

and off again with

led.value(0)

This code and many other examples are available at the raspberry pi pico MicroPython page

Hope this has been helpful 

In the future you should be able to plug your pico directly into your phone and use it as a mass storgage device, bypassing the need of a separate computer.