Serial / remote learning mode

Hi there,

I’ve scoured the forums, code and documentation and this doesn’t seem to be implemented, so I’ll ask here.
Is it possible to use learning mode and remote control modes at the same time? Does anyone have any modified code to support that?
I’d like to be able to send serial commands from a remote control device which reads potentiometer values from a seperate mechanical device and to record that motion for later playback.
If anyone has done anything like this, I’d really appreciate any feedback.
If not, I’ll try to roll my own, but I don’t actually have a uArm to play with as I’m making this for someone else, so debugging would be quite painful!


As far as I know, no one has done this, but it should be quite easy to do, if I understand the problem correctly.

If you look at the record/learning mode, you see that at periodic intervals, it records the position values of the servos. (It also records some other things, so we’ll treat them collectively as “commands”.)

It records those commands in the EEPROM where the playback sketch can read them and execute them.

So what we want, then, is a way to capture these commands, save them not to the EEPROM but in some way that they can be played as a sketch.

This is what I envision:

  • Write a sketch that works just like the existing record sketch but instead of writing the commands to the EEPROM, it should write them to memory.
  • At the end of the record, the memory of the commands should be dumped to the serial output, formatted with commas or whatnot so that they are machine readable.
  • This “recording” can now be copied out of the serial monitor.
  • Also needed is a blank playback sketch. The blank playback sketch should look a lot like the existing playback sketch but should read commands out of a data element, instead of EEPROM.
  • Initially this sketch has no data, so to make a sketch of your recording, you take the copied commands and paste them into your blank playback sketch.
  • Then, you save that sketch as “cup-stacking-recording.ino” or whatever.

Let me know if that makes sense. Is this for @simsalapim? I have been trying to get her to listen to me. :slight_smile:

Let me know if I can help.

Thanks @DCorboy,

I’ve actually mostly got this working now. I threw together a makeshift uArm to test some stuff out. The makeshift uArm actually records the incoming data, so there’s no requirement for any of the intermediate stuff. I use a comms command from the controller device to initiate the remote recording mode to make the operation a little more transparent.
I’ll post my code here once I’m happy with it!
For now, I’ll say this isn’t for @simsalapim