public class Board extends Object
| Constructor and Description |
|---|
Board(int id)
Constructor for a single sensor board
|
| Modifier and Type | Method and Description |
|---|---|
void |
addData(Object[] d)
Adds data to the sensor board and makes sure that there are the correct amount of items in the lists.
|
void |
configShakeEvent(int minForce,
int minDirChange,
int maxPausBtwnDirChg,
int maxTotDurShk)
Configure when a shake is registered
|
Integer[] |
getCurrentData() |
int |
getID() |
String |
getState() |
int[] |
getTiltPosition()
Only possible to check x and z axes.
|
boolean |
isShaking()
Checks if the DUL Radio is being shaken
|
void |
setSmoothSamples(int s) |
int[] |
smoothValues() |
public Board(int id)
id - ID of the actual sensor board you want to accesspublic int getID()
public String getState()
public Integer[] getCurrentData()
public void addData(Object[] d)
d - public void configShakeEvent(int minForce,
int minDirChange,
int maxPausBtwnDirChg,
int maxTotDurShk)
minForce - The minimum force to considerminDirChange - Minimum times in a shake gesture that the direction of movement needs to change.maxPausBtwnDirChg - Maximum pause between movements.maxTotDurShk - Maximum allowed time for shake gesture.public void setSmoothSamples(int s)
s - number of samples to smooth overpublic int[] smoothValues()
public int[] getTiltPosition()
public boolean isShaking()
Processing library DULRadio by Lasse Steenbock Vestergaard. (C) 2011