# MIT App Inventer 2 Button Control

**URL:** <https://community.particle.io/t/mit-app-inventer-2-button-control/21661>\
**Category:** Developer Tools\
**Created:** [April 1, 2016, 3:47pm UTC](https://community.particle.io/t/mit-app-inventer-2-button-control/21661 "2016-04-01T15:47:08Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![LesG](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@LesG](https://community.particle.io/u/LesG)\
**Post date:** [April 3, 2016, 10:28pm UTC](https://community.particle.io/t/mit-app-inventer-2-button-control/21661/7 "2016-04-03T22:28:37Z")

</div>

Follow this link and it will help with making the buttons work - then couple it with the sensor readings to be displayed.  
Note the \>return 200 value in the photon code doesn't do anything in App inventor.

> [@Connect Spark core with Android App made in Appinventor](https://community.particle.io/t/connect-spark-core-with-android-app-made-in-appinventor/7378/5):
>
> HI Jozef Sorry to hear you are still having trouble. I am also sorry for the delay in response. Ok, lets get you started with this. Try flashing this firmware on your spark //Initialize define ON 1 define OFF 0 int Pin0 = D0; //Define your pin int OUT1State = 0; //This variable maintains the current state of the Pin0 void setup() { pinMode(Pin0,OUTPUT); Spark.function(“pin0”, OUT0); //This is the function that gets executed when there is a matching API request // Initialize low dig…

hope it helps, if not I will post what I have working

---

_[View the full topic](https://community.particle.io/t/mit-app-inventer-2-button-control/21661)._
