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

Add second serial interface for debug logging in SelfomatController Arduino sketch (firmware) #33

Open
maehw opened this issue Oct 26, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@maehw
Copy link
Collaborator

maehw commented Oct 26, 2022

Would be nice if somebody could implement this (might do it myself).
Depending on the Arduino target hardware, it should be possible to use another UART interface or a software serial + a USB/serial converter to log on a PC.

@maehw maehw added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 26, 2022
@maehw
Copy link
Collaborator Author

maehw commented Oct 26, 2022

NeoSWSerial library might do the trick as Arduino UNO only has a single serial and SoftwareSerial conflicts with PinChangeInterrupt. TX direction is enough for logging.

However, #define NEOSWSERIAL_EXTERNAL_PCINT must be uncommented "to use your own PCINT ISRs".

Was able to compile it, but not able to test it yet.

Some snippets:

#define PIN_SWSERIAL_RX 12
#define PIN_SWSERIAL_TX 13
(...)
extern NeoSWSerial swSerial;
  swSerial.begin(38400);
  swSerial.ignore(); // do not use RX
(...)
  swSerial.println("Pin setup complete.");

@maehw
Copy link
Collaborator Author

maehw commented Oct 28, 2022

I can provide a proof of concept in a separate branch, if you like @ClemensElflein .

@ClemensElflein
Copy link
Member

Sounds good! I currently don't have the time to work on the self-o-mat, but I'll have a look when the weather is bad and I can't work on my open mower project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants