Skip to content

Instantly share code, notes, and snippets.

@nseidle
Last active September 29, 2016 17:20
Show Gist options
  • Save nseidle/ae00df84a04f3701411d9b48b3d2d31f to your computer and use it in GitHub Desktop.
Save nseidle/ae00df84a04f3701411d9b48b3d2d31f to your computer and use it in GitHub Desktop.
//Initialize the Serial port
bool Laser::begin(Stream &serialPort)
{
_laserSerial = &serialPort; //Grab which port the user wants us to use
//_laserSerial->begin(); //Stream has no .begin() so the user has to do a whateverSerial.begin(xxxx); from setup()
}
//Send a command to the laser
void Laser::sendCommand(String command)
{
_laserSerial->println(command);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment