Skip to content

Feature Request: Support for SingleWireSerial #6

@sebastiannielsen

Description

@sebastiannielsen

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions