Skip to content

Instantly share code, notes, and snippets.

View Robotonics's full-sized avatar
🏠
Working from home

David Cotterill-Drew Robotonics

🏠
Working from home
View GitHub Profile
#include <Tone.h>
Tone freq1;
Tone freq2;
const int DTMF_freq1[] = { 1336, 1209, 1336, 1477, 1209, 1336, 1477, 1209, 1336, 1477 };
const int DTMF_freq2[] = { 941, 697, 697, 697, 770, 770, 770, 852, 852, 852 };
void setup()
@Robotonics
Robotonics / Vertical-Navigation-Menu.markdown
Created September 6, 2013 16:08
A Pen by Madalin Tudose.
@Robotonics
Robotonics / android java animation
Created May 27, 2013 10:45
Sample animation using drawable resources
AnimationDrawable rocketAnimation;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ImageView rocketImage = (ImageView) findViewById(R.id.rocket_image);
rocketImage.setBackgroundResource(R.drawable.rocket_thrust);
rocketAnimation = (AnimationDrawable) rocketImage.getBackground();
}
<Button
android:id="@+id/Pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="100dp"
android:background="@drawable/menu_selector"
android:text="@string/Pause"/>
@Robotonics
Robotonics / menu_hover.xml
Created May 18, 2013 23:23
Hover background for menu button
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" shape="rectangle">
<gradient android:angle="270"
android:startColor="#6b6b6b"
android:endColor="#0e0e0e"
/>
@Robotonics
Robotonics / menu_selector.xml
Created May 18, 2013 23:22
Background selector for menu button
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true"
android:state_pressed="false"
android:drawable="@drawable/menu_hover"
/>
@Robotonics
Robotonics / menu_bg.xml
Created May 18, 2013 23:20
Background for menu button
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" shape="rectangle">
<gradient android:angle="270"
android:startColor="#e7ff47"
android:endColor="#90a501" />
<corners android:topLeftRadius="5dip"
android:bottomRightRadius="5dip"
@Robotonics
Robotonics / Battery Empty Icon
Created May 3, 2013 22:28
Arduino GLCD library bitmap
/* battery empty bitmap file for GLCD library */
/* Bitmap created by RoboTonics */
/* Date:1st May 2013 */
/* Image Pixels = */
/* Image Bytes = */
#include <inttypes.h>
#include <avr/pgmspace.h>
#ifndef battery0_H