Giter VIP home page Giter VIP logo

mcp2210's People

Contributors

arachnid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mcp2210's Issues

More things needed?

I cannot get this to work in Linux.

pid and vid are defined before

dev = MCP2210(my_vid, my_pid)

I just get "IOError: open failed". It sounds like it cannot open the device.

Do I need to install something else?

Python 34 support

The library does not work with python 3, probably because the buffer() function has been replaced with memoryview().

dependancies

Hi, I was just looking at using this, but notice that you are using a python 'hid' module.

Which hid module is this ??

Requirements

Is it possible to know which libraries/packages are necessary to run the mcp2210 package with Linux/Windows?

I ran in problems with win7/64bit regarding the hid library (installed afterwards with 'pip install hidapi') and then with
from mcp2210 import commands
ImportError: cannot import name commands

TypeError !when i driver MCP2210 in Python window7

hi,@Arachnid
when i driver MCP2210 in Python3.5.2 window7,i encounter a problem:

>>> from mcp2210 import MCP2210
>>> dev = MCP2210(0x04D8,0x00DE)
>>> dev.manufacturer_name = "123"
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    dev.manufacturer_name = "123"
  File "D:\Python35-32\lib\site-packages\mcp2210-0.1.4-py3.5.egg\mcp2210\device.py", line 77, in setter
    self.sendCommand(set_command(value))
  File "D:\Python35-32\lib\site-packages\mcp2210-0.1.4-py3.5.egg\mcp2210\commands.py", line 91, in __init__
    self.string = s
  File "D:\Python35-32\lib\site-packages\mcp2210-0.1.4-py3.5.egg\mcp2210\commands.py", line 100, in string
    self.str[i] = ord(x)
TypeError: ord() expected string of length 1, but int found
>>> 

PS: i have modifyed the code according to @bddap in the "Pull Requests"
please give me a hand.

sample code

Hi;
My apologies, through a lot of trial and error I have managed to solve my initial problems with I/O control.

If I have multiple devices on the network, and have the gpio.pin set as a cs pin, how do I select the pin prior to a data transfer to that the correct device is selected ?

Do I have to do this by defining the pin as an i/o pin and then pull it high/low before and after a data transfer or is there a method that uses the cs pin instead ?

Also, is it possible to do data transfer using hex values i.e: dev.transfer(0x8d,0x14,0xaf)

NameError: name 'buffer' is not defined

Got the following issue when working with Python 3.7 on Windows 10.
Traceback (most recent call last):
File "C:/Users/avijit.das/PycharmProjects/SampleTest/sample1.py", line 6, in
dev = MCP2210(vid, pid)
File "C:\Users\avijit.das\PycharmProjects\sample\venv\lib\site-packages\mcp2210\device.py", line 123, in init
self.cancel_transfer()
File "C:\Users\avijit.das\PycharmProjects\sample\venv\lib\site-packages\mcp2210\device.py", line 224, in cancel_transfer
self.sendCommand(commands.CancelTransferCommand())
File "C:\Users\avijit.das\PycharmProjects\sample\venv\lib\site-packages\mcp2210\device.py", line 134, in sendCommand
command_data = [ord(x) for x in buffer(command)]
NameError: name 'buffer' is not defined

Process finished with exit code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.