Attaching a pi-topPULSE to a pi-top [4] (as described in SDK Docs "Getting Started")

After every update I quickly run through items on your web site to see if there is anything new that I might like to try. I was looking at Getting Started; 2. Overview; 2.1.2 Physical computing with pi-top [4].

  • pi-top [4] supports the following API devices/components for physical computing:
    • pi-topPULSE
    • pi-top Maker Architecture (PMA) Components
  • The pi-topPULSE can be used as a Raspberry Pi HAT with a pi-top [4] .”

I have a pi-topPulse and I can’t figure out how to connect it to the pi-top[4] as a hat. The male pins are closer together and won’t fit in the receptacle on top of the pi-top[4]. Is there a special adapter / cable that is needed?

@Korbendallaz the male to male pins provided with the pi-top [4] should be able to connector from the female socket on the [4] to pi-topPULSE just like with any HAT (it’s all the same 2.54mm pitch) - can you take a photo of the problem you are having?

If you find out what the issue is here, please be sure to submit a pull request to the SDK with more information in the docs, for others who might have a similar problem! :slight_smile:

OK, belay my last, I didn’t realize there is a connection point on the bottom of the Pulse, when you first look at the unit you see the pins protruding from the side that plug in when it is installed on the modular rail. I connected the male-to-male accessory pins to the bottom of the Pulse and carefully plugged it into the top of the pi-top[4]. I couldn’t locate any pictures of the Pulse plugged in to a pi-top[4] for the correct orientation - hopefully I guessed right. pi-top%5B4%5D%20pulse .
Powered up and I receive a solid red LED. None of the 7x7 LED’s are lit
I copied and pasted all of the python examples (7.2.2, 7.2.3, 7.2.4 & 7.2.5) to the pi-top[4] and all failed with the same errors:
'[09:34:19.270279 E] Error: pi-topPULSE not initialised by pt-device-manager
Traceback (most recent call last):

  • File “/home/pi/mu_code/cpu_usage-7.2.5.py”, line 51, in
    ledmatrix.show()
    File “/usr/lib/python3/dist-packages/pitop/pulse/ledmatrix.py”, line 446, in show
    __sync_with_device()
    File “/usr/lib/python3/dist-packages/pitop/pulse/ledmatrix.py”, line 239, in __sync_with_device
    __write(_sync)
    File “/usr/lib/python3/dist-packages/pitop/pulse/ledmatrix.py”, line 172, in __write
    _serial_device.write(data)
    *NameError: name ‘_serial_device’ is not defined’

Can you update and try again?

Performed this on both of my Pi-Top[4]'s - Initiated System Update - no updates available. Copied the example of 7.2.3. Using the pi-topPULSE’s LED matrix: Fancy Light Show! and ran it: the following is what I received on both units;

[12:29:05.219765 E] Error: pi-topPULSE not initialised by pt-device-manager
Traceback (most recent call last):
File “/home/pi/mu_code/python_programs/Misc. Programs/pulse_showing_fancy_light_show.py”, line 162, in
ledmatrix.show()
File “/usr/lib/python3/dist-packages/pitop/pulse/ledmatrix.py”, line 493, in show
__sync_with_device()
File “/usr/lib/python3/dist-packages/pitop/pulse/ledmatrix.py”, line 266, in __sync_with_device
__write(_sync)
File “/usr/lib/python3/dist-packages/pitop/pulse/ledmatrix.py”, line 184, in __write
_serial_device.write(data)
NameError: name ‘_serial_device’ is not defined

@Korbendallaz we’ve just released an update that should fix this, can you run an update and see if it works now? Apologies for the delay!

I feel like the Grinch on Christmas…
Sorry I have to report this, but it still doesn’t work. The results are different but…

Installed the pi-topPULSE onto my Pi-Top[4]-4GB unit, powered up the unit, the red LED underside of the Pulse was came on. Checked for Updates; updated received message “Reboot required, Recently detected hardware requires a system settings modification… Please reboot to enable hardware support.” First time I have ever seen this message. Rebooted.

Pi-Top[4] booted up; the red LED on the underside of the Pulse is not on. Started Mu, copied 7.2.2. Using the pi-topPULSE’s LED matrix: Test colors to Mu. No errors, but the Pulse is not displaying any colors. received in the terminal portion of Mu:

0 0 255
0 255 0
0 255 255
255 0 0
255 0 255
255 255 0
255 255 255

Copied 7.2.3. Using the pi-topPULSE’s LED matrix: Fancy Light Show! to Mu, ran the code:
No Errors but again Pulse is not showing anything.
Copied 7.2.4. Using the pi-topPULSE’s LED matrix: Showing CPU temperature to Mu, ran the code: No Errors but again Pulse is not showing anything.
Copied 7.2.5. Using the pi-topPULSE’s LED matrix: Showing CPU usage to Mu, ran the code:
No Errors but again Pulse is not showing anything.
Copied 4.7. Using the pi-topPULSE’s LED matrix to show the battery level to Mu, ran the code:
Received errors:
Error getting battery info: unsupported operand type(s) for /: ‘str’ and ‘int’
Error getting battery info: unsupported operand type(s) for /: ‘str’ and ‘int’
Error getting battery info: unsupported operand type(s) for /: ‘str’ and ‘int’
Error getting battery info: unsupported operand type(s) for /: ‘str’ and ‘int’
Error getting battery info: unsupported operand type(s) for /: ‘str’ and ‘int’
Error getting battery info: unsupported operand type(s) for /: ‘str’ and ‘int’
Error getting battery info: unsupported operand type(s) for /: ‘str’ and ‘int’
pressed CTRL+C to stop and then received the following errors:
Quitting…
Traceback (most recent call last):

  • File “/home/pi/mu_code/pulse_led_matrix-show_the_battery_level.py”, line 87, in *
  • main()*
  • File “/home/pi/mu_code/pulse_led_matrix-show_the_battery_level.py”, line 79, in main*
  • charging_state, capacity, _, _ = battery.get_full_state()*
  • File “/usr/lib/python3/dist-packages/pitop/battery/battery.py”, line 75, in get_full_state*
  • response = request_client.send_message(message)*
  • File “/usr/lib/python3/dist-packages/pitopcommon/ptdm.py”, line 375, in send_message*
  • response_string = self.__zmq_socket.recv_string()*
  • File “/usr/lib/python3/dist-packages/zmq/sugar/socket.py”, line 584, in recv_string*
  • msg = self.recv(flags=flags)*
  • File “zmq/backend/cython/socket.pyx”, line 788, in zmq.backend.cython.socket.Socket.recv*
  • File “zmq/backend/cython/socket.pyx”, line 824, in zmq.backend.cython.socket.Socket.recv*
  • File “zmq/backend/cython/socket.pyx”, line 186, in zmq.backend.cython.socket._recv_copy*
  • File “zmq/backend/cython/checkrc.pxd”, line 12, in zmq.backend.cython.checkrc._check_rc*
  • File “/usr/lib/python3/dist-packages/pitop/pulse/ledmatrix.py”, line 153, in __signal_handler*
  • exit(0)*
    SystemExit: 0
    *>>> [14:39:38.422492 I] *
    Quitting…
    Performed the same procedures on my Pi-Top[4]-8GB and received the same results.
    Powered up my Pi-Top[3] with the Pulse unit attached and updated the system. Rebooted and the Red LED tuned off when the system finished booting up, experienced same results.

Today I checked the software in 7.2 for the using the PULSE on the Pi-Top[4] copied all the examples 72.1 thru 7.2.5.

  • 7.2.1 Using the Microphone - worked well
  • 7.2.2 thru 7.2.5 Using PULSE’s LED matrix - No Errors but Nothing is Displayed on the Pulse.

I had never used the Microphone on the Pulse on either the Pi-Top[3] or Pi-top[4] before until today.

I find it curious that when powering up the Pi-Top[4] with PULSE installed the power light on the PULSE is illuminated until the Pi-Top[4] is fully up, at that time the power light appear not to be illuminated. The microphone test worked without the PULSE’s power light be illuminated.