Export to GitHub

the-bus-pirate - issue #68

BitBang.py bug/typo on line 125/126


Posted on Feb 21, 2012 by Grumpy Bear

What steps will reproduce the problem?

   def raw_set_pins(self, pins):
       self.port.write(chr(0x80 | config))

What is the expected output? What do you see instead?

File "/usr/local/lib/python2.7/dist-packages/pyBusPirateLite/BitBang.py", line 126, in raw_set_pins self.port.write(chr(0x80 | config)) NameError: global name 'config' is not defined

Please provide any additional information below.

Either change config to pins on line 126 or pins to config on line 125

Comment #1

Posted on Feb 21, 2012 by Grumpy Bear

I have successfully read the frequency of a RH10D humidity sensor.

hacky code below which discovered this buggette.

   i2c.BBmode()
    print "Requesting Freq check"
    i2c.raw_cfg_pins(PinCfg.AUX);
    i2c.raw_set_pins(BBIOPins.AUX | BBIOPins.PULLUP | BBIOPins.POWER);
    i2c.port.write("\x16")
    i2c.timeout(2)

    raw_data = i2c.response(4, True)

Comment #2

Posted on Feb 26, 2013 by Massive Hippo

This is a duplicate of issue 47

Status: New

Labels:
Type-Defect Priority-Medium