Spider-WiFi-Android- Using Android sensors
This is a sample .Net 4.2 application for the spider that receives the Android Sensor data as X,Y and Z
values.
No expert about Android but I believe the common Sensors available are:
TYPE_ACCELEROMETER
TYPE_MAGNETIC_FIELD
TYPE_ORIENTATION
TYPE_LIGHT
TYPE_GYROSCOPE
TYPE_PRESSURE
TYPE_PROXIMITY
TYPE_TEMPERATURE
My Tablet only has ACCELEROMETER, MAGNETIC_FIELD, TYPE_ORIENTATION and TYPE_LIGHT so my code only uses these. The current values for the sensors are sent to the spider (As strings) upon a button press on the Android Application.
The Spider code does nothing with the values received except display the X,Y,Z values on the T35 LCD.
I was thinking that you could ‘Drive a Robot’ using the values received as the Tablet is tilted and twisted…
I hope that the sample code can get someone started.
I have a Samsung tablet and I do not have a ‘Phone’ so I have no idea if the code would work on one.
I am using Basic4Android and .NET Micro 4.2
Usage is the code sample
Have Fun!