//Include the DigitalInput Library
#include "DI_ros.h"
int main(int argc, char **argv)
{
system("/usr/local/frc/bin/frcKillRobot.sh"); //Terminal call to kill the robot manager used for WPILib before running the executable.
ros::init(argc, argv, "digitalin_node");
/**
* Constructors
* Create the DigitalInput object
* DI ros threads (publishers and services) will run asynchronously in the background
*/
ros::NodeHandle nh; //internal reference to the ROS node that the program will use to interact with the ROS system
VMXPi vmx(true, (uint8_t)50); //realtime bool and the update rate to use for the VMXPi AHRS/IMU interface, default is 50hz within a valid range of 4-200Hz
DigitalInputROS digital_in(&nh, &vmx, channel);
digital_in.Get(); //Will return true for a high signal and false for a low signal
ros::spin(); //ros::spin() will enter a loop, pumping callbacks to obtain the latest sensor data
return 0;
}