Beispiel #1
0
    def connect(self, widget, button, data=None):

        try:
            self.acr122l = acr122l(self.configuration['serial']['port'], self.configuration['serial']['baudrate'])
        except Exception as exp:
            self.logit(str(exp),'error')
        if self.acr122l:
            if self.acr122l.is_connected():
                self.clean()
                self.menuItemBlight.set_sensitive(True)
                self.menuItemPolling.set_sensitive(True)
                self.menuItemDconn.set_sensitive(True)
                self.menuItemConn.set_sensitive(False)
                self.menuItemRead.set_sensitive(True)
                self.menuItemWrite.set_sensitive(True)
                self.menuItemCheck.set_sensitive(True)

                if self.configuration['lcd']['lcd_backlight']:
                    self.acr122l.LCD_back_light(True)
                self.lcd_states('welcome')
                self.logit('Connected')
Beispiel #2
0
#       
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#       GNU General Public License for more details.
#       
#       You should have received a copy of the GNU General Public License
#       along with this program; if not, write to the Free Software
#       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#       MA 02110-1301, USA.



from acr122l import acr122l

acr122l = acr122l()

#print acr122l.LCD_back_light(True)
#print acr122l.LED_control('0101')

#print acr122l.LCD_Clear()
#print acr122l.LCD_Text(False,'A',0x00,'AHA!')
#print acr122l.LCD_Text(False,'A',0x00,'')
#print acr122l.LCD_Contrast(10)
#pixels = [0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]
#pixels = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
#print acr122l.LCD_Graphic(False,0x05,pixels)
#print acr122l.LCD_Scrolling() # dodelat buguje se
#print acr122l.Buzzer_control(1,1,1)#opravit, ma specialni odpoved
#print acr122l.Buzzer_Led_control('00000001',1, 1, 1,'on') #opravit, ma specialni odpoved
#print acr122l.get_sam_version(1) #opravit, ma specialni odpoved