We are about to switch to a new forum software. Until then we have removed the registration on this forum.
The criteria below should be met but I am seemily very much out of my depth. Any help to point me in the right direction would be much appreciated.
Thanks in advance.
A program that allows the user to enter at least 10 resistor sizes by entering the colour codes as letter combinations separated by commas or coloured buttons that can be pressed in order to select the band colours.
After entering the last resistor the operator will enter Done/done to indicate they’ve finished and are ready to enter supply voltage, output voltage and range.
The program must calculate the 2 resistor voltage divider and produce a text based matrix highlighting all the good choices considering the voltage drop required. The output will be formatted in a matrix and as a list of the top 5 choices.
I hope this makes some sense to people
Answers
To get ya started: https://Gist.GitHub.com/GoToLoop/bba0c288aaeeb5ef9bb1
thank you, im not entirely surely what this is? will this run if i put it straight into processing?
Yes, placing both "Test.pde" & "Inputs.java" folder in a folder called "Test/", they'll run under Processing's IDE (PDE). :-\"
But notice that "Test.pde" is merely a sample on how to use "Inputs.java".
You're gonna need to replace "Test.pde" by your own code of course. #:-S
As you might be imagining by now, "Inputs.java" is a library which opens a dialog and accepts user input; then returns it for a specific datatype depending on the method invoked for it. :-$
Ok, some thoughts:
Does "or" mean you must implement both interfaces, or you may implement either interface?
Do you have a sample of what the 10 resistor sizes are? Why don't you share them here as color codes.
Is that interface a DONE button, or typing the word "done", or must it support both options?
Can you briefly explain what this means?
Does that mean something that looks like this?
Does "highlighting" mean surrounding an option in * marks?
This is definitely something complex enough that you want to break it down into a lot of little parts, then solve each part separately.
i have made some progress on this yesterday afternoon which is below.
the colour code is representative of the colours on the resistor itself. e.g black = 0, white = 9 and everything in between in order. if brown, red, orange were pressed in that order then 123 ohms would be the value of the resistor.
a done button would be fine
the voltage divider rule VR=Vs*(R1/(R1+R2)) basically, it would provide the 2 most suitable resistors to give the voltage drop required.
heres what i have so far.
Many Thanks
Go back and edit your post
Format your code
so,,,here's the latest progress. i just have the voltage divider left to do.
I don't feel this is very userfriendly.
I'd expect that the program gives out a text "Enter three colors for resistor 1", then "Enter three colors for resistor 2" and so forth.
No buttons Load 1, Load 2 etc.
Next to each resistor slot the colors should also appear plus resistor size.
I would expect a new screen without the resistors but with the fields for enter supply voltage, output voltage and range.
A 3rd screen for the matrix.
Best, Chrisir ;-)