Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion notes 2019-05-12 #47

Open
thomasloven opened this issue May 13, 2019 · 1 comment
Open

Discussion notes 2019-05-12 #47

thomasloven opened this issue May 13, 2019 · 1 comment

Comments

@thomasloven
Copy link
Collaborator

Some notes after discussions among devs on 2019-05-12.

Here's some things I think we agreed on

  • We wish to add some form of remote control interface to LIAM.
  • Modularity is important. This should in no way be required for normal operation.
  • We want a simple interface with remote modules plugging in to the "bluetooth" port of the top shield to handle the external communication. This requires a serial interface.

The interface(s) should be able to:

  • Report status (Battery, operation mode, errors)
  • Change the operation mode of the mower
  • Be human readable (to an extent - e.g. B:11998;M:2;E:0 is ok, binary data is not)

We also discussed storing configuration settings in the eeprom of the arduino.

Some of my own thoughts:

Roadmap

Define the serial interface and set up a method

The display library is definitely the best place to put this.
I propose we rename it "Interface" and let it take responsibility for communication both ways. Be it through a serial connection of through an LCD and physical buttons on the machine.

We should also retract the recommendation to not override the MYSIDPLAY::update() function. I believe the thought was that the interface should be consistent, but it's very limiting.

A new parameter for the operation mode will have to be added to the constructor as well.

Add operation modes

E.g. AUTO/GO/HOME/PAUSE/(DEBUG)
This can be done in parallell with the serial interface.

Some thought will need to go into the details of the behavior. If the mower is docked, and sent the GO command, should it go immediately, or should it wait until the battery is fully charged?

Reference implementation of control interface

I don't have much ideas here... This could be something really really simple, like plugging in an esp01 with esp-link and a command line interface to control it from a PC, or it could be a esp32 running a full web interface...

Configuration storage

As was mentioned, storing configuration options in eeprom would allow distributing precompiled hex files, ready to upload to the mower.

A possible problem with storing configuration in EEPROM is that it requires a communication interface to set them. Unless we can come up with a way to override default settings only if defined in EEPROM... or something...

@thomasloven thomasloven changed the title Roadmap for remote control Discussion notes 2019-05-12 May 13, 2019
@thomasloven
Copy link
Collaborator Author

thomasloven commented May 13, 2019

I did a bit of experimenting with operation states last summer. Here's a summary of my changes to the code:

void loop() {
  ...
  if(previousState != -1)
  {
    state = previousState;
    previousState = -1;
  }
  switch(command)
  {
    case CMD_AUTO:
      break;
    case CMD_HOME:
      if(state != DOCKING && state != CHARGING && state != LOOKING_FOR_BWF)
        state = LOOKING_FOR_BWF;
      if(state == LAUNCHING) // This obviously never happens... don't know what I was thinking
        state = CHARGING;
    case: CMD_LAUNCH:
      if(state == CHARGING)
        state = LAUNCHING
      command = CMD_AUTO;
      break;
    case CMD_PAUSE:
      if(previousState == -1)
        previousState = state;
      state = PAUSED;
      break;
  }

  switch(state) {
    case MOWING:
      ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant