Functions | Variables
button_example.cpp File Reference
#include "mbed.h"
#include <ros.h>
#include <std_msgs/Bool.h>
Include dependency graph for button_example.cpp:

Go to the source code of this file.

Functions

DigitalIn button_pin (button)
 
DigitalOut led_pin (LED1)
 
int main ()
 

Variables

long debounce_delay =50
 
long last_debounce_time =0
 
bool last_reading
 
ros::NodeHandle nh
 
ros::Publisher pub_button ("pushed",&pushed_msg)
 
bool published = true
 
std_msgs::Bool pushed_msg
 
Timer t
 

Function Documentation

DigitalIn button_pin ( button  )
DigitalOut led_pin ( LED1  )
int main ( void  )

Definition at line 33 of file button_example.cpp.

Variable Documentation

long debounce_delay =50

Definition at line 29 of file button_example.cpp.

long last_debounce_time =0

Definition at line 28 of file button_example.cpp.

bool last_reading

Definition at line 27 of file button_example.cpp.

Definition at line 19 of file button_example.cpp.

ros::Publisher pub_button("pushed",&pushed_msg)
bool published = true

Definition at line 30 of file button_example.cpp.

std_msgs::Bool pushed_msg

Definition at line 21 of file button_example.cpp.

Timer t

Definition at line 32 of file button_example.cpp.



rosserial_mbed
Author(s): Gary Servin
autogenerated on Mon Jun 10 2019 14:53:26