How does the Block code tie to the code created in Arduino

It might help you in your search for App Inventor II (AI2) samples if you were to use the search term AI2. No one else calls it MAI.

Here is a list of ways AI2 can use the web component to talk to a variety of web services, none of which know anything about AI2 ...