Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 821|Reply: 8

Orange Pi 3G-IoT i2c accelerometer

[Copy link]

1

Threads

4

Posts

51

Credits

Registered member

Rank: 2

Credits
51
Post time 2018-11-8 22:16:06 | Show all posts |Read mode
Edited by valspakonto at 2018-11-8 22:18

Hi all.

I'm researching the Orange Pi 3G-IoT for my client's purposes.

I'm wondering what I need to do to make accelerometer work on this board. It has everything we need except accelerometer and this is essential to this project.
The final solution will be deployed on over 30000 places, so price matters, and that's why this particular board is potential candidate, so please don't recommend any other boards if they are 2x more expensive.

So, to the question:
I'm trying to connect ADXL345 accelerometer (but can be any other cheap one, but must be accessible in large quantities),
My orange pi does have the following devices under /sys/bus/i2c/devices:
  1. 0-007f
  2. 1-0026
  3. 1-0040
  4. 1-0050
  5. 1-0055
  6. i2c-0
  7. i2c-1
Copy the Code

but does NOT have i2c devices under /dev folder. In fact, it does not have even /dev/i2c folder. I assume this is due to lack of i2c-dev module.
i2cdump tool looks for devices in the /dev/i2c/ folder and this can't work, obviously.


I looked for the scraps of the documentation on the web and found entry telling about compiling the android system and specifically about file "ProjectConfig.mk".
  1. CUSTOM_KERNEL_ACCELEROMETER = adxl345
Copy the Code

I've downloaded the whole source from the OrangePi MEGA cloud and found there that flag in ProjectConfig.mk
  1. CUSTOM_KERNEL_ACCELEROMETER = mir3da #KXTJ2-1009
Copy the Code
And that's right. Android system claims it has the Kionix KXTJ2-1009 accelerometer though on board there are no accelerometers.
In the source I saw there is already some code for ADXL345, but I'm still unsure how to use it.

My questions are:
1. If I change the CUSTOM_KERNEL_ACCELEROMETER to adxl345 and compile android, will it work? And will it automatically make android system seeing the ADXL345 accelerometer as one of the sensors in the SensorManager API?
2. I found on some sites that I need to compile i2c-dev module to the kernel if I want to have devices shown under /dev/i2c/ - is that right? Do I need it if I just change the CUSTOM_KERNEL_ACCELEROMETER?
3. If i2c-dev is necessary, could anyone point me at the right direction how to compile it and add the module to the kernel? I saw source codes somewhere, but I didn't do that yet. I tried i2c-dev precompiled by someone, but it was for lychee build, and obviously, didn't work.
4. Maybe I'm missing something? Maybe I'm completely wrong and need to do something else to make it work?

Thanks in advance

0

Threads

6

Posts

32

Credits

Novice

Rank: 1

Credits
32
Post time 2018-12-31 11:44:31 From the mobile phone | Show all posts
Hi. Have you tested gps of orange pi 3g-iot

0

Threads

6

Posts

32

Credits

Novice

Rank: 1

Credits
32
Post time 2018-12-31 11:45:15 From the mobile phone | Show all posts
My gps in not working in android on orange pi 3g iot

0

Threads

6

Posts

32

Credits

Novice

Rank: 1

Credits
32
Post time 2018-12-31 11:45:51 From the mobile phone | Show all posts
Any suggestion? Gps app says no gps signal

1

Threads

4

Posts

51

Credits

Registered member

Rank: 2

Credits
51
 Author| Post time 2019-1-8 19:04:10 | Show all posts
ajafari200 replied at 2018-12-31 11:45
Any suggestion? Gps app says no gps signal

Hi, gps was working for me on this board. Bear in mind that gps antenna needs to see directly the satellites to get the fix, so I found my first results on the balcony The best results indoor I had, were when placed the board just by the window. On my desk I tried with another, bigger antenna from taoglas, and until gps had no fix, there were no results. I've written simple android app which sends POST request to my backend when it obtains position, then connected external powerbank and took it to the balcony and waited for like 10 minutes for fix.

And to people who are considering this board for external devices like an accelerometer - the manufacturer answered me that this board was not developed with any sensor module. We finally found board from another manufacturer, which fits our needs.

0

Threads

6

Posts

32

Credits

Novice

Rank: 1

Credits
32
Post time 2019-1-18 23:27:26 From the mobile phone | Show all posts
Dear friend thx for your reply. Could you please tell me what board you used from another manufacturer?

1

Threads

4

Posts

51

Credits

Registered member

Rank: 2

Credits
51
 Author| Post time 2019-1-23 15:44:42 | Show all posts
Edited by valspakonto at 2019-1-23 15:46
ajafari200 replied at 2019-1-18 23:27
Dear friend thx for your reply. Could you please tell me what board you used from another manufactur ...

Sure, I hope it doesn't violate rules of this forum, but we decided to use the onion omega. It's cheap, runs linux, no problems with i2c. Needed some work and finally we have everything we wanted.

0

Threads

6

Posts

32

Credits

Novice

Rank: 1

Credits
32
Post time 2019-1-26 23:46:25 From the mobile phone | Show all posts
Dear valspakontlo, thanks for your response. Would you please tell me which board from which manufacture you used finally

1

Threads

4

Posts

51

Credits

Registered member

Rank: 2

Credits
51
 Author| Post time 2019-1-28 19:51:53 | Show all posts
ajafari200 replied at 2019-1-26 23:46
Dear valspakontlo, thanks for your response. Would you please tell me which board from which manufac ...

As I said previously, it's onion omega.
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-5-27 17:04 GMT+8 , Processed in 0.029801 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list