Skip to content
Giovanni Bruno edited this page Apr 29, 2019 · 12 revisions

1. Node specifications

Modes

This node supports two modes:

  • Digital Output, true/false output
  • Digital Input, true/false input

Topics

Parameters

  • frequency (float, default: 100), set in Hz reading updates
  • frame_id (String, default: "base_link"), set frame_id

2. Setup

You can configure pins by copying and editing following lines in a .yaml file.

upboard_ros:
  DigitalOut: [<pin>,<pin>,...]
  DigitalIn: [<pin>,<pin>,...]

<pin> is a number from 1 to 40 according with your board pinout.
You can find an example file used for tests in config folder.

3. Run

You can run this node by typing:
rosrun upboard_ros gpio_node

4. Tests

Check digital outputs

To turn on pin 22:
rostopic pub /upboard/gpio/write upboard_ros/ListGpio "{header: auto, gpio:[{pin: 22, value: 1}]}" --once
To turn off pin 22:
rostopic pub /upboard/gpio/write upboard_ros/ListGpio "{header: auto, gpio:[{pin: 22, value: 0}]}" --once

Check digital inputs

rostopic echo /upboard_ros/gpio/read

5. Note

Used GPIO are set to 0 when gpio_node is killed.
Max voltage for digital input is 3.3 volts.

Clone this wiki locally