jdredd34
(jdredd34)
December 27, 2016, 9:32pm
1
Dusted off the old M3 board and was surprised the latest Android build works and actually usable.
I have used this source code with FreePascal to access the GPIO on the pi’s very well @ Lazarus on Raspberry Pi - Free Pascal wiki
I have a simple android app that uses this now, it compiles and runs, but fails to access
/dev/mem … the open call gets a -1 returned.
I assume either this locked down? the path doesn’t exactly exist like I want? Or to access the GPIO pins on the M3 board is done in a totally different fashion?
sinovoip
(bpi team)
December 28, 2016, 12:35am
2
android gpio control ,please see this link:
OS: Android V3.0 HDMI
reg-81x-cs-gpio0ldo/max_microvolts : Blue Led
reg-81x-cs-gpio1ldo/max_microvolts : Green Led
Step 1:Burn M3-Android images to Sdcard/Emmc
Sep 2: Please input adb commnad
adb remount
adb shell
chmod 06755 /system/bin/su
Step 3: copy this sample to your app
Sample Code
package com.bpim3.leddemo;
import android.app.Activity;
import android.os.Environment;
import android.os.Handler;
import android.os.HandlerThread;
import android.util.Log;
import java.i…
jdredd34
(jdredd34)
December 28, 2016, 2:23am
3
This demo shows how to toggle the on board LED lights… but not how to access the 40 pin connector.
I did do the example at least by hand and was able to toggle the blue and green led on and off on the board itself.
Right now I have a simple setup where i got an LED wired up to pin 11, GPIO 17 … so should be able to set
this on or off.
jdredd34
(jdredd34)
January 1, 2017, 5:51pm
4
Played around a little more but still can’t figure it out nor can find anything that points to how the GPIO pins are accessed.