Serial block component

In theory, it should be possible to write to any kind of device. However, make sure that the device uses the proper bit configuration:

It is guaranteed that it will work with Arduino devices.

You must excuse me but I still don’t understand
Can App Inventor be used with Arduino devices?
What models exactly?

With Arduino devices, it is compatible with any board. The only limitation that it presents is that you cannot load code from your smartphone to the Arduino board (as that would require specifying the Arduino version).
It can be used to send and receive data from the USB connection (the “serial”).

In this video you can see a small demo (made with Thunkable, but doesn’t matter), and see the blocks needed around timestamp 0:34:

And here is the respective Instructables:

Note it talks about an “extension”, but its behaviour is like the Serial component.

(added to FAQ)

Is it just the Arduino Uno, which has the ATmega16U2 USB to serial converter chip, that is compatible with the MIT App Inventor Serial component.
The Arduino Nano and ESP8266 have a CH340 chip, which does not appear to be compatible.

support USB-Serial protocols : CDC-ACM, FTDI, Silicon Labs CP210x

You can find more info on supported boards and chips here:

It is a nice component.
I’m (almost successfully) using it with ESP8266 and CP2102 (TTGO board).
It works fine with 9600bps but not with 115200bps. It looks like baud rate is not being set with BaudRate property… just a guess…

Thank you!

Good to read that you connected the ESP8266 with the Serial1 extension
Can you post the blocks you used to connect, please ?

I was testing the baud rate setting so it is set in Screen.Initialize. Setting it in design view also works.

Serial.aia (3.3 KB)
Glad to help.

Thanks for sending the aia file.
On attaching the Arduino Uno, access to the app is requested (see screenshot), but not when the ESP8266 is attached. I don’t think that the CH340 chip is accepted by the Serial extension.


Thanks for the information. :slight_smile:

Doesnt work for me!
I’m directly looking the output of my usb-otg of my phone with an oscilloscope.
When I press the button in my test app, I have a short notification thad says “Wrinting : TEST” but nothing on any pin of the USB.
Maybe it needs more than Android 4.4 ?

tried a lot - without success - with the nano - now I understand - sad but true :wink:
the uno is bigger than the phone so some mobile applications wont make sense
but I'll try a uno if the programming will work as intended

Another option is an ESP32 dev board, which has Bluetooth to connect to the mobile phone.

With an UNO and an OTG adaptor USB-C -> USB-A the serial blocks works very fine


Just send some ASCII chars to the arduino e.g. 'A' for set a pin high / 'a' for low thats working perfectly reliable

may to try not an arduino but an RS232 cable with FTDI chip instead: but around factor 10x too expansive :wink:

So - some experiments later... :wink:
UNO works fine - all other attempts didn't work - tried several usb/rs232 adapers - and a bare FTDI chip (FT232RL) which all were recognized with the app 'serial USB terminal 1.38' but not with the app inventor projects...

for the FT232RL i get following error message:
'Failed resolution of: Lcom/ftdi/j2xx/D2xxManager;'
which could be interpreted as 'want to work with but cannot work with'

is there a update in pipeline to support more serial devices? would extend the opportunities for so many new (low cost) projects :wink:

Maybe you can try my extension and report if it works for you::

What is the 'set Status . Text' Block? I get that it's purpose is to open the serial communication, but what type of component is 'Status' and what did you chose in Designer to add that in?

THank you!

the last row in the 'connect' block is just to call the 'open serial'
'status' is a label (text field) on the frontpanel that gets the return message from the 'open serial' which can be true or false

there is a fantastic solution contributed by rkl099

he implemented an extension over the last months you can find on github:

and follow the discussion here

it works with arduino nano clones (CH340) as well as FTDI Serial adapters

here a basic test program for input/output by clicking buttons: