예제 #1
0
o.start()

# setting the scale

o.setScale(0.05)  # Set scale by trial and error.

# Set the width of the oscilloscope to fit the ipython notebook.

o.setWidth(100)


# In[33]:

# unhold the oscilloscope to start the recording.

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()
예제 #2
0
#   2          Astable
#   3          Bistable

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()