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

◆ button_pin()

DigitalIn button_pin ( button  )

◆ led_pin()

DigitalOut led_pin ( LED1  )

◆ main()

int main ( )

Definition at line 33 of file button_example.cpp.

Variable Documentation

◆ debounce_delay

long debounce_delay =50

Definition at line 29 of file button_example.cpp.

◆ last_debounce_time

long last_debounce_time =0

Definition at line 28 of file button_example.cpp.

◆ last_reading

bool last_reading

Definition at line 27 of file button_example.cpp.

◆ nh

Definition at line 19 of file button_example.cpp.

◆ pub_button

ros::Publisher pub_button("pushed", &pushed_msg)

◆ published

bool published = true

Definition at line 30 of file button_example.cpp.

◆ pushed_msg

std_msgs::Bool pushed_msg

Definition at line 21 of file button_example.cpp.

◆ t

Timer t

Definition at line 32 of file button_example.cpp.



rosserial_mbed
Author(s): Gary Servin
autogenerated on Wed Mar 2 2022 00:58:08