forked from waveshareteam/ugv_base_general
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
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)
Metadata
Metadata
Assignees
Labels
No labels