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

On your UP there is a 2x40 header like Raspberry Pi one. That pins are managed by this node.
Please refer UP website to learn more about your board.

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

Sample launch

Reproduce following connections:
gpio schematic
Then in terminal type:
roslaunch upboard_ros gpio_test.launch

Press button to change blink period.
https://www.youtube.com/watch?v=aepSXab6H2M

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