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

Support for SingleWireSerial #2

Open
sebastiannielsen opened this issue Aug 23, 2024 · 0 comments
Open

Support for SingleWireSerial #2

sebastiannielsen opened this issue Aug 23, 2024 · 0 comments

Comments

@sebastiannielsen
Copy link

sebastiannielsen commented Aug 23, 2024

Feature Request:

Support for SingleWireSerial:
https://github.com/felias-fogg/SingleWireSerial

In this way, the servo can be directly connected to a Arduino without any components in-between.

Currently, if you try to:

#include <SCServo.h>
#include <SingleWireSerial.h>

 SCSCL sc;
 SingleWireSerial ServoSerial(false);

 void setup(){
         ServoSerial.begin(1000000);
         sc.pSerial = &ServoSerial;
         while(!ServoSerial) {}
 }

it will complain:

error: cannot convert 'SingleWireSerial*' to 'HardwareSerial*' in assignment
sc.pSerial = &ServoSerial;
^~~~~~~~~~~
exit status 1
Compilation error: cannot convert 'SingleWireSerial*' to 'HardwareSerial*' in assignment

(NOTE: The warning in SingleWireSerial about not being able to use servos, applies to regular PWM servos, since the Timer objects will be occupied by the SingleWireSerial library, and thus analog and PWM output is unavailable, so it should be fine using SingleWireSerial for serial servos)

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