Accessories
Arduino for motors and lights library.
PortShieldL293d.hpp
1
//-------------------------------------------------------------------
2
#ifndef __PortShieldL293d_H__
3
#define __PortShieldL293d_H__
4
//-------------------------------------------------------------------
5
6
#if !defined(__AVR_ATmega32U4__)
7
#if defined VISUALSTUDIO
8
#include "AFMotor.h"
9
#else
10
#include "AFMotor.hpp"
11
#endif
12
#include "Port.hpp"
13
14
#define SHIELDL293D_PORT_M1 1
15
#define SHIELDL293D_PORT_M2 2
16
#define SHIELDL293D_PORT_M3 3
17
#define SHIELDL293D_PORT_M4 4
18
19
#define SHIELDL293D_SERVO1_PIN 10
20
#define SHIELDL293D_SERVO2_PIN 9
21
27
class
PortShieldL293d
:
public
Port
28
{
29
protected
:
31
AF_DCMotor *
pmotor
;
32
33
public
:
35
PortShieldL293d
();
36
43
void
begin
(
unsigned
char
inOutPort, uint8_t inSpeed, uint8_t inFreq);
44
49
int
SetSpeed
(uint8_t inSpeed);
50
54
void
MoveLeftDir
(
unsigned
long
inDuration = 0);
58
void
MoveRightDir
(
unsigned
long
inDuration = 0);
60
void
MoveStop
();
61
62
#ifdef ACCESSORIES_PRINT_ACCESSORIES
63
64
unsigned
char
printedOutPort;
66
uint8_t printedSpeed;
70
void
printPort();
71
#endif
72
};
73
74
//-------------------------------------------------------------------
75
#endif
76
#endif
77
//-------------------------------------------------------------------
PortShieldL293d::MoveStop
void MoveStop()
Definition:
PortShieldL293d.cpp:85
PortShieldL293d::MoveRightDir
void MoveRightDir(unsigned long inDuration = 0)
Definition:
PortShieldL293d.cpp:61
PortShieldL293d::MoveLeftDir
void MoveLeftDir(unsigned long inDuration = 0)
Definition:
PortShieldL293d.cpp:38
PortShieldL293d::SetSpeed
int SetSpeed(uint8_t inSpeed)
Definition:
PortShieldL293d.cpp:31
Port::begin
virtual void begin()
Definition:
Port.hpp:99
PortShieldL293d::PortShieldL293d
PortShieldL293d()
Definition:
PortShieldL293d.cpp:13
PortShieldL293d::pmotor
AF_DCMotor * pmotor
Definition:
PortShieldL293d.hpp:31
Port
Definition:
Port.hpp:61
PortShieldL293d
Definition:
PortShieldL293d.hpp:27
src
PortShieldL293d.hpp
Generated on ven. août 25 2017 17:49:17 for Accessories by
1.2.10