13 #include <std_msgs/Empty.h> 15 #if defined(TARGET_LPC1768) 17 #elif defined(TARGET_KL25Z) || defined(TARGET_NUCLEO_F401RE) 20 #error "You need to specify a pin for the mic" 51 for (
int i=0;
i<4;
i++) mic_val +=
mic_pin.read_u16();
59 event_timer =
t.read_ms();
63 if ( (abs(mic_val) < 30) && ( (
t.read_ms()- event_timer) > 20 ) ) {
65 event_timer =
t.read_ms();
74 }
else if ( (
t.read_ms()-event_timer)> 60) {
76 event_timer =
t.read_ms();
84 }
else if ( (
t.read_ms()-event_timer)> 200) {
void publish(const boost::shared_ptr< M > &message) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ros::Publisher p("clap",&clap_msg)