Android Question GY-521 + BPI M2 Zero under Android

peacemaker

Expert
Licensed User
Hi, All

1) I'm trying to make a high-temperature sensor (accelerometer + temperature up to 70 degrees) with help of Banana PI M2 Zero SBC with Android 4.4.2 (let it be "Android SBC" = ASBC).
2) My main Android app (that works with WiFi Internet, accelerometer, battery under normal Android 7+ phone, data is got, makes average, and sent to server each 10 seconds) starts OK on ASBC already, sure, now no info about accelerometer, temperature and battery.
3) My Android app works on phone with 10 Ah battery more than 12 days (> 24 hours x 12, but a phone cannot work with temperature > 50 degrees.), so it's ~40 mA current consumption (for 10 days). ASBC BPI M2 Zero consumes now (after boot) ~200 mA... And it should be lowered also somehow... later.
3) I thought about re-making the app to Linux on B4J, but ... maybe more useful to go on with a ready Android app ?

4) GY-521 PCB is i2c, already used with B4R for Arduino, maybe it's even more useful to make the sensor basing some Arduino controller, but with WiFi and again with a battery.

So it's time to touch a GPIO world in Android 4.4.2.
Any initial suggestions ?
 

agraham

Expert
Licensed User
I'm going to play with the USB version of this when winter arrives and there's not much else to do but I haven't tried it yet
He sells it on eBay
It presents a Serial interface to Android and I'm told it looks like a standard CDC device so it should work with the USBSerial1 or felUsbSerial libraries. I'm assuming it will need an OTG cable.
 
Upvote 0

agraham

Expert
Licensed User
That board appears as a USB serial interface and can be set for 3.3V or 5V operation. It was intended for use with PCs but it should work with Android.

The board has eighteen GPIO pins, one SPI interface, one I2C interface, one UART interface, two 10bit PWM outputs, six servo outputs, one 5bit DAC output and three 10bit ADC inputs. These can all be controlled by commands from the host program (assuming that it can be seen by one of the USB serial libraries).
 
Upvote 0
Top