Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

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!

Geschrieben

Hello,

Which sensors do you want to use, there is really well made example code in the doc for python ? No idea how you can get the UID without brick viewer

bearbeitet von Komet

Geschrieben
  • Autor

@Komet I will add 2 Distance IR sensor (10-80cm and 4-30cm) and a display to start

@rtrbt Thanks for your answer, I will try that!

bearbeitet von learn2learn

Geschrieben

You can use BrickViewer on your local PC and connect to Raspberry/HAT when it is in the same network.
In BrickViewer type the ip address of the raspberry and then Connect.

Geschrieben
  • Autor

@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 😄

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...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.