Update example 1
This commit is contained in:
parent
1b3fdb1e44
commit
802c10e6e1
@ -1,6 +1,5 @@
|
|||||||
import wireviz
|
import wireviz
|
||||||
|
|
||||||
PINOUT_SERIAL = ('DCD','RX','TX','DTR','GND','DSR','RTS','CTS','RI')
|
|
||||||
|
|
||||||
PINOUT_I2C = ('GND','+5V','SCL','SDA')
|
PINOUT_I2C = ('GND','+5V','SCL','SDA')
|
||||||
COLORS_I2C = ('BK', 'RD', 'YE', 'GN')
|
COLORS_I2C = ('BK', 'RD', 'YE', 'GN')
|
||||||
@ -10,8 +9,8 @@ PINOUT_SPI_DATAONLY = ('MISO','MOSI','SCK')
|
|||||||
wireviz.color_mode = 'SHORT' # short/SHORT/full/FULL/hex/HEX
|
wireviz.color_mode = 'SHORT' # short/SHORT/full/FULL/hex/HEX
|
||||||
|
|
||||||
# example 1
|
# example 1
|
||||||
X1 = wireviz.Node('X1', type='D-Sub', gender='female', pinout=PINOUT_SERIAL, ports_right=True)
|
X1 = wireviz.Node('X1', type='D-Sub', gender='female', pinout=('DCD','RX','TX','DTR','GND','DSR','RTS','CTS','RI'), ports_right=True)
|
||||||
X2 = wireviz.Node('X2', type='Molex KK 254', gender='female', num_pins=6, ports_left=True)
|
X2 = wireviz.Node('X2', type='Molex KK 254', gender='female', pinout=('GND','RX','TX','NC','OUT','IN'), ports_left=True)
|
||||||
W1 = wireviz.Cable('W1', mm2=0.25, length=0.2, show_name=True, show_pinout=True, num_wires=3, color_code='DIN', shield=True)
|
W1 = wireviz.Cable('W1', mm2=0.25, length=0.2, show_name=True, show_pinout=True, num_wires=3, color_code='DIN', shield=True)
|
||||||
# Option 1: define wires and shield in one line
|
# Option 1: define wires and shield in one line
|
||||||
# W1.connect(X1,(5,2,3,5),(1,2,3,'s'),X2,(1,3,2,None))
|
# W1.connect(X1,(5,2,3,5),(1,2,3,'s'),X2,(1,3,2,None))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user