TIMER_ID1 = 2000
TIMER_ID2 = 2001

class testframe(gui.Countertest):
    def __init__(self,parent):
        gui.Countertest.__init__(self,parent)

        panel = wx.Panel(self, wx.ID_ANY)
        
        self.timer = wx.Timer(self, id=TIMER_ID1)
        self.timer.Start(3000)
        self.Bind(wx.EVT_TIMER, self.update)

    def FuncStartCount(self,parent):
        rcount = 0
        while True:
            inputValue = GPIO.input(17)
            if(inputValue == True):
                rcount = rcount + 1
                time.sleep(0.3)
                print rcount
                # self.txt_Counter.SetValue(str(rcount))

    def FuncDisconnect(self,parent):
        sys.exit()
    
    def update(self,parent):
        print rcount
        self.txt_Counter.SetValue(str(rcount))
    
app = wx.App(False)

frame = testframe(None)
frame.Show(True)
app.MainLoop()