Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Made2shred's Electronic Components
- -- Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
- tpt.log("Electronic Components By Made2shred")
- function flipflop(x, y)
- tpt.log("Drawing flipflop...")
- tpt.create(x + 0, y + 0, "SWCH")
- tpt.create(x + 0, y - 2, "PSCN")
- tpt.create(x - 1, y - 4, "PSCN")
- tpt.create(x - 3, y - 4, "PSCN")
- tpt.create(x - 3, y - 2, "PSCN")
- tpt.create(x + 0, y + 2, "NSCN")
- tpt.create(x + 1, y + 4, "NSCN")
- tpt.create(x + 3, y + 4, "NSCN")
- tpt.create(x + 3, y + 2, "NSCN")
- tpt.create(x - 5, y + 0, "METL")
- tpt.create(x - 4, y + 0, "METL")
- tpt.create(x - 3, y + 0, "METL")
- tpt.create(x - 2, y + 0, "METL")
- tpt.create(x + 2, y + 0, "METL")
- tpt.create(x + 3, y + 0, "METL")
- tpt.create(x + 4, y + 0, "METL")
- tpt.create(x + 5, y + 0, "METL")
- end
- function ORgate(x, y)
- tpt.log("Drawing OR gate...")
- tpt.create(x + 0, y + 1, "NSCN")
- tpt.create(x + 0, y - 1, "NSCN")
- tpt.create(x + 2, y + 0, "METL")
- tpt.create(x + 3, y + 0, "METL")
- tpt.create(x + 4, y + 0, "METL")
- tpt.create(x - 2, y - 1, "PSCN")
- tpt.create(x - 3, y - 1, "PSCN")
- tpt.create(x - 4, y - 1, "PSCN")
- tpt.create(x - 2, y - 0, "INSL")
- tpt.create(x - 3, y - 0, "INSL")
- tpt.create(x - 4, y - 0, "INSL")
- tpt.create(x - 2, y + 1, "PSCN")
- tpt.create(x - 3, y + 1, "PSCN")
- tpt.create(x - 4, y + 1, "PSCN")
- end
- function ANDgate(x, y)
- tpt.log("Drawing AND gate...")
- tpt.create(x - 3, y - 1, "METL")
- tpt.create(x - 4, y - 1, "METL")
- tpt.create(x - 5, y - 1, "METL")
- tpt.create(x - 6, y - 1, "METL")
- tpt.create(x - 3, y + 2, "METL")
- tpt.create(x - 4, y + 2, "METL")
- tpt.create(x - 5, y + 2, "METL")
- tpt.create(x - 6, y + 2, "METL")
- tpt.create(x - 3, y - 1, "METL")
- tpt.create(x - 4, y - 1, "METL")
- tpt.create(x - 5, y - 1, "METL")
- tpt.create(x - 2, y - 2, "METL")
- tpt.create(x - 1, y + 1, "METL")
- tpt.create(x + 1, y + 1, "NTCT")
- tpt.create(x + 2, y - 1, "PSCN")
- tpt.create(x + 2, y + 3, "PSCN")
- tpt.create(x + 4, y + 3, "METL")
- tpt.create(x + 5, y + 3, "METL")
- tpt.create(x + 6, y + 3, "METL")
- tpt.create(x + 0, y - 3, "METL")
- tpt.create(x + 2, y - 3, "METL")
- end
- function NOTgate(x, y)
- tpt.log("Drawing NOT gate...")
- tpt.create(x +0, y + 0, "PTCT")
- tpt.create(x - 2, y + 0, "METL")
- tpt.create(x - 3, y + 0, "METL")
- tpt.create(x - 4, y + 0, "METL")
- tpt.create(x - 5, y + 0, "METL")
- tpt.create(x + 1, y + 2, "PSCN")
- tpt.create(x + 1, y - 2, "PSCN")
- tpt.create(x + 1, y - 3, "BTRY")
- tpt.create(x + 3, y + 2, "METL")
- tpt.create(x + 3, y + 0, "METL")
- tpt.create(x + 4, y + 0, "METL")
- tpt.create(x + 5, y + 0, "METL")
- tpt.create(x + 6, y + 0, "METL")
- end
- function diode(x, y)
- tpt.log("Drawing a Diode...")
- tpt.create(x + 0, y + 0, "PSCN")
- tpt.create(x - 1, y + 0, "PSCN")
- tpt.create(x - 1, y + 1, "PSCN")
- tpt.create(x - 1, y - 1, "PSCN")
- tpt.create(x - 2, y + 0, "PSCN")
- tpt.create(x - 2, y + 1, "PSCN")
- tpt.create(x - 2, y - 1, "PSCN")
- tpt.create(x - 2, y - 2, "PSCN")
- tpt.create(x - 2, y + 2, "PSCN")
- tpt.create(x - 3, y + 0, "PSCN")
- tpt.create(x - 3, y + 1, "PSCN")
- tpt.create(x - 3, y - 1, "PSCN")
- tpt.create(x - 3, y - 2, "PSCN")
- tpt.create(x - 3, y + 2, "PSCN")
- tpt.create(x - 3, y + 3, "PSCN")
- tpt.create(x - 3, y - 3, "PSCN")
- tpt.create(x - 4, y + 0, "PSCN")
- tpt.create(x - 5, y + 0, "PSCN")
- tpt.create(x + 1, y + 0, "NSCN")
- tpt.create(x + 1, y + 1, "NSCN")
- tpt.create(x + 1, y + 2, "NSCN")
- tpt.create(x + 1, y + 3, "NSCN")
- tpt.create(x + 1, y - 1, "NSCN")
- tpt.create(x + 1, y - 2, "NSCN")
- tpt.create(x + 1, y - 3, "NSCN")
- tpt.create(x + 2, y + 0, "NSCN")
- tpt.create(x + 3, y + 0, "NSCN")
- tpt.create(x + 4, y + 0, "NSCN")
- tpt.create(x - 6, y + 0, "METL")
- tpt.create(x - 7, y + 0, "METL")
- tpt.create(x - 8, y + 0, "METL")
- tpt.create(x - 9, y + 0, "METL")
- tpt.create(x - 10, y + 0, "METL")
- tpt.create(x - 11, y + 0, "METL")
- tpt.create(x - 12, y + 0, "METL")
- tpt.create(x + 5, y + 0, "METL")
- tpt.create(x + 6, y + 0, "METL")
- tpt.create(x + 7, y + 0, "METL")
- tpt.create(x + 8, y + 0, "METL")
- tpt.create(x + 9, y + 0, "METL")
- tpt.create(x + 10, y + 0, "METL")
- tpt.create(x + 11, y + 0, "METL")
- end
- function diode2(x, y)
- tpt.log("Drawing a Diode...")
- tpt.create(x + 0, y - 1, "PSCN")
- tpt.create(x + 0, y + 0, "PSCN")
- tpt.create(x + 0, y + 1, "PSCN")
- tpt.create(x - 1, y - 1, "PSCN")
- tpt.create(x - 1, y + 0, "PSCN")
- tpt.create(x - 1, y + 1, "PSCN")
- tpt.create(x - 2, y - 1, "PSCN")
- tpt.create(x - 2, y + 0, "PSCN")
- tpt.create(x - 2, y + 1, "PSCN")
- tpt.create(x - 3, y - 1, "PSCN")
- tpt.create(x - 3, y + 0, "PSCN")
- tpt.create(x - 3, y + 1, "PSCN")
- tpt.create(x - 4, y - 1, "PSCN")
- tpt.create(x - 4, y + 0, "PSCN")
- tpt.create(x - 4, y + 1, "PSCN")
- tpt.create(x + 1, y - 1, "NSCN")
- tpt.create(x + 1, y + 0, "NSCN")
- tpt.create(x + 1, y + 1, "NSCN")
- tpt.create(x + 2, y - 1, "NSCN")
- tpt.create(x + 2, y + 0, "NSCN")
- tpt.create(x + 2, y + 1, "NSCN")
- tpt.create(x - 4, y + 0, "METL")
- tpt.create(x - 5, y + 0, "METL")
- tpt.create(x - 6, y + 0, "METL")
- tpt.create(x - 7, y + 0, "METL")
- tpt.create(x - 8, y + 0, "METL")
- tpt.create(x - 9, y + 0, "METL")
- tpt.create(x - 10, y + 0, "METL")
- tpt.create(x - 11, y + 0, "METL")
- tpt.create(x - 12, y + 0, "METL")
- tpt.create(x + 3, y + 0, "METL")
- tpt.create(x + 4, y + 0, "METL")
- tpt.create(x + 5, y + 0, "METL")
- tpt.create(x + 6, y + 0, "METL")
- tpt.create(x + 7, y + 0, "METL")
- tpt.create(x + 8, y + 0, "METL")
- tpt.create(x + 9, y + 0, "METL")
- tpt.create(x + 10, y + 0, "METL")
- end
- function smalldiode(x, y)
- tpt.log("Drawing Diode...")
- tpt.create(x + 0, y + 0, "PSCN")
- tpt.create(x - 1, y + 0, "PSCN")
- tpt.create(x - 2, y + 0, "PSCN")
- tpt.create(x + 1, y + 0, "NSCN")
- tpt.create(x + 2, y + 0, "NSCN")
- end
- function ALL(x, y)
- flipflop(x +0, y + 0)
- ORgate(x + 20, y + 0)
- ANDgate(x + 38, y + 0)
- NOTgate(x + 59, y + 0)
- diode(x +88, y + 0)
- diode2(x + 120, y + 0)
- smalldiode(x + 140, y + 0)
- tpt.log("Drawing Everything...")
- end
Advertisement
Add Comment
Please, Sign In to add comment