Giter Site home page Giter Site logo

craigsacco / raspberry_pi_projects Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 6.86 MB

Random set of projects and drivers that interact with Raspberry Pi hardware using Python

Python 85.36% HTML 14.47% Shell 0.17%
bus digital gpio gps i2c lcd python raspberry-pi spi uart

raspberry_pi_projects's People

Contributors

craigsacco avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

woodymax

raspberry_pi_projects's Issues

MAX127 driver test failure

Hi @craigsacco

I tried to test your MAX127 driver from my Raspberry connected with I2C protocol to my max127 DAS.

But it seems that there are some mistakes in the MAX127 class code, precisely in the function "get_data" :

def get_data(self):
value = 0
if self._bipolar:
value = (self._device.readRawS16BE() >> 4)
else:
value = (self._device.readRawU16BE() >> 4)
voltage = (value * MAX127.ADC_REFERENCE) /
(MAX127.ADC_MAX_VALUE >> (1 if self._bipolar else 0))
if self._range:
voltage = (voltage * 2.0)
return { "value": value, "voltage": voltage,
"channel": self._channel, "range": self._range,
"bipolar": self._bipolar }

Indeed, "readRawS16BE" and "readRawU16BE" functions imported from I2C.py ("Adafruit_GPIO" folder) don't exist. I believe you thought about using "readS16BE" and "readU16BE" functions still from I2C.py ?

Other question : were the max127 drivers tests successfull ? I didn't succeeded in getting value from a potentiometer (used to mesure a rotor position) with my MAX127 (voltage return by the function "get_data" of the MAX127 driver is always 5.0 volts even when I change the position of the rotor).

Last question : I think I'm wrong when precising "channel" value : I use int numbers (0 or 1) to cennect to channels 0 and 1 of the max127, is this correct ?

Thank you for your answers.

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.