[SOLVED] ODLib: Digital IO,PWM,LCD,Servos,Motors,I2C,...

Moderators: mdrjr, odroid

Re: Android ODLib: Digital IO,PWM,LCD,Servos,Motors,I2C,...

Unread postby TrippleAAA » Fri Jul 22, 2016 1:27 am

Yes, I've removed the case of the ODroid Cam to mount it. Is working great.

2nd Picture I2C Sensors:

- I2C RTC 3231
- I2C UV Light Sensor
- I2C Light Sensor
- I2C VOCs Air Quality Sensor
- I2C Humidity + Temperature Sensor
- I2C Air Pressure Sensor


Kinect: You can look left and right (180°) and the Kinect itself can look up and down ~45°

I've implemented a red laser to know at which point the robot is looking with his camera.
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: Android ODLib: Digital IO,PWM,LCD,Servos,Motors,I2C,...

Unread postby idorel77 » Fri Jul 22, 2016 11:59 pm

Hi TrippleAAA,

Can you tell me how to use your library and how to use for ex: Humidity + Temperature sensor?'
That can be useful in car.

Thanks.
idorel77
 
Posts: 86
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english
ODROIDs: C2

Re: Android ODLib: Digital IO,PWM,LCD,Servos,Motors,I2C,...

Unread postby TrippleAAA » Sat Jul 23, 2016 12:31 am

How to use:

You need Eclipse (https://eclipse.org), + Android SDK: https://stuff.mit.edu/afs/sipb/project/ ... g-adt.html
... and Android_NDK_r11c (one of these, choose one, or the latest NDK here: https://developer.android.com/ndk/downloads/index.html):
(win32) http://dl.google.com/android/repository ... ws-x86.zip
(win64) http://dl.google.com/android/repository ... x86_64.zip
(mac) http://dl.google.com/android/repository ... x86_64.zip
(linux) http://dl.google.com/android/repository ... x86_64.zip

.... copy the NDK folder into this location (Mac): /Applications/Android_NDK_r11c (inside this you will have: the "ndk-build" folder)

Open Eclipse and import the project with: File -> Import -> Existing Android code .... and select the Source Code folder (ODLib). Choose a Example in the "ExampleActivity.java" and press "Run..." Thats it.

Hint: If you're not using a mac or using another NDK version, you have to edit the NDK path in Eclipse: Project -> Properties -> Builders -> New Builder -> Main -> Location: /Applications/Android_NDK_r11c/ndk-build


An example how you can use a Temperature sensor is in the ExampleActivity.java inside the ODLib.

The most sensors are working with I2C... take a look into the source code.
Last edited by TrippleAAA on Sat Jul 23, 2016 7:28 am, edited 1 time in total.
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: Android ODLib: Digital IO,PWM,LCD,Servos,Motors,I2C,...

Unread postby rooted » Sat Jul 23, 2016 7:24 am

@TrippleAAA

Outstanding work on ODLib, thanks for sharing.
User avatar
rooted
 
Posts: 5607
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Android ODLib: Digital IO,PWM,LCD,Servos,Motors,I2C,...

Unread postby TrippleAAA » Sat Jul 23, 2016 7:28 am

You're welcome
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: Android ODLib: Digital IO,PWM,LCD,Servos,Motors,I2C,...

Unread postby idorel77 » Sat Jul 23, 2016 2:38 pm

Thanks, i will try.
idorel77
 
Posts: 86
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english
ODROIDs: C2

Re: Android ODLib: Digital IO,PWM,LCD,Servos,Motors,I2C,...

Unread postby TrippleAAA » Sun Jul 24, 2016 8:24 am

New: Added new Classes + Examples for I2C Sensors:

Barometer BMP180 (+ Temperature)
Humidity HTU21D (+ Temperature)
Luxmeter TSL2561
UVmeter SI1145

.
Attachments
IMG_20160720_030913286.jpg
(262.77 KiB) Downloaded 964 times
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: ODLib (Android): Digital IO,PWM,LCD,Servos,Motors,I2C,..

Unread postby TrippleAAA » Tue Jul 26, 2016 5:26 am

Updated to v9.0:

New: Switchable PullUp Resistor with "pullUpMode(pin,mode)" + Examples
New: 3 times faster pin input/output speed
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: ODLib (Android): Digital IO,PWM,LCD,Servos,Motors,I2C,..

Unread postby TrippleAAA » Wed Jul 27, 2016 4:10 am

Updated to v9.2

New: Class Nokia 5110/3310 PCD8544 84x48 LCD + Example
Attachments
IMG_20160726_210844225.jpg
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: ODLib (Android): Digital IO,PWM,LCD,Servos,Motors,I2C,..

Unread postby TrippleAAA » Wed Jul 27, 2016 9:08 am

Updated to v9.3

Fixed: Pin Interrupt function "setInterrupt"
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: ODLib (Android): Digital IO,PWM,LCD,Servos,Motors,I2C,..

Unread postby TrippleAAA » Fri Jul 29, 2016 6:51 am

Updated to v9.5

New: Rotary Encoder Support + Example

IMG_20160728_234807628.jpg

device-2016-07-28-234626.png
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: ODLib (Android): Digital IO,PWM,LCD,Servos,Motors,I2C,..

Unread postby odroid » Fri Jul 29, 2016 10:06 am

Great! Can you give me a link of the Rotary Encoder? I also want to make something fun.

Is there any way to emulate "Vol+", "Vol-" key via uinput driver with the CW and CCW detection?
User avatar
odroid
Site Admin
 
Posts: 28732
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODLib (Android): Digital IO,PWM,LCD,Servos,Motors,I2C,..

Unread postby TrippleAAA » Fri Jul 29, 2016 10:41 am

Is there any way to emulate "Vol+", "Vol-" key via uinput driver with the CW and CCW detection?

You don't need uinput driver, I've made a Volume Service app with my ODLib and one of the Rotary Encoders:
viewtopic.php?f=137&t=22743#p153043

With this app you can control the Volume +/- (and also Mute).

Great! Can you give me a link of the Rotary Encoder? I also want to make something fun.

Adafruit without LED: https://www.amazon.com/Adafruit-Accesso ... ry+encoder
SparkFun with RGB LED: https://www.amazon.com/Karlsson-Robotic ... ncoder+RGB
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Re: ODLib (Android): Digital IO,PWM,LCD,Servos,Motors,I2C,..

Unread postby odroid » Fri Jul 29, 2016 10:58 am

Thank you for the links with detail explanation. :D
User avatar
odroid
Site Admin
 
Posts: 28732
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODLib (Android): Digital IO,PWM,LCD,Servos,Motors,I2C,..

Unread postby TrippleAAA » Sat Jul 30, 2016 6:21 am

odroid wrote:Thank you for the links with detail explanation. :D

I have to thank ;)

You guys are great. Nearly all of the features I needed you've fixed in the last releases. Only Kinect and Wifi Hotspot support is open. But I think you will fix it also.

So, after my last update today with the support of the "Touch HDMI 5" Screen" via SPI, and after 1 1/2 month to create the ODLib, now it's time to go away for a while... to finish my big project (as I wrote in the PM) which I have been working for 8 years. Thanks for the C2 and your continuously work, you've change everything in relation of my big project. The C2 was the piece I needed to bring it forward.

stay engaged

IMG_20160729_230459101.jpg

IMG_20160729_230625924.jpg

IMG_20160729_230646001.jpg
TrippleAAA
 
Posts: 237
Joined: Mon Jun 13, 2016 4:57 am
languages_spoken: english

Previous

Return to Android

Who is online

Users browsing this forum: No registered users and 1 guest