Last active
August 29, 2015 14:26
-
-
Save gregwinn/6dcdde3ecd0011518ff4 to your computer and use it in GitHub Desktop.
Using this TI BASIC program, it will calculate the value resistor needed for an LED (for use with less then 1 Amp). TI Nspire CX CAS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Used on a TI Nspire CX CAS | |
# -------------------------- | |
# "Remove comments before running" | |
Define ledresistorval()= | |
Prgm | |
Request "VCC",v1 | |
Request "Forward Voltage",v2 | |
Request "Forward Current",c | |
If v1<v2 Then | |
Return "LED value too low" | |
EndIf | |
If v1=v2 Then | |
Return "Error" | |
EndIf | |
If c>1 Then | |
Return "Current too high." | |
EndIf | |
Disp "Resistor Value: " | |
Disp ((v1-v2)/(c)) | |
Return | |
EndPrgm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment