Skip to content

Instantly share code, notes, and snippets.

@SriharshaShesham
Created September 9, 2015 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SriharshaShesham/ce4da81f2a2ceb601260 to your computer and use it in GitHub Desktop.
Save SriharshaShesham/ce4da81f2a2ceb601260 to your computer and use it in GitHub Desktop.
Android and Arduino Mega ADK simple LED Blink
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
<ToggleButton
android:text="@string/ToggleButton"
android:id="@+id/toggleButtonLED"
android:layout_width="200dp"
android:layout_height="150dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="50sp"
android:onClick="blinkLED" />
<TextView
android:id="@+id/connectionStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/toggleButtonLED"
android:layout_alignLeft="@+id/toggleButtonLED" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/toggleButtonLED"
android:layout_alignRight="@+id/toggleButtonLED" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment