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 
357 #define ACCESSORIES_LIBRARY_VERSION "Accessories V1.2.2"
358 
360 // Add a '//' at the beginning of the line to be in
361 // release mode.
362 //#define ACCESSORIES_DEBUG_MODE
363 
365 // Verbose mode lets you see all actions done by the
366 // library, but with a real flood of text to console...
367 // Has no effect if ACCESSORIES_DEBUG_MODE is not activated.
368 //#define ACCESSORIES_DEBUG_VERBOSE_MODE
369 
371 // The function Accessories::printAccessories()
372 // is very heavy in program memory. So to avoid problems
373 // you can make this function available by uncomment the next line.
374 //#define ACCESSORIES_PRINT_ACCESSORIES
375 
377 #define GPIO2_PREFER_SPEED 1
378 
379 #include "DIO2.h"
380 
382 #define ACTION_STACK_SIZE 5
383 
385 // Exclusion area
386 //
387 //NO_GROUP
388 // AccessoryGroup.cpp
389 // AccessoryGroup.hpp
390 //
391 //NO_MOTOR
392 // AccessoryMotor.cpp
393 // AccessoryMotor.hpp
394 // AccessoryMotorOneWay.cpp
395 // AccessoryMotorOneWay.hpp
396 // AccessoryMotorTwoWays.cpp
397 // AccessoryMotorTwoWays.hpp
398 // AFMotor.cpp
399 // AFMotor.hpp
400 //
401 //NO_LIGHT
402 // AccessoryBaseLight.cpp
403 // AccessoryBaseLight.hpp
404 // AccessoryLight.cpp
405 // AccessoryLight.hpp
406 // AccessoryLightMulti.cpp
407 // AccessoryLightMulti.hpp
408 //
409 //NO_MOTOR_LIGHT
410 // PortOnePin.cpp
411 // PortOnePin.hpp
412 // PortTwoPins.cpp
413 // PortTwoPins.hpp
414 // PortTwoPinsEnable.cpp
415 // PortTwoPinsEnable.hpp
416 // PortSpeedDirBrake.cpp
417 // PortSpeedDirBrake.hpp
418 //
419 //NO_SERVO
420 // AccessoryServo.cpp
421 // AccessoryServo.hpp
422 // PortServo.cpp
423 // PortServo.hpp
424 // Servo.cpp
425 // Servo.hpp
426 //
427 //NO_SHIELDL293D
428 // PortShieldL293d.cpp
429 // PortShieldL293d.hpp
430 //
431 //NO_STEPPER
432 // AccessoryStepper.cpp
433 // AccessoryStepper.hpp
434 // DriverStepper.cpp
435 // DriverStepper.hpp
436 // PortStepper.cpp
437 // PortStepper.hpp
438 //
439 
440 //#define NO_GROUP
441 //#define NO_MOTOR
442 //#define NO_SERVO
443 //#define NO_STEPPER
444 //#define NO_LIGHT
445 //#define NO_SHIELDL293D
446 //#define NO_EXPANDER
447 //#define NO_EXPANDER_SX1509
448 //#define NO_EXPANDER_74HC595
449 
450 #ifdef DOXYGEN_SPECIFIC
451  // DO NOT CHANGE THESE LINES IN THIS BLOCK 'DOXYGEN_SPECIFIC' : Only here for documentation !
452 
455  #define NO_GROUP
456 
458  #define NO_MOTOR
459 
461  #define NO_SERVO
462 
464  #define NO_STEPPER
465 
467  #define NO_LIGHT
468 
470  #define NO_SHIELDL293D
471 
472  #define NO_EEPROM
473 
474  #define NO_EXPANDER
475 
476  #define NO_EXPANDER_SX1509
477 
478  #define NO_EXPANDER_74HC595
479 
480  #undef NO_GROUP
481  #undef NO_MOTOR
482  #undef NO_SERVO
483  #undef NO_STEPPER
484  #undef NO_LIGHT
485  #undef NO_SHIELDL293D
486  #undef NO_EEPROM
487 
491  #define ACCESSORIES_DEBUG_MODE
492 
494  #define ACCESSORIES_DEBUG_VERBOSE_MODE
495 
500  #define ACCESSORIES_PRINT_ACCESSORIES
501 #endif
502 
503 #ifndef VISUALSTUDIO
504 #define NO_EEPROM
505 #endif
506 
507 #ifdef NO_MOTOR
508  #ifdef NO_LIGHT
509  #define NO_MOTOR_LIGHT
510  #endif
511  #ifndef NO_MOTORONEWAY
512  #define NO_MOTORONEWAY
513  #endif
514  #ifndef NO_MOTORTWOWAYS
515  #define NO_MOTORTWOWAYS
516  #endif
517 #endif
518 
519 #ifdef NO_EXPANDER
520 #define NO_EXPANDER_SX1509
521 #define NO_EXPANDER_74HC595
522 #endif
523 
524 // For Accessories library, L293D is not compatible with Arduino Due for the moment...
525 #ifdef ARDUINO_ARCH_SAM
526 #ifndef NO_SHIELDL293D
527  #define NO_SHIELDL293D
528 #endif
529 #endif
530 
532 
533 #include "Port.hpp"
534 
535 #ifndef NO_MOTOR
536 #include "AccessoryMotorOneWay.hpp"
537 #include "AccessoryMotorTwoWays.hpp"
538 #endif
539 #ifndef NO_SERVO
540 #include "AccessoryServo.hpp"
541 #endif
542 #ifndef NO_STEPPER
543 #include "AccessoryStepper.hpp"
544 #endif
545 #ifndef NO_LIGHT
546 #include "AccessoryLight.hpp"
547 #include "AccessoryLightMulti.hpp"
548 #endif
549 
550 #ifndef NO_GROUP
551 #include "AccessoryGroup.hpp"
552 #endif
553 
554 #ifndef NO_MOTOR_LIGHT
555 #include "PortOnePin.hpp"
556 #include "PortTwoPins.hpp"
557 #include "PortTwoPinsEnable.hpp"
558 #include "PortSpeedDirBrake.hpp"
559 #endif
560 
561 #ifndef NO_SHIELDL293D
562 #include "PortShieldL293d.hpp"
563 #endif
564 
565 #ifndef NO_SERVO
566 #include "PortServo.hpp"
567 #endif
568 
569 #ifndef NO_STEPPER
570 #include "PortStepper.hpp"
571 #endif
572 
573 #ifndef NO_EXPANDER
574  #include "PortExpander.hpp"
575  #ifndef NO_EXPANDER_SX1509
576  #include "PortExpanderSX1509.hpp"
577  #endif
578  #ifndef NO_EXPANDER_74HC595
579  #include "PortExpander74HC595.hpp"
580  #endif
581 #endif
582 
583 #include "Accessories.hpp"
584 #endif