/ros_lcd_driver

ROS1-package that publish text, via ROS-topics, on an physical I²C-Display. Like LCD2004 or LCD1602

Primary LanguageCMakeMIT LicenseMIT

README: /ros_lcd_driver/

ROS1 repository in the https://github.com/Pet-Series Git-Organizations.

What is this folder for?

ROS1-package that publish text, via ROS1-topics, on an physical I2C-Display.
This packages also contains a ROS1 test publisher.

Display any string on the LCD-Display via ROS1-topics.
* ROS1-topic `lcd_display/row1` => LCD-display row1
* ROS1-topic `lcd_display/row2` => LCD-display row2
flowchart LR
    A(topic: lcd_display/row1)-->|Subscribe| C[node: Ros_lcd_node]
    B(topic: lcd_display/row1)-->|Subscribe| C
    C -->|i2c| D[hardware: LCD1602 display]
Loading

How do I set up the Hardware?

  • Hardware: Display LCD1602A (LCD2040) LCD Display - 16x2 Character LCD Backlight.
  • Hardware: I²C interface PC8574T - Piggyback on the backisde of the display.
    • Software: Pyhton library "from rpi_lcd import LCD" that supports LCD text displays (20x4, 16x2 and other) via the I²C converter.
      $ pip install rpi-lcd
      
      Display LCD1602A with I²C interface PC8574T
  • Hardware: I²C wire between the PC8574T and the Raspberry Pi.
  • Hardware: Raspberry Pi (aka. Target System)
    • Operating system: Linux/Raspian Buster (based on Debian 10)
    • Middleware: ROS 1.0 Melodic

How do I set up the ROS1-package?

$ cd <your ROS-workspace>
$ git clone https://github.com/Pet-Series/ros_lcd_driver.git
$ catkin build ros_lcd_driver

How do I launch the ROS1-package?

  1. Launch main ROS-system (on the Target System)

    $ roscore
    
  2. Launch the the LCD-display-driver-node (on the Target System)
    There is two ways to launch the LCD-display-driver-node-subscriber (select ONE of them)

    1. Launch alternative: Via a launch file (recommended)

      $ roslaunch ros_lcd_driver ros_lcd_driver.launch
      

      Note:warning: By using the .launch file you could <remap> existing topic-names to the generic topic-names used in this implementation.

    2. Launch alternative: Direct launch the python node.

      $ rosrun ros_lcd_driver lcd_driver_node.py
      

How do I verify that everythings is OK?

These steps are only for verification and not necessary.

  1. Make sure that the node/topics is up and running.
    $ rostopic list
        /lcd_display/row1
        /lcd_display/row2
    
  2. Investigate the node/topics.
    $ rostopic info /lcd_display/row1
        Type: std_msgs/String
        Publishers: None
        Subscribers: /lcd_display
    
    $ rosmsg show std_msgs/String
        string data
    

How do I publish text on the Display?

Publish your first message on the display

  1. "Manually" via command line:
    $ rostopic pub /lcd_display/row1 std_msgs/String "data: 'Hello LCD World'"
    
  2. Via provided test publisher:
    $ rosrun ros_lcd_driver test_publisher.py
    
    row1 = current date-time. Example: 11 Mar 19:20:36
    row2 = seconds since start. Example: Run 56.00 Sec

Whats next?

Modify, the provided test publisher, or create your own publisher to suit your needs.

Who do I talk to?

⚠️Be aware⚠️ You might get some "close to hardware experiences:neckbeard:".