Skip to content

16. Interface and application programming

Assignments for the week

Group assignments

  • Compare as many tool options as possible.

Individual assignment

  • Write an application that interfaces with an input &/or output device that you made.

Requirements for group

  • Described your process using words/images/screenshots.
  • Explained the the GUI that you made and how you did it.
  • Outlined problems and how you fixed them.
  • Included original code (or a screenshot of the app code if that’s not possible).

Group assignments

See 2019 Fablab Taipei Group site Week 16

Individual assignment

The interface will work with 4-channel syringe pump that made week 15.

Biuld on an android phone

Intro to App inventor 2

App inventor 2

App Inventor for Android is an open-source web application originally provided by Google, and now maintained by the Massachusetts Institute of Technology (MIT), which allows newcomers to computer programming to create software applications for the Android operating system (OS).
- App Inventor for Android on wiki

It is a cloud-base service which well documented with build-in helps, manual and tutorials. Good for education, new hand and someone don’t like to type.

Build the app

GO http://ai2.appinventor.mit.edu/ and log in with goole account. Then start a new project.

Name it.

Drag a component you need to cell phone screen,
select it on the list,
give it a unique name,
and check it’s properties.

Swich to blocks and set program. Come back anytime if needed.

Blocks are working the same way as desinger do.

Copy (in right-click menu) and change selected component from menu is a easy way to build blocks alike.

The blocks of screen 1.

Add a new screen for more feature.

Backpack can help to copy blocks between sceeen. Right click on a block and choose “Add to backpack” Then move to target screen, drag the block out from backpack.

Screen 2 design and blocks.

To test the app, select ” Connect ” then ” Al Companion “, scan the QR code by or enter the code on phone.

Test

If you like, make an icon and publish it.

The app works on link and emulator, but cannot runs when installed in the phone. Both Android 5.0.2 and 8.0.0 are failed. Still tring to solve it

This two little project works as a phone app.

Then I delete components one by one until the app works.

Remove all swiches and it works.

Turn to Bluetooth

Wifi setting is too complicate to finish in time,
so it turn to bluetooth control.
Build app the sameway as meantioned.

Interfaces with an device.

Files

AIA file for app inventor 2
APK file for android