diff --git a/src/example2.py b/src/example2.py index d0f5be0..5af74f1 100644 --- a/src/example2.py +++ b/src/example2.py @@ -7,14 +7,14 @@ PINOUT_I2C = ('GND','+5V','SCL','SDA') COLORS_I2C = ('BK', 'RD', 'YE', 'GN') PINOUT_SPI_DATAONLY = ('MISO','MOSI','SCK') -h.add_node('X1',type='Molex KK 254', gender='female', pinout=('GND', - '+5V', - 'SCL', - 'SDA', - 'MISO', - 'MOSI', - 'SCK', - 'N/C')) +h.add_node('X1', type='Molex KK 254', gender='female', pinout=('GND', + '+5V', + 'SCL', + 'SDA', + 'MISO', + 'MOSI', + 'SCK', + 'N/C')) h.add_node('X2', type='Molex KK 254', gender='female', pinout=PINOUT_I2C) h.add_node('X3', type='Molex KK 254', gender='female', pinout=PINOUT_I2C) h.add_node('X4', type='Molex KK 254', gender='female', pinout=('GND','+12V')+PINOUT_SPI_DATAONLY) diff --git a/src/example4.py b/src/example4.py new file mode 100644 index 0000000..97f9bb9 --- /dev/null +++ b/src/example4.py @@ -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)