Accessories
Arduino for motors and lights library.
Accessories.h
Go to the documentation of this file.
1
//-------------------------------------------------------------------
2
#ifndef __accessories_H__
3
#define __accessories_H__
4
//-------------------------------------------------------------------
5
335
#define LIBRARY_VERSION "Accessories V1.2.0"
336
338
// Add a '//' at the beginning of the line to be in
339
// release mode.
340
//#define ACCESSORIES_DEBUG_MODE
341
343
// Verbose mode lets you see all actions done by the
344
// library, but with a real flood of text to console...
345
// Has no effect if ACCESSORIES_DEBUG_MODE is not activated.
346
//#define ACCESSORIES_DEBUG_VERBOSE_MODE
347
349
// The function Accessories::printAccessories()
350
// is very heavy in program memory. So to avoid problems
351
// you can make this function available by uncomment the next line.
352
//#define ACCESSORIES_PRINT_ACCESSORIES
353
355
#define GPIO2_PREFER_SPEED 1
356
357
#include "DIO2.h"
358
360
#define ACTION_STACK_SIZE 5
361
363
// Exclusion area
364
//
365
//NO_GROUP
366
// AccessoryGroup.cpp
367
// AccessoryGroup.hpp
368
//
369
//NO_MOTOR
370
// AccessoryMotor.cpp
371
// AccessoryMotor.hpp
372
// AccessoryMotorOneWay.cpp
373
// AccessoryMotorOneWay.hpp
374
// AccessoryMotorTwoWays.cpp
375
// AccessoryMotorTwoWays.hpp
376
// AFMotor.cpp
377
// AFMotor.hpp
378
//
379
//NO_LIGHT
380
// AccessoryBaseLight.cpp
381
// AccessoryBaseLight.hpp
382
// AccessoryLight.cpp
383
// AccessoryLight.hpp
384
// AccessoryLightMulti.cpp
385
// AccessoryLightMulti.hpp
386
//
387
//NO_MOTOR_LIGHT
388
// PortOnePin.cpp
389
// PortOnePin.hpp
390
// PortTwoPins.cpp
391
// PortTwoPins.hpp
392
// PortTwoPinsEnable.cpp
393
// PortTwoPinsEnable.hpp
394
// PortSpeedDirBrake.cpp
395
// PortSpeedDirBrake.hpp
396
//
397
//NO_SERVO
398
// AccessoryServo.cpp
399
// AccessoryServo.hpp
400
// PortServo.cpp
401
// PortServo.hpp
402
// Servo.cpp
403
// Servo.hpp
404
//
405
//NO_SHIELDL293D
406
// PortShieldL293d.cpp
407
// PortShieldL293d.hpp
408
//
409
//NO_STEPPER
410
// AccessoryStepper.cpp
411
// AccessoryStepper.hpp
412
// DriverStepper.cpp
413
// DriverStepper.hpp
414
// PortStepper.cpp
415
// PortStepper.hpp
416
//
417
418
//#define NO_GROUP
419
//#define NO_MOTOR
420
//#define NO_SERVO
421
//#define NO_STEPPER
422
//#define NO_LIGHT
423
//#define NO_SHIELDL293D
424
//#define NO_EXPANDER
425
//#define NO_EXPANDER_SX1509
426
//#define NO_EXPANDER_74HC595
427
428
#ifdef DOXYGEN_SPECIFIC
429
// DO NOT CHANGE THESE LINES IN THIS BLOCK 'DOXYGEN_SPECIFIC' : Only here for documentation !
430
433
#define NO_GROUP
434
436
#define NO_MOTOR
437
439
#define NO_SERVO
440
442
#define NO_STEPPER
443
445
#define NO_LIGHT
446
448
#define NO_SHIELDL293D
449
450
#define NO_EEPROM
451
452
#define NO_EXPANDER
453
454
#define NO_EXPANDER_SX1509
455
456
#define NO_EXPANDER_74HC595
457
458
#undef NO_GROUP
459
#undef NO_MOTOR
460
#undef NO_SERVO
461
#undef NO_STEPPER
462
#undef NO_LIGHT
463
#undef NO_SHIELDL293D
464
#undef NO_EEPROM
465
469
#define ACCESSORIES_DEBUG_MODE
470
472
#define ACCESSORIES_DEBUG_VERBOSE_MODE
473
478
#define ACCESSORIES_PRINT_ACCESSORIES
479
#endif
480
481
#ifndef VISUALSTUDIO
482
#define NO_EEPROM
483
#endif
484
485
#ifdef NO_MOTOR
486
#ifdef NO_LIGHT
487
#define NO_MOTOR_LIGHT
488
#endif
489
#ifndef NO_MOTORONEWAY
490
#define NO_MOTORONEWAY
491
#endif
492
#ifndef NO_MOTORTWOWAYS
493
#define NO_MOTORTWOWAYS
494
#endif
495
#endif
496
497
#ifdef NO_EXPANDER
498
#define NO_EXPANDER_SX1509
499
#define NO_EXPANDER_74HC595
500
#endif
501
502
// For Accessories library, L293D is not compatible with Arduino Due for the moment...
503
#ifdef ARDUINO_ARCH_SAM
504
#ifndef NO_SHIELDL293D
505
#define NO_SHIELDL293D
506
#endif
507
#endif
508
510
511
#include "Port.hpp"
512
513
#ifndef NO_MOTOR
514
#include "AccessoryMotorOneWay.hpp"
515
#include "AccessoryMotorTwoWays.hpp"
516
#endif
517
#ifndef NO_SERVO
518
#include "AccessoryServo.hpp"
519
#endif
520
#ifndef NO_STEPPER
521
#include "AccessoryStepper.hpp"
522
#endif
523
#ifndef NO_LIGHT
524
#include "AccessoryLight.hpp"
525
#include "AccessoryLightMulti.hpp"
526
#endif
527
528
#ifndef NO_GROUP
529
#include "AccessoryGroup.hpp"
530
#endif
531
532
#ifndef NO_MOTOR_LIGHT
533
#include "PortOnePin.hpp"
534
#include "PortTwoPins.hpp"
535
#include "PortTwoPinsEnable.hpp"
536
#include "PortSpeedDirBrake.hpp"
537
#endif
538
539
#ifndef NO_SHIELDL293D
540
#include "PortShieldL293d.hpp"
541
#endif
542
543
#ifndef NO_SERVO
544
#include "PortServo.hpp"
545
#endif
546
547
#ifndef NO_STEPPER
548
#include "PortStepper.hpp"
549
#endif
550
551
#ifndef NO_EXPANDER
552
#include "PortExpander.hpp"
553
#ifndef NO_EXPANDER_SX1509
554
#include "PortExpanderSX1509.hpp"
555
#endif
556
#ifndef NO_EXPANDER_74HC595
557
#include "PortExpander74HC595.hpp"
558
#endif
559
#endif
560
561
#include "Accessories.hpp"
562
#endif
src
Accessories.h
Generated on ven. mai 31 2019 21:39:31 for Accessories by
1.2.10