Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:c2_enhancement_gpio40_on_android [2017/05/19 16:19] odroid [I2C] |
en:c2_enhancement_gpio40_on_android [2017/05/30 17:27] (current) codewalker [Having a great fun with GPIO on Android] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Having a great fun with GPIO on Android ====== | ====== Having a great fun with GPIO on Android ====== | ||
- | ** You must install the C2 Android Marshmallow Ver2.7 image or higher to access the 40pin GPIO properly.** | + | ** You must install the C2 Android Marshmallow Ver2.8 image or higher to access the 40pin GPIO properly.** |
This WiKi explains how to make an Android app which can access GPIO ports.\\ | This WiKi explains how to make an Android app which can access GPIO ports.\\ | ||
Line 29: | Line 29: | ||
<code> | <code> | ||
$ sudo apt install git | $ sudo apt install git | ||
- | $ git clone https://github.com/codewalkerster/example-wiringPi -b odroidc2_gpiomem | + | $ git clone https://github.com/codewalkerster/example-wiringPi -b mater |
</code> | </code> | ||
Line 63: | Line 63: | ||
https://github.com/codewalkerster/example-wiringPi | https://github.com/codewalkerster/example-wiringPi | ||
+ | |||
+ | Select origin/master. | ||
{{:en:branch.png?nolink|}} | {{:en:branch.png?nolink|}} | ||
Line 86: | Line 88: | ||
==== PWM ==== | ==== PWM ==== | ||
Basic PWM control example. You can choose the number of PWM outputs 1 or 2.\\ | Basic PWM control example. You can choose the number of PWM outputs 1 or 2.\\ | ||
- | And control the frequency and duty ratio. | + | And control the frequency and duty ratio.\\ |
{{http://dn.odroid.com/homebackup/android_wiringPi_PWM.png?600|}} | {{http://dn.odroid.com/homebackup/android_wiringPi_PWM.png?600|}} | ||
Line 97: | Line 99: | ||
{{youtube>Vvq77w87RWQ?medium}} | {{youtube>Vvq77w87RWQ?medium}} | ||
==== I2C ==== | ==== I2C ==== | ||
- | An example code to access our [[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G144533067183|Weather Board]] to read the temperature, air pressure, | + | An example code to access our [[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G144533067183|Weather Board]] to measure the temperature, humidity, atmospheric pressure, altitude and visible/invisible light intensities via I2C |
+ | interface.\\ | ||
+ | |||
+ | {{:en:img_20170526_153143.jpg?600}} | ||
{{:en:screenshot_2016-04-25-02-38-54.png?600|}} | {{:en:screenshot_2016-04-25-02-38-54.png?600|}} | ||
==== UART ==== | ==== UART ==== | ||
+ | A demo software for Sending and Receiving characters via UART interface. \\ | ||
{{http://dn.odroid.com/homebackup/android_wiringPi_UART.png?600|}} | {{http://dn.odroid.com/homebackup/android_wiringPi_UART.png?600|}} | ||
==== 1 Wire ==== | ==== 1 Wire ==== | ||
+ | A demo software to access 1-wire protocol interfaced DS18S20 temperature sensor.\\ | ||
{{http://dn.odroid.com/homebackup/android_wiringPi_1wire.png?600|}} | {{http://dn.odroid.com/homebackup/android_wiringPi_1wire.png?600|}} | ||