This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int sensorPin = A0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
int sensorReading = analogRead(sensorPin); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.dyadica.ttsbasic; | |
import android.app.Activity; | |
import android.app.AlertDialog; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Build; | |
import android.speech.RecognizerIntent; | |
import android.speech.tts.TextToSpeech; | |
import android.speech.tts.UtteranceProgressListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CapacitiveSensor.h> | |
// Initialise all of our cap sensors. Each shares the | |
// 12 pin. | |
CapacitiveSensor caps[] = | |
{ | |
CapacitiveSensor(12,2), | |
CapacitiveSensor(12,3), | |
CapacitiveSensor(12,4), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dyadica.co.uk.simplestepcount; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.hardware.Sensor; | |
import android.hardware.SensorEvent; | |
import android.hardware.SensorEventListener; | |
import android.hardware.SensorManager; | |
import android.os.Build; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: "com.android.library" | |
android { | |
compileSdkVersion 22 | |
buildToolsVersion "21.1.2" | |
defaultConfig { | |
minSdkVersion 12 | |
targetSdkVersion 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
[RequireComponent (typeof(CharacterController))] | |
public class PlayerController : MonoBehaviour | |
{ | |
/// <summary> | |
/// The players character controller | |
/// </summary> | |
private CharacterController controller; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SimpleLowPassFilter : MonoBehaviour | |
{ | |
// time smoothing constant for low-pass filter 0 ≤ alpha ≤ 1 | |
// a smaller value basically means more smoothing. | |
public float ALPHA = 0.15f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SimpleKalmanFilter : MonoBehaviour | |
{ | |
public double Q = 0.000001; | |
public double R = 0.01; | |
public double P = 1, X = 0, K; | |
void Start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <copyright file="SpeechManager.cs" company="dyadica.co.uk"> | |
// Copyright (c) 2010, 2014 All Right Reserved, http://www.dyadica.co.uk | |
// This source is subject to the dyadica.co.uk Permissive License. | |
// Please see the http://www.dyadica.co.uk/permissive-license file for more information. | |
// All other rights reserved. | |
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY | |
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |