Skip to content

attributeError: 'module' object has no attribute 'USBISS' #7

@Zanati123

Description

@Zanati123
  • pyusbiss version: 0.1.2
  • Python version: 3.4.2
  • Operating System: Raspbian

### Description

Hey Dancing Quanta,
Following your patch to pyusbiss, establishing communication to a alphasense OPC is greeted by an error: attributeError: 'module' object has no attribute 'USBISS'.

This is using dhhagan's sample script from py-opc to connect the sensor to Rpi via USB interface, line 5: s_pi = usbiss.USBISS("/dev/ttyACM0", "spi", spi_mode=1, freq=500000)_

Looking into the script of usbiss.py, i am unsure how to adjust to make the class USBISS work. Would you have any advice?

Thank you,
Zanati123

### What I Did

  • Factory reset Raspian and updated all
  • Downloaded and installed py-opc & pyusbiss
  • Using python 3.4.2, copied dhhagan's sample script to connect sensor via USB interface.
  • Error in spi = usbiss.USBISS("/dev/ttyACM0", "spi", spi_mode=1, freq=500000), error message attributeError: 'module' object has no attribute 'USBISS'

```import usbiss
import opc

# Build the connector
spi = usbiss.USBISS("/dev/ttyACM0", "spi", spi_mode=1, freq=500000)

alpha = opc.OPCN2(spi)

# Turn on the device
alpha.on()

# Read the histogram
alpha.histogram()

# Turn the device off
alpha.off()

-------------------------------------------------
>>>Traceback (most recent call last):
  File "/home/pi/test1.py", line 5, in <module>
    spi = usbiss.USBISS("/dev/ttyACM0", "spi", spi_mode=1, freq=500000)
AttributeError: 'module' object has no attribute 'USBISS'










Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions