Jump to content

How to get the HAT Brick UID without brick viewer


learn2learn

Recommended Posts

Hello everyone,

I have a Raspberry Pi Model 4B on a Turtlebot3 Burger and I want to add a HAT brick on it. The idea is to have a modular robot on which I can easily change the sensors and so I chose to add a HAT brick with its 8 connectors. I bought the HAT Brick and installed it on my raspberry but I got some troubles with the sofware part.

The problem is that I have a Ubuntu server 20.04 OS (with ROS) on my raspberry so I can't use the Brick Viewer because there is no display available. So I'm looking for an other way (without display, only terminal) to get this information. With this, I should be able to get sensors data with Python (If you have a Python example on how to get the sensor data I will also take it)

Ps: brickd and brickv are installed

Thank you for your help!

Link zu diesem Kommentar
Share on other sites

@Backdraft007 Thank you for your answer!

I tried that but when I launch brick viewer on my computer I got the following error message:

The following error is fatal. Exiting now.

Traceback (most recent call last):
  File "/usr/share/brickv/main.py", line 377, in main
    from brickv.mainwindow import MainWindow
  File "/usr/share/brickv/mainwindow.py", line 42, in <module>
    from brickv.plugin_system.plugin_manager import PluginManager
  File "/usr/share/brickv/plugin_system/plugin_manager.py", line 29, in <module>
    from brickv.plugin_system.plugins import device_classes
  File "/usr/share/brickv/plugin_system/plugins/__init__.py", line 109, in <module>
    from brickv.plugin_system.plugins.red import device_class as red
  File "/usr/share/brickv/plugin_system/plugins/red/__init__.py", line 24, in <module>
    from brickv.plugin_system.plugins.red.red import RED
  File "/usr/share/brickv/plugin_system/plugins/red/red.py", line 36, in <module>
    from brickv.plugin_system.plugins.red.ui_red import Ui_RED
  File "/usr/share/brickv/plugin_system/plugins/red/ui_red.py", line 74, in <module>
    from brickv.plugin_system.plugins.red.red_tab_console import REDTabConsole
  File "/usr/share/brickv/plugin_system/plugins/red/red_tab_console.py", line 33, in <module>
    from brickv.samba import get_serial_ports
  File "/usr/share/brickv/samba.py", line 30, in <module>
    import serial.tools.list_ports
ModuleNotFoundError: No module named 'serial.tools'

However I checked and the serial and pyserial librairies are installed on my python3

PS: the method gave by @rtrbt works perfectly I can know receive data from my sensors 😄

Link zu diesem Kommentar
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...