[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-rc1-44-ga888660
Brought to you by:
sszy
|
From: Sébastien S. <ss...@us...> - 2013-12-19 14:01:44
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via a888660f07036c599ae8a8072bb72b290c2ba3d4 (commit)
from 74ade9eca0527c28b8cc344f5913e8abad362db9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a888660f07036c599ae8a8072bb72b290c2ba3d4
Author: Sébastien Szymanski <ss...@us...>
Date: Thu Dec 19 15:00:38 2013 +0100
[DEMOS] add apf_remote_controller demo.
-----------------------------------------------------------------------
Summary of changes:
target/demos/README | 2 +
.../demos/android/android-remote-controller/README | 1 +
.../android-remote-controller/serial-server.sh | 30 ++++++++++++++++++++
3 files changed, 33 insertions(+), 0 deletions(-)
create mode 100644 target/demos/android/android-remote-controller/README
create mode 100644 target/demos/android/android-remote-controller/serial-server.sh
diff --git a/target/demos/README b/target/demos/README
index 313a5f5..c1fead0 100644
--- a/target/demos/README
+++ b/target/demos/README
@@ -1,4 +1,6 @@
Some program examples to show how to use some Armadeus boards functionnalities:
+- android/android-remotte-controller:
+ This demo shows you how to control your board from an android device.
- armanoid:
SDL 2D game (very basic)
- backlight_control:
diff --git a/target/demos/android/android-remote-controller/README b/target/demos/android/android-remote-controller/README
new file mode 100644
index 0000000..1870acf
--- /dev/null
+++ b/target/demos/android/android-remote-controller/README
@@ -0,0 +1 @@
+Instructions to use this demo at http://www.armadeus.com/wiki/index.php?title=Bluetooth
diff --git a/target/demos/android/android-remote-controller/serial-server.sh b/target/demos/android/android-remote-controller/serial-server.sh
new file mode 100644
index 0000000..66a062f
--- /dev/null
+++ b/target/demos/android/android-remote-controller/serial-server.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+setup() {
+ modprobe leds-wm831x-status
+ LED1=$(echo /sys/class/leds/LED1*);
+ LED2=$(echo /sys/class/leds/LED2*);
+
+ echo soft > $LED1/src;
+ echo soft > $LED2/src;
+}
+
+handle_commands() {
+ echo "1$(cat $LED1/brightness)" > $1
+ echo "2$(cat $LED2/brightness)" > $1
+
+ while read -r line < $1; do
+ case $line in
+ "10") echo 0 > $LED1/brightness;;
+ "11") echo 1 > $LED1/brightness;;
+ "20") echo 0 > $LED2/brightness;;
+ "21") echo 1 > $LED2/brightness;;
+ esac
+ done
+}
+
+### main ###
+case $# in
+ 1) setup; handle_commands $1;;
+ *) echo "Usage: serial-server.sh <dev>. This script must be passed to rfcomm.";;
+esac
hooks/post-receive
--
armadeus
|