Apr 16, 2017 20:23
gist: d16e8c31ca381317a450e87a671c1b36, 2017-04-16 20:23:05Z
from gpiozero.pins.rpigpio import RPiGPIOPin
from gpiozero import Button

rows = [12, 16, 20, 21]
cols = [4, 17, 27, 22]


rowPins = []
colPins = []

bounces = {}

for row in rows:
    pin = RPiGPIOPin(row)
    pin.bounce = 5
    rowPins.append(pin)
    bounces[pin.number] = {}

for col in cols:
    pin = RPiGPIOPin(col)
    pin.bounce = 5
    colPins.append(pin)

for row in rowPins:
    for col in colPins:
        bounces[row.number][col.number] = 0

def hookswitchChange():
    print("Button Activated")

hookswitch = Button(2)
hookswitch.when_activated = hookswitchChange
hookswitch.when_deactivated = hookswitchChange

print "starting loop"

while True:
    for row in rowPins:
        # set row pin high
        row.output_with_state(True)
        for col in colPins:
            # read col pin
            col.input_with_pull('down')
            status = col.state
            if col.state == 1:
                print "{0}/{1} - {2}".format(row, col, status)
                bounces[row.number][col.number] += 2
        row.output_with_state(False)

    for row, cols in bounces.items():
        for col, status in cols.items():
            if status > 5:
                print "{0}/{1} - {2}".format(row, col, status)
            bounces[row][col] -= 1
Apr 16, 2017 20:22
I'm using some python
Apr 16, 2017 20:15
yes, but not well
Apr 16, 2017 20:09
there's a circuit inside the dial mechanism that has connections for the rows, columns, +5v and gnd
Apr 16, 2017 19:24
There are no pull-up resistors in the circuit
Apr 16, 2017 18:44
@utu2012 sorry, I'm not seeing how that would help. Could you explain in a little more detail? Thanks
Apr 16, 2017 18:44
@utu2012 not sure if that link is going to the right place?
Apr 16, 2017 18:44
@utu2012 How was the HM9102D reading it?
Apr 16, 2017 18:44
@utu2012 Sorry, got charlieplexing and multiplexing mixed up. I've corrected the post now.
Apr 16, 2017 18:44
@TonyStewart.EEsince'75 Pretty much no to all of that...
 
Oct 23, 2014 19:36
I think we're going with the 6500s because we've worked with them before
Oct 23, 2014 19:35
We're currently planning for 15 initial customers, but we will need to expand to 2-300 if necessary
Oct 23, 2014 19:33
ok, thanks for your help
Oct 23, 2014 19:20
this is a new datacentre, our current plan is a pair of Cisco Catalyst 6000 series chases with Ethernet cards for the servers and fibre cards for the peerings
Oct 23, 2014 19:17
wouldn't that be rather difficult to manage?
Oct 23, 2014 19:15
what would announce the IP ranges for BGP?
Oct 23, 2014 19:14
to keep things isolated and reduce points of failure
Oct 23, 2014 19:13
right, ok
Oct 23, 2014 19:13
FYI, it's all managed by us
Oct 23, 2014 19:12
yes
Oct 23, 2014 19:10
Windows server 2012, Debian 7 & CentOS 6
Oct 23, 2014 19:10
mainly virtual servers
Oct 23, 2014 19:09
all the CPE is within our rackspace and network in a colo datacenter
Oct 23, 2014 19:09
The CPE would have a static default route to our gateway device (the bottom row of routers in my diagrams)
Oct 23, 2014 18:58
of sorts, yes
Oct 23, 2014 18:57
they would need internet connectivity, but not public access
Oct 23, 2014 18:57
they're things like remote desktop and phone servers
Oct 23, 2014 18:50
That and the fact I've never done this before
Oct 23, 2014 18:49
each customer will have their own firewall controlling access to their equipment, which will handle all the security
Oct 23, 2014 18:48
it is fine if they can ping each other
Oct 23, 2014 18:48
some of it is public, some not
Oct 23, 2014 18:48
there's a mix
Oct 23, 2014 18:35
sorry it took me so long
Oct 23, 2014 18:35
Hi
Oct 23, 2014 17:04
back in 20 mins
Oct 23, 2014 17:04
OK, leaving the office now
Oct 23, 2014 16:58
Thanks again for the help
 

 General Network Engineering recommend

Product Recommendations / discussion. This room has different...
Oct 23, 2014 16:56
sounds great, thanks for the help
Oct 23, 2014 16:55
Will you still be around then?
Oct 23, 2014 16:54
@MikePennington Just heading out of the office, but I'll be home in 20 mins