예제 #1
0
o.unhold()

# Initial State

print(b.state())

# Triggering the counter sequentially 2^4 times

for i in range(1, 2 ** 4):
    b.trigger()
    print(b.state())

# Display the oscilloscope - Implicitly the o.hold() will be called first
# to stop the recording.

o.display()


# In[34]:

# Calling the instance will trigger

b()

print(b.state())


# In[35]:

# Setting the Counter
예제 #2
0
out = Connector(0)

# MODE 3

m = Multivibrator(0, mode=3)

m.start()
m.setOutput(out)

o = Oscilloscope((m.A, 'OUT'))
o.start()
o.setScale(0.05)
o.unhold()

time.sleep(0.1)
m.trigger()
print(m.A())
time.sleep(0.5)
m.trigger()
print(m.A())
time.sleep(1)
m.trigger()
print(m.A())
time.sleep(2)
m.trigger()
print(m.A())
o.display()
o.kill()
m.kill()