Project - Spider-WiFi-Android- Using Android sensors

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!

This is a very good example. A huge +1 for a video :wink:

Dear willgeorge:

I use the Eclipse to import your android code, but got many errors.
I am use the original Android SDK and Eclipse .
I don’t know Basic4Android anymore.
Do you have pure android application code?

Thanks

Where’s the video?

Tzu Hsuan

Eclipse to import your android code… Do you have pure android application code? Sorry, no I do not.

The code shown in the text file is Basic4Android code’ not java or in a form usable by Eclipse.
The text was provided only as a ‘outline’ for viewing structure and not for importing into another OS
I have Eclipse but rarely use it because I kept loosing my files for some reason. I never tried to find out why.