Added float demo
parent
95e4e59e3d
commit
861b971ff7
|
@ -6,10 +6,12 @@ logging.basicConfig(level=logging.DEBUG)
|
|||
|
||||
k = eSSP.NV11()
|
||||
k.sync()
|
||||
k.host_protocol_version(6)
|
||||
k.set_channel_inhibits(0xff, 0xff)
|
||||
k.enable()
|
||||
|
||||
k.display_on()
|
||||
print k.channel_values()
|
||||
|
||||
while True:
|
||||
events = k.poll()
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
import time
|
||||
import eSSP
|
||||
|
||||
acceptor = eSSP.NV11()
|
||||
acceptor.sync()
|
||||
print 'First poll:', acceptor.poll()
|
||||
acceptor.host_protocol_version(6)
|
||||
acceptor.set_channel_inhibits(0xff, 0xff)
|
||||
acceptor.set_value_reporting_type(1)
|
||||
|
||||
print 'Current route for 0x02 channel is %r. Setting to 0x00 (payout)' % (
|
||||
acceptor.get_denomination_route(0x02),)
|
||||
acceptor.set_denomination_route(0x00, 0x02)
|
||||
|
||||
print 'Trying to payout single note...'
|
||||
try:
|
||||
acceptor.payout_note()
|
||||
except Exception as exc:
|
||||
print 'Failed (%r)' % exc
|
||||
|
||||
acceptor.enable()
|
||||
acceptor.display_on()
|
||||
|
||||
while True:
|
||||
events = acceptor.poll()
|
||||
|
||||
if events:
|
||||
print events
|
||||
|
||||
for evt in events:
|
||||
if evt.code == 239 and evt.args[0] != 0:
|
||||
print 'You may reject a note of type %r here now...' % evt.args[0]
|
||||
# ...like this:
|
||||
# acceptor.reject_banknote()
|
||||
if evt.code == 219:
|
||||
print 'Current payout state: %r' % acceptor.get_note_positions()
|
||||
if evt.code == 210:
|
||||
print 'Disabled, enabling...'
|
||||
acceptor.enable()
|
||||
|
||||
time.sleep(0.5)
|
Loading…
Reference in New Issue