Add minimalist example 4
This commit is contained in:
parent
09bc282506
commit
06a9188e83
@ -7,7 +7,7 @@ PINOUT_I2C = ('GND','+5V','SCL','SDA')
|
|||||||
COLORS_I2C = ('BK', 'RD', 'YE', 'GN')
|
COLORS_I2C = ('BK', 'RD', 'YE', 'GN')
|
||||||
PINOUT_SPI_DATAONLY = ('MISO','MOSI','SCK')
|
PINOUT_SPI_DATAONLY = ('MISO','MOSI','SCK')
|
||||||
|
|
||||||
h.add_node('X1',type='Molex KK 254', gender='female', pinout=('GND',
|
h.add_node('X1', type='Molex KK 254', gender='female', pinout=('GND',
|
||||||
'+5V',
|
'+5V',
|
||||||
'SCL',
|
'SCL',
|
||||||
'SDA',
|
'SDA',
|
||||||
|
|||||||
13
src/example4.py
Normal file
13
src/example4.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import wireviz
|
||||||
|
|
||||||
|
h = wireviz.Harness()
|
||||||
|
|
||||||
|
h.add_cable('W1', show_name=False, show_num_wires=False, num_wires=4, color_code='DIN')
|
||||||
|
h.add_cable('W2', show_name=False, show_num_wires=False, num_wires=4, color_code='DIN')
|
||||||
|
h.add_node('X1', num_pins=4, show_num_pins=False)
|
||||||
|
h.add_node('X2', num_pins=4, show_num_pins=False)
|
||||||
|
h.add_node('X3', num_pins=4, show_num_pins=False)
|
||||||
|
h.connect_all_straight('W1','X1','X2')
|
||||||
|
h.connect_all_straight('W2','X2','X3')
|
||||||
|
|
||||||
|
h.output(filename='output', format=('png','svg'), view=False)
|
||||||
Loading…
x
Reference in New Issue
Block a user