Calculator Program: Circuits

By Soubi on Oct 01, 2010

Hawkee doesnt have the Platform that this is really written on, so i just put " C++ " again. The real code is in a from of basic(TI).This program draws a Series or Parallel circuit..just depends on which one you are doing. Each circuit has 2 resistors. a Amp gauge, and so forth, it calculates the amount of electricty that can flow through through the circuit, without you blowing it. :D enjoy those that are needing something like this.

:ClrHome
:Disp “(1)Series”
:Disp “(2)Parallel”
:Input “Circuit:”,A
:If A=1
:GoTo 1
:If A=2
:GoTo 2
:Lbl 1
:ClrHome
:-47->Xmin
:47->Xmax
:1->Xscl
:-31->Ymin
:31->Ymax
:1->Yscl
:input “R1:”,B
:Input “R2:”,C
:B+C->D
:Input “V:”,E
:E/D->F
:Disp “IT=“,F
:Disp “PRESS ENTER”
:Pause
:ClrHome
:ClrDraw
:AxesOff
:CoordOff
:PlotsOff
:Line(-35,15,-15,15)
:Line(-15,15,-12,20)
:Line(-12,20,-9,15)
:Line(-9,15,-6,20)
:Text(4,35,B,”OHMS”)
:Line(-6,20,-3,15)
:Line(-3,15,0,20)
:Line(0,20,3,15)
:Line(3,15,13,15)
:Line(13,15,16,20)
:Line(19,15,21,20)
:Text(4,67,C,”OHMS”)
:Line(21,20,24,15)
:Line(24,15,27,20)
:Line(27,20,30,15)
:Text(53,67,E,”VOLTS”)
:Line(30,15,45,15)
:Line(45,15,45,-15)
:Line(45,-15,35,-15)
:Line(33,-13,33,-17)
:Line(31,-20,31,-10)
:Line(29,-13,29,-17)
:Line(27,-20,27,-10)
:Line(27,-15,-25,-15)
:Circle(-35,-15,-10)
:Text(40,11,F)
:Text(46,5,”AMPS”)
:Line(-35,-5,-35,15)
:Pause
:ClrHome
:AxesOn
:PlotsOn
:-10->Xmin
:10->Xmax
:1->Xscl
:-10->Ymin
:10->Ymax
:1->Yscl
:Stop
:Lbl 2
:-47->Xmin
:47->Xmax
:1->Xscl
:-31->Ymin
:31->Ymax
:1->Yscl
:AxesOff
:CoordOff
:PlotsOff
:ClrDraw
:ClrHome
:Input”R1:”,A
:Input “R2:”,B
:Input “V:”,C
:1/A->D
:1/B->E
:D+E->F
:(F)^-1->G
:C/(G)->H
:Disp “1/RT=“,F
:Disp “IT=“,H
:Disp “PRESS ENTER”
:Pause
:ClrHome
:Line(-35,15,-25,15)
:Line(-25,15,-20,6)
:Line(-25,15,-20,24)
:Line(-20,6,-15,6)
:Line(-20,24,-15,24)
:Line(-15,6,-13,4)
:Line(-13,4,-11,6)
:Line(-11,6,-9,4)
:Line(-9,4,-7,6)
:Line(-7,6,-5,4)
:Line(-5,4,-3,6)
:Line(-15,24,-13,26)
:Line(-13,26,-11,24)
:Line(-11,24,-9,26)
:Line(-9,26,-7,24)
:Line(-7,24,-5,26)
:Line(-5,26,-3,24)
:Line(-3,6,10,6)
:Line(-3,24,10,24)
:Line(10,6,15,15)
:Line(10,24,15,15)
:Line(15,15,25,15)
:Line(25,15,25,-11)
:Circle(25,-29,9)
:Line(16,-20,0,-20)
:Line(-1,-18,-1,-22)
:Line(-3,-16,-3,-24)
:Line(-5,-18,-5,-22)
:Line(-7,-16,-7,-24)
:Line(-7,-20,-35,-20)
:Line(-35,-20,-35,15)
:Text(8,25,A,”OHMS”)
:Text(28,25,B,”OHMS”)
:Text(40,30,C,”VOLT”)
:Text(43,73,H)
:Text(50,68,”AMPS”)
:Paues
:ClrHome
:AxesOn
:PlotsOn
:-10->Xmin
:10->Xmax
:1->Xscl
:-10->Ymin
:10->Ymax
:1->Yscl
:Stop

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.