Moteino Gateway/Nodes Servo control gui interface?

Started by apbstylez, October 26, 2015, 12:38:06 PM

apbstylez

My current Moteino project requires me to control 20 servos(each in a different location) so each servo will be attached to a different node that will communicate with a main transmitter.  Ultimately I would like to use a gui on my PC to interface with the Moteino transmitter to control the servos, but I have very little experience in this area.

     Any suggestions on where to start?

Thanks for any thoughts/ideas!

Cheers!

Aaron

TomWS

Quote from: apbstylez on October 26, 2015, 12:38:06 PM
My current Moteino project requires me to control 20 servos(each in a different location) so each servo will be attached to a different node that will communicate with a main transmitter.  Ultimately I would like to use a gui on my PC to interface with the Moteino transmitter to control the servos, but I have very little experience in this area.

     Any suggestions on where to start?

Thanks for any thoughts/ideas!

Cheers!

Aaron
Aaron, these are RC type servos?

If I understand your project, you have 'n' nodes, each with their own servo.  You want your PC to talk to a 'controller' Moteino node that will, in turn, transmit commands to each of these servos to, I guess, set a particular angle (from 0 to 180 degrees) on each servo?

If this is correct, just a couple of other questions:
1. How often do you need to send commands?
2. Do you plan to use a serial interface between the PC application and the 'controller' Moteino?
3.  Presumeably the PC app or your controller Moteino will map the UI's device identification to a Moteino Node ID?
4. What kind of range are you looking for?
5. Is each node getting a distinct motion command or are they all getting the same information and are simply in separate locatons?

Hmmmm, that's all I can think of for the moment.

Tom
PS: your starting point would be getting at least two Moteinos with matching transceivers AND if you plan to have a separate debug connection to the 'controller' Moteino, I HIGHLY recommend that the 'controller' Moteino be a Moteino Mega (it has two serial ports).



apbstylez

Thanks for replying!

1. How often do you need to send commands?
    commands will be sent every 30sec or so.
2. Do you plan to use a serial interface between the PC application and the 'controller' Moteino?
    I planned on running the 'controller moteino via usb to the PC
3.  Presumably the PC app or your controller Moteino will map the UI's device identification to a Moteino Node ID?
    Correct
4. What kind of range are you looking for?
    No more than 100'
5. Is each node getting a distinct motion command or are they all getting the same information and are simply in separate locations?
    Both, =) Sometimes the command will be unique, other times there will need to be groups (that could include all) of nodes moving!


Thanks again for any help/thoughts!

Aaron

TomWS

Quote from: apbstylez on October 29, 2015, 02:03:37 PM
Thanks for replying!

1. How often do you need to send commands?
    commands will be sent every 30sec or so.
2. Do you plan to use a serial interface between the PC application and the 'controller' Moteino?
    I planned on running the 'controller moteino via usb to the PC
3.  Presumably the PC app or your controller Moteino will map the UI's device identification to a Moteino Node ID?
    Correct
4. What kind of range are you looking for?
    No more than 100'
5. Is each node getting a distinct motion command or are they all getting the same information and are simply in separate locations?
    Both, =) Sometimes the command will be unique, other times there will need to be groups (that could include all) of nodes moving!


Thanks again for any help/thoughts!

Aaron
At this point I'm not sure what you need help with.  If you look at the RFM69 library, you'll see a number of examples.  I think if you use Struct_send to send the angle information to any node you want to update and use Struct_receive to receive the information to control the servo, you've got most of what you need.  If you need code to convert the 'angle' to a servo pulse, let me know, I have a quick and dirty test app that I use for testing servos and it shouldn't be too hard to adapt to your needs.  Unfortunately it is TOTALLY uncommented at this point (so much so I can't even tell who wrote it!  :-[  so it would take a bit of time to make it useful...

Let me know.

Tom

spark

Not sure how experienced you are, but if you are interfacing with a PC - I'd recommend using MeteorJS for your web application.  It will have a little bit of a learning curve, but much less than other frameworks.  The "stack" includes mongodb and node.js.  Once you get the hang of it you will love it.

For interfacing with your gateway moteinto, start with Felix's Pi gateway software.  He uses node.js and shows how to use an NPM module to read/write from a serial port to interface with the moteino.

apbstylez

Quote from: TomWS on October 29, 2015, 05:17:12 PM
If you need code to convert the 'angle' to a servo pulse, let me know, I have a quick and dirty test app that I use for testing servos and it shouldn't be too hard to adapt to your needs.

Tom,

That would be awesome, now that my free time has opened up I'm going to bunker down on this project! 

Aaron

TomWS

Quote from: apbstylez on November 24, 2015, 06:26:35 PM
Quote from: TomWS on October 29, 2015, 05:17:12 PM
If you need code to convert the 'angle' to a servo pulse, let me know, I have a quick and dirty test app that I use for testing servos and it shouldn't be too hard to adapt to your needs.

Tom,

That would be awesome, now that my free time has opened up I'm going to bunker down on this project! 

Aaron
Oh great!  Now I have to try to go find that 'ancient' code!   ???
I take a look around tomorrow, I should be able dig it up fairly easily...
With luck it might even have a couple of comments in it!
Tom

TomWS

Well, for what it's worth, here is the marginally commented test program.  Note that it is entirely blocking while sending out the command pulse.  Not much to look at, but it is useful.