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/18 16:53] odroid [ADC and GPIO output] |
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 79: | Line 81: | ||
==== ADC and GPIO output ==== | ==== ADC and GPIO output ==== | ||
- | Read ADC value and show the level with 19 LEDs on GPIO output.\\ | + | Read ADC value and show the voltage level with 19 LEDs on GPIO output.\\ |
{{http://dn.odroid.com/homebackup/android_wiringPi_ADC.png?600|}} | {{http://dn.odroid.com/homebackup/android_wiringPi_ADC.png?600|}} | ||
{{youtube>zyfULOkj0Vw?medium}} | {{youtube>zyfULOkj0Vw?medium}} | ||
Line 85: | Line 87: | ||
==== PWM ==== | ==== PWM ==== | ||
+ | Basic PWM control example. You can choose the number of PWM outputs 1 or 2.\\ | ||
+ | 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|}} | ||
+ | === Gmail Notifier example === | ||
+ | This is fun and useful project using the PWM port. \\ | ||
+ | When you watch video or play games, you might lose a notification of the important email or message. \\ | ||
+ | The flag is moving by servo motor which is connected to a PWM pin on 40pin GPIO port. \\ | ||
+ | https://github.com/codewalkerster/GMailNotifier | ||
+ | |||
+ | {{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 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|}} | ||