示例#1
0
from BinPy.tools.multivibrator import Multivibrator
from BinPy.tools.oscilloscope import Oscilloscope
import time

# MODE selects the mode of operation of the multivibrator.

# Mode No. :  Description
#   1          Monostable
#   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())
示例#2
0
from BinPy.tools.oscilloscope import Oscilloscope
import time

# MODE selects the mode of operation of the multivibrator.

# Mode No. :  Description
#   1          Monostable
#   2          Astable
#   3          Bistable

out = Connector()


# MODE 2

m = Multivibrator(0, 2, on_time=0.2, off_time=0.8)

m.start()
m.setOutput(out)
m.trigger()

o = Oscilloscope((out, 'OUT'))
o.start()
o.setScale(0.2)
o.unhold()

time.sleep(10)

o.display()

m.kill()
示例#3
0
# MODE selects the mode of operation of the multivibrator.

# Mode No. :  Description
#   1          Monostable
#   2          Astable
#   3          Bistable

out = Connector()


# In[3]:

# Initialize mutivibrator in MODE 1

m = Multivibrator(0, mode=1, time_period=1)
m.start()
m.setOutput(out)


# In[4]:

# Initialize the oscilloscope
o = Oscilloscope((out, 'OUT'))
o.start()
o.set_scale(0.005)  # Set scale by trial and error.
o.set_width(100)
o.unhold()
time.sleep(0.1)
m.trigger()  # Also works with m()
time.sleep(0.1)
示例#4
0
from BinPy.tools.multivibrator import Multivibrator
from BinPy.tools.oscilloscope import Oscilloscope
import time

# MODE selects the mode of operation of the multivibrator.

# Mode No. :  Description
#   1          Monostable
#   2          Astable
#   3          Bistable

out = Connector()

# MODE 2

m = Multivibrator(0, 2, on_time=0.2, off_time=0.8)

m.start()
m.setOutput(out)
m.trigger()

o = Oscilloscope((out, 'OUT'))
o.start()
o.setScale(0.2)
o.unhold()

time.sleep(10)

o.display()

m.kill()
示例#5
0
# <codecell>

# MODE selects the mode of operation of the multivibrator.

# Mode No. :  Description
#   1          Monostable
#   2          Astable
#   3          Bistable

out = Connector()

# <codecell>

# Initialize mutivibrator in MODE 2 with the adequate on_time and off_time

m = Multivibrator(0, mode=2, on_time=0.2, off_time=0.8)
m.start()
m.setOutput(out)

# <codecell>

# Initialize the oscilloscope
o = Oscilloscope((out, 'OUT'))
o.start()
o.setScale(0.05)  # Set scale by trial and error.
o.setWidth(100)
o.unhold()
time.sleep(0.1)
m.trigger()  # Also works with m()
time.sleep(5)