deskoplaptop / webiopi

Automatically exported from code.google.com/p/webiopi
0 stars 0 forks source link

Missing function on GPIOPort expander driver #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Can I have some code examples to use the DS2408 please ?

I've try with:

from webiopi.utils import *
from webiopi.devices.onewire import *
from webiopi.devices.digital import GPIOPort
from webiopi.devices.digital import DS2408

# Setup a DS2408 with 1-Wire slave auto-detect
sw0 = DS2408()

sw0.setFunction(0, GPIO.OUT)
sw0.setFunction(1, GPIO.OUT)
sw0.setFunction(2, GPIO.OUT)
sw0.setFunction(3, GPIO.OUT)
sw0.setFunction(4, GPIO.OUT)
sw0.setFunction(7, GPIO.OUT)

sw0.digitalWrite(0, GPIO.HIGH)
time.sleep(5) #wait 5 seconds
sw0.digitalWrite(0, GPIO.LOW)

But not work is correct the code ?

WebIOPi version used?
=>0.6.0

Python version used?
=>Python 2.7.3

Distro used? (WebIOPi has only been tested on Raspbian Wheezy)
=>Raspbian Wheezy

Raspberry Pi board revision? (1 or 2)
=>

For Javascript side bugs, Browser?
=>

Please provide any additional information below.

Original issue reported on code.google.com by max.bene...@gmail.com on 2 Dec 2013 at 2:50

GoogleCodeExporter commented 9 years ago
Now I try agan and working but I try to read all inputs with 
sw0.digitalReadAll()
and give an error below.

Traceback (most recent call last):
  File "ds24.py", line 29, in <module>
    sw0.digitalReadAll()
AttributeError: DS2408 instance has no attribute 'digitalReadAll'

Original comment by max.bene...@gmail.com on 2 Dec 2013 at 11:13

GoogleCodeExporter commented 9 years ago
Function missing

you can use portRead instead

Original comment by tro...@trouch.com on 10 Dec 2013 at 2:37

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 10 Dec 2013 at 2:38

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 4 Jan 2014 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 4 Jan 2014 at 9:01

GoogleCodeExporter commented 9 years ago
Delayed for major release

Original comment by tro...@trouch.com on 31 Jan 2014 at 1:58

GoogleCodeExporter commented 9 years ago
Maybe you can retry your code with the updated 2408 driver from issue 95. For 
correct operation, please look at the driver comments and the setting of the 
RSTZ pin as this influences correct working of output ports.

Andreas

Original comment by andreas....@googlemail.com on 30 Apr 2014 at 12:42