Giter VIP home page Giter VIP logo

abelectronics_python3_libraries's People

Contributors

aaron-hartwig avatar abelectronicsuk avatar victe avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

abelectronics_python3_libraries's Issues

PyPI package

Hello,

Any plans to publish this as PyPI package? Or at least package it up for that so it can be installed using pip from github directly:

$ pip install git+https://github.com/abelectronicsuk/ABElectronics_Python3_Libraries.git
Collecting git+https://github.com/abelectronicsuk/ABElectronics_Python3_Libraries.git
  Cloning https://github.com/abelectronicsuk/ABElectronics_Python3_Libraries.git to /tmp/pip-4x8t8c8f-build
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/tadas/.virtualenvs/spaceship/lib/python3.4/tokenize.py", line 438, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-4x8t8c8f-build/setup.py'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-4x8t8c8f-build/

Many Thanks,
Tadas

ImportError: No module named 'ABE_ExpanderPi'

Hi, I'm having trouble getting my Expander Pi board running. I'm trying to test the ADC but the code cannot find the necessary module.

This is the full error, from Python 3.4.2 Shell on Raspberry Pi Raspbian Jessie -:

Traceback (most recent call last):
  File "/home/pi/Desktop/adctest.py", line 3, in <module>
    from ABE_ExpanderPi import ADC
ImportError: No module named 'ABE_ExpanderPi'
>>> 

I've followed the instructions on https://github.com/abelectronicsuk/ABElectronics_Python3_Libraries/tree/master/ExpanderPi and https://www.abelectronics.co.uk/kb/article/1/i2c--smbus-and-raspbian-wheezy

Running the command:

export

The output includes the line:

declare -x PYTHONPATH=":/home/pi/ABElectronics_Python3_Libraries/ExpanderPi/"

So the Python Path should be known.

Thanks for any help, cheers.

Help python 3 users

The difference in ABE_helpers.py between python3 and python is:

python3: raise ImportError("python-smbus not found'")
python2: raise ImportError("python-smbus not found. Install with 'sudo apt-get install python-smbus'")

suggest adding text: Install with 'sudo apt-get install python3-smbus'

ADC Read Speed and SPI Clock

Based upon the product webpage the maximum stated ADC clock speed under python is 12,000 samples per second. Even when changing the value of the spi clock in the ABE_ADCDACPi.py the speed seems to be fairly static at around 200 us. I'm using raspberry pi w with Jessie. Can anyone describe how to enable similar speeds for the ADC module?

Original:
spiADC.max_speed_hz = (900000)
Changed to:
spiADC.max_speed_hz = (25000000)

Code used for the test:

from ABE_ADCDACPi import ADCDACPi
import time
import numpy as N
import datetime
adcdac = ADCDACPi() # create an instance of ADCDACPi

adcdac.set_adc_refvoltage(3.3)

numPnts = 1000
a = N.zeros(numPnts)
counter = 1
starttime = datetime.datetime.now()
print(starttime)
while (counter < numPnts):
# read the voltage from channel 1
a[counter] = adcdac.read_adc_raw(1,0)
counter+=1
endtime = datetime.datetime.now()

print(endtime - starttime)
print(endtime)

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.