Arduino with greybus.

204 views
Skip to first unread message

Bryce Wilson

unread,
Nov 19, 2015, 1:39:37 PM11/19/15
to Ara Module Developers
Does anyone know if it is possible to control a module or the endo with an Arduino? Has anyone already done that? If so can you send/ give me the code?

Greg KH

unread,
Nov 19, 2015, 1:55:27 PM11/19/15
to Bryce Wilson, Ara Module Developers
On Thu, Nov 19, 2015 at 10:39:37AM -0800, Bryce Wilson wrote:
> Does anyone know if it is possible to control a module or the endo with an
> Arduino?

What specifically do you mean by "control"?

thanks,

greg k-h

Bryce Wilson

unread,
Nov 19, 2015, 2:22:51 PM11/19/15
to Ara Module Developers
If it was connected to a battery it would be like asking it what the battery level is or some other request you can make to the module. As if it was the AP but directly connected to the module rather than going through the endo.

Greg KH

unread,
Nov 19, 2015, 5:12:44 PM11/19/15
to Bryce Wilson, Ara Module Developers
On Thu, Nov 19, 2015 at 11:22:51AM -0800, Bryce Wilson wrote:
> If it was connected to a battery it would be like asking it what the battery
> level is or some other request you can make to the module. As if it was the AP
> but directly connected to the module rather than going through the endo.

So you want an Arduino to replace the whole system and be able to talk
to a module? You would need a unipro controller to hook up to your
Arduino, good luck trying to find one of them, I have never heard of
such a thing, sorry.

Then you would need the whole greybus stack also ported to the arduino,
another non-trivial thing to do...

greg k-h

Bryce Wilson

unread,
Nov 19, 2015, 7:35:03 PM11/19/15
to Ara Module Developers, secret.m...@gmail.com
I did not think it would be easy. I really just wanted an easy way to get the charge of a battery module but I will probably just do it a slower way. If there is a way to do this without writing lots of complicated code (I don't want to do that) other than the standard battery charging stuff I would love to hear it.

Greg KH

unread,
Nov 19, 2015, 7:50:26 PM11/19/15
to Bryce Wilson, Ara Module Developers
On Thu, Nov 19, 2015 at 04:35:03PM -0800, Bryce Wilson wrote:
> I did not think it would be easy. I really just wanted an easy way to get the
> charge of a battery module but I will probably just do it a slower way.

Why do you want to get a charge of a module when it's not plugged in?
For a test-fixture? Or something else?

> If there is a way to do this without writing lots of complicated code
> (I don't want to do that) other than the standard battery charging
> stuff I would love to hear it.

You don't have to "write" any new code, just use everything that is
already provided (firmware / kernel) code for you, you shouldn't have to
write any new code for something as simple as a battery.

good luck!

greg k-h

Bryce Wilson

unread,
Nov 19, 2015, 7:54:21 PM11/19/15
to Ara Module Developers, secret.m...@gmail.com
But you would if it was on the Arduino or am I wrong?

Greg KH

unread,
Nov 19, 2015, 8:14:41 PM11/19/15
to Bryce Wilson, Ara Module Developers
On Thu, Nov 19, 2015 at 04:54:21PM -0800, Bryce Wilson wrote:
> But you would if it was on the Arduino or am I wrong?

I can not parse this sentence, please explain.

Bryce Wilson

unread,
Nov 19, 2015, 8:53:17 PM11/19/15
to Ara Module Developers, secret.m...@gmail.com
What I mean is that for a battery I would still have to wright some complex code because the API is for android. If that is not correct and there is an easier way than you can tell me.

Greg KH

unread,
Nov 19, 2015, 11:15:35 PM11/19/15
to Bryce Wilson, Ara Module Developers
On Thu, Nov 19, 2015 at 05:53:17PM -0800, Bryce Wilson wrote:
> What I mean is that for a battery I would still have to wright some complex
> code because the API is for android.

What "API" would that be?

And you never answered my other question, "what exactly are you trying
to do, and why?"

> If that is not correct and there is an easier way than you can tell
> me.

That is not correct.

And it's not an "easier" thing, I suggest you go read the MDK and other
public documentation again, your understanding of how a module talks to
the system is not correct at all.

hope this helps,

greg k-h

Bryce Wilson

unread,
Nov 20, 2015, 1:12:33 AM11/20/15
to Ara Module Developers, secret.m...@gmail.com
Basically what I am doing is building a battery charger for project ARA battery modules. you said "You don't have to "write" any new code, just use everything that is 
already provided (firmware / kernel) code for you, you shouldn't have to write any new code for something as simple as a battery." I tried that and it is not that easy on the Arduino. I understand how everything works with the unipro network and I have read the MDK. I am trying to bypass the unipro network so I can charge a battery module with only the cost of say a camera battery charger (or a bit more for the more complex module system). I guess I wrote it wrong I want to make a charger for the battery and to do that without breaking the battery I want to know how full it is so I can stop charging when it is full. Sorry for the confusion.

Bryce Wilson

unread,
Nov 20, 2015, 1:14:21 AM11/20/15
to Ara Module Developers, secret.m...@gmail.com
Also by API I was thinking of the one on git hub: github.com/projectara/greybus. Also PLEASE post some pictures of the pages you where talking about in the MDK because I can not find them.

Bryce Wilson

unread,
Nov 20, 2015, 1:15:24 AM11/20/15
to Ara Module Developers, secret.m...@gmail.com
OPPS I was thinking of another post. There are no pictures you need to post.

Greg KH

unread,
Nov 20, 2015, 4:00:11 PM11/20/15
to Bryce Wilson, Ara Module Developers
On Thu, Nov 19, 2015 at 10:12:33PM -0800, Bryce Wilson wrote:
> Basically what I am doing is building a battery charger for project ARA battery
> modules.

That's going to be tricky if you want to charge it through the "main"
connector, but there might be ways to get it to work without having to
deal with emulating a whole "host" device, but it will take some work
and experimenting.

> you said "You don't have to "write" any new code, just use everything
> that is  already provided (firmware / kernel) code for you, you
> shouldn't have to write any new code for something as simple as a
> battery."

Yes.

> I tried that and it is not that easy on the Arduino.

The Arduino is not a "real" system that any of the above mentioned code
could ever dream to run on.

> I understand how everything works with the unipro network and I have
> read the MDK.

Great, so you see how that will not work with an Arduino :)

> I am trying to bypass the unipro network so I can charge a battery
> module with only the cost of say a camera battery charger (or a bit
> more for the more complex module system). I guess I wrote it wrong I
> want to make a charger for the battery and to do that without breaking
> the battery I want to know how full it is so I can stop charging when
> it is full.

As I said above, there might be ways to do this by ignoring the Unipro
connection and just using the power lines, but I'm not an EE, so I can't
tell you how to do that at all, sorry, I just know a bit about the
software involved in the system.

Good luck!

greg k-h

Bryce Wilson

unread,
Nov 20, 2015, 9:17:07 PM11/20/15
to Ara Module Developers, secret.m...@gmail.com
Ya I did not this it was going to be easy. I am trying to get my hands on a battery module now (if you know where I can get one that would be great). The Arduino is difficult to use the code on and I understand that it would not work to use the whole code with it (never thought what would work). What you you mean by the 'main' connecter. Is there a non 'main' connecter (if you mean the internal battery connection then that would not work because I need to use this in a commercial product)? Thanks for all your help you have been very helpful!

Greg KH

unread,
Nov 21, 2015, 12:20:42 PM11/21/15
to Bryce Wilson, Ara Module Developers
On Fri, Nov 20, 2015 at 06:17:07PM -0800, Bryce Wilson wrote:
> Ya I did not this it was going to be easy. I am trying to get my hands on a
> battery module now (if you know where I can get one that would be great). The
> Arduino is difficult to use the code on and I understand that it would not work
> to use the whole code with it (never thought what would work).

I don't think any of the code would work on an Arduino, as again, you
would need a Unipro interface to such a tiny processor.

Best of luck!

greg k-h

Bryce Wilson

unread,
Nov 21, 2015, 12:24:56 PM11/21/15
to Ara Module Developers, secret.m...@gmail.com
At this point I am just hoping that I can charge it through the connecter and have it auto shutoff if it is full because yes the code would not run on the Arduino. I don't want to get the unipro interface because that would make the charger too expensive and no one would buy it.

Josiah Amankwah

unread,
Feb 8, 2016, 5:31:42 PM2/8/16
to Ara Module Developers
I think it should!!!
Reply all
Reply to author
Forward
0 new messages