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 
326 #define LIBRARY_VERSION "Accessories V1.1.4"
327 
329 // Add a '//' at the beginning of the line to be in
330 // release mode.
331 //#define ACCESSORIES_DEBUG_MODE
332 
334 // Verbose mode lets you see all actions done by the
335 // library, but with a real flood of text to console...
336 // Has no effect if ACCESSORIES_DEBUG_MODE is not activated.
337 //#define ACCESSORIES_DEBUG_VERBOSE_MODE
338 
340 // The function Accessories::printAccessories()
341 // is very heavy in program memory. So to avoid problems
342 // you can make this function available by uncomment the next line.
343 //#define ACCESSORIES_PRINT_ACCESSORIES
344 
346 #define GPIO2_PREFER_SPEED 1
347 
348 #include "DIO2.h"
349 
351 #define ACTION_STACK_SIZE 5
352 
354 // Exclusion area
355 //
356 //NO_GROUP
357 // AccessoryGroup.cpp
358 // AccessoryGroup.hpp
359 //
360 //NO_MOTOR
361 // AccessoryMotor.cpp
362 // AccessoryMotor.hpp
363 // AccessoryMotorOneWay.cpp
364 // AccessoryMotorOneWay.hpp
365 // AccessoryMotorTwoWays.cpp
366 // AccessoryMotorTwoWays.hpp
367 // AFMotor.cpp
368 // AFMotor.hpp
369 //
370 //NO_LIGHT
371 // AccessoryBaseLight.cpp
372 // AccessoryBaseLight.hpp
373 // AccessoryLight.cpp
374 // AccessoryLight.hpp
375 // AccessoryLightMulti.cpp
376 // AccessoryLightMulti.hpp
377 //
378 //NO_MOTOR_LIGHT
379 // PortOnePin.cpp
380 // PortOnePin.hpp
381 // PortTwoPins.cpp
382 // PortTwoPins.hpp
383 // PortTwoPinsEnable.cpp
384 // PortTwoPinsEnable.hpp
385 // PortSpeedDirBrake.cpp
386 // PortSpeedDirBrake.hpp
387 //
388 //NO_SERVO
389 // AccessoryServo.cpp
390 // AccessoryServo.hpp
391 // PortServo.cpp
392 // PortServo.hpp
393 // Servo.cpp
394 // Servo.hpp
395 //
396 //NO_SHIELDL293D
397 // PortShieldL293d.cpp
398 // PortShieldL293d.hpp
399 //
400 //NO_STEPPER
401 // AccessoryStepper.cpp
402 // AccessoryStepper.hpp
403 // DriverStepper.cpp
404 // DriverStepper.hpp
405 // PortStepper.cpp
406 // PortStepper.hpp
407 //
408 
409 //#define NO_GROUP
410 //#define NO_MOTOR
411 //#define NO_SERVO
412 //#define NO_STEPPER
413 //#define NO_LIGHT
414 //#define NO_SHIELDL293D
415 
416 #ifdef DOXYGEN_SPECIFIC
417  // DO NOT CHANGE THESE LINES IN THIS BLOCK 'DOXYGEN_SPECIFIC' : Only here for documentation !
418 
421  #define NO_GROUP
422 
424  #define NO_MOTOR
425 
427  #define NO_SERVO
428 
430  #define NO_STEPPER
431 
433  #define NO_LIGHT
434 
436  #define NO_SHIELDL293D
437 
438  #define NO_EEPROM
439 
440  #undef NO_GROUP
441  #undef NO_MOTOR
442  #undef NO_SERVO
443  #undef NO_STEPPER
444  #undef NO_LIGHT
445  #undef NO_SHIELDL293D
446  #undef NO_EEPROM
447 
451  #define ACCESSORIES_DEBUG_MODE
452 
454  #define ACCESSORIES_DEBUG_VERBOSE_MODE
455 
460  #define ACCESSORIES_PRINT_ACCESSORIES
461 #endif
462 
463 #ifndef VISUALSTUDIO
464 #define NO_EEPROM
465 #endif
466 
467 #ifdef NO_MOTOR
468  #ifdef NO_LIGHT
469  #define NO_MOTOR_LIGHT
470  #endif
471  #ifndef NO_MOTORONEWAY
472  #define NO_MOTORONEWAY
473  #endif
474  #ifndef NO_MOTORTWOWAYS
475  #define NO_MOTORTWOWAYS
476  #endif
477 #endif
478 
479 // For Accessories library, L293D is not compatible with Arduino Due for the moment...
480 #ifdef ARDUINO_ARCH_SAM
481 #ifndef NO_SHIELDL293D
482  #define NO_SHIELDL293D
483 #endif
484 #endif
485 
487 
488 #include "Port.hpp"
489 
490 #ifndef NO_MOTOR
491 #include "AccessoryMotorOneWay.hpp"
492 #include "AccessoryMotorTwoWays.hpp"
493 #endif
494 #ifndef NO_SERVO
495 #include "AccessoryServo.hpp"
496 #endif
497 #ifndef NO_STEPPER
498 #include "AccessoryStepper.hpp"
499 #endif
500 #ifndef NO_LIGHT
501 #include "AccessoryLight.hpp"
502 #include "AccessoryLightMulti.hpp"
503 #endif
504 
505 #ifndef NO_GROUP
506 #include "AccessoryGroup.hpp"
507 #endif
508 
509 #ifndef NO_MOTOR_LIGHT
510 #include "PortOnePin.hpp"
511 #include "PortTwoPins.hpp"
512 #include "PortTwoPinsEnable.hpp"
513 #include "PortSpeedDirBrake.hpp"
514 #endif
515 
516 #ifndef NO_SHIELDL293D
517 #include "PortShieldL293d.hpp"
518 #endif
519 
520 #ifndef NO_SERVO
521 #include "PortServo.hpp"
522 #endif
523 
524 #ifndef NO_STEPPER
525 #include "PortStepper.hpp"
526 #endif
527 
528 #include "Accessories.hpp"
529 #endif