SyRenSimplified.h
Go to the documentation of this file.
00001 /*
00002 Arduino Library for SyRen Simplified Serial
00003 Copyright (c) 2012-2013 Dimension Engineering LLC
00004 http://www.dimensionengineering.com/arduino
00005 
00006 Permission to use, copy, modify, and/or distribute this software for any
00007 purpose with or without fee is hereby granted, provided that the above
00008 copyright notice and this permission notice appear in all copies.
00009 
00010 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00011 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00012 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00013 SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
00014 RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
00015 NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
00016 USE OR PERFORMANCE OF THIS SOFTWARE.
00017 */
00018 
00019 #ifndef SyRenSimplified_h
00020 #define SyRenSimplified_h   
00021 
00022 #if defined(ARDUINO) && ARDUINO >= 100
00023 #include <Arduino.h>
00024 #else
00025 #include <WProgram.h>
00026 #endif
00027 
00028 #if defined(USBCON)
00029 #define SabertoothTXPinSerial Serial1 // Arduino Leonardo has TX->1 on Serial1, not Serial.
00030 #else
00031 #define SabertoothTXPinSerial Serial1
00032 #endif
00033 #define SyRenTXPinSerial SabertoothTXPinSerial
00034 
00039 class SyRenSimplified
00040 {
00041 public:
00046   SyRenSimplified();
00047   
00053   SyRenSimplified(Print& port);
00054 
00055 public:
00060   void motor(int power);
00061   
00067   void motor(byte motor, int power); 
00068   
00072   void stop();
00073   
00074 private:
00075   Print& _port;
00076 };
00077 
00078 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Thu Aug 27 2015 14:39:50