Hello all, as noted in the title, I’m a newbee at both software and the Arduino. I have a little experience in simple software development as it applies to the Arduino, and none in libraries development - reading things like .h and .cpp files is almost impossible since I don’t have any experience with this level of programming.
I am designing a programmable RC servo sequencer that controls 6 servo’s via VarSpeedServo.h, a motor via an L298 Bridge, a couple of optical sensor inputs and three switch inputs for positional information. I use one of the external interrupts to monitor the position of the RC transmitter switch to control the state of the sequencer. In general, this piece of the code is working fine.
The sequencer is also fully programmable with several options, speeds at which servos traverse, end-point adjustment for the servos and whether the servo direction is normal or reversed.
setup() controls the programming function and the loop() manages the sequencer. Programming is initiated by plugging in a programming board to the sequencer unit and pressing a button at powerup to enter the programming mode. The programming board has 4 switches (Prog/Sel, Inc, dec, and toggle), one buzzer and two LED’s. Once programming is complete, the programming board is removed and some of the pins that were assigned to the programming mode are reassigned for the sequencer.
I’m also using a serial 7 Segment display from SparkFun as a programming mode display device and want to use SoftwareSerial.h to do that - at least this is what I believe.
I am currently using EnableInterrupt.h for the four switches and I believe I need SoftwareSerial for the display during programming.
That’s the general overview. Note that seqee.h IS a library but it is simply the fixed data related to EEPROM locations and arrays used during programming. It has one ifndef, define and endif statement only - very simple.
The issue I am having is the conflict between these two libraries. I have researched over the web and believe I understand the cause of the compiler error I’m getting, that of the “land grab” for interrupts. What I have NOT been able to find is a solution to this. Remember, I am a newbee so much of the dialog I have read simply goes over my head.
The board I’m using is an UNO and I will port to a nano for implementation. Just about every I/O pin is in use in this application and I’m also using the Analog pins as digital inputs for switches and sensors. The only pins I’m currently not using are the Una Rx/Tx and A6/A7.
As most of you know, the compiler punches out __vector3, 4 and 5 errors when I include the SoftwareSerial library. I haven’t assigned anything yet using SoftwareSerial. The snippit of code shows the basic assignments.
Someone in the forum did mention HardwareSerial but I cannot locate information on how to use this library and since reading the .h and .cpp files is not something I have learned yet, they are of little use to me on usage.
Are there other libraries or methods I can use to get the simple serial reset and write capabilities to the Serial7Segment SparkFun display?
#include <SoftwareSerial.h> #include <EnableInterrupt.h> #include <seqee.h> #include <elapsedMillis.h> #include <VarSpeedServo.h> #include <avr/eeprom.h> #include <EEPROM.h> #define TXSWPin 2 #define PROGSELPin 4 #define INCPin A1 #define DECPin A2 #define TOGPin A3 VarSpeedServo servo1; VarSpeedServo servo2; VarSpeedServo servo3; VarSpeedServo servo4; VarSpeedServo servo5; VarSpeedServo servo6; elapsedMillis timeElapsed;