maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce/WIP] Bander - Electronics Helper (https://talk.maemo.org/showthread.php?t=89529)

sixwheeledbeast 2013-03-19 20:13

[Announce] Bander - Electronics Helper
 
4 Attachment(s)
Bander is an Electronics Helper application written in Qt.

Feel free to contribute more futures :)

It acts as an open-source, Qt portrait replacement for the offscr package in extras.

http://wiki.maemo.org/Bander

n0x 2013-03-20 06:27

Re: [Announce/WIP] Bander - Electronics Helper
 
While you're at it, I would like to suggest something as reference:

ElectroDroid.

Something like this for the N9 would be awesome.

sixwheeledbeast 2013-03-24 15:34

Re: [Announce/WIP] Bander - Electronics Helper
 
Quote:

Originally Posted by n0x (Post 1330211)
ElectroDroid.

Something like this for the N9 would be awesome.

Yes, this was/is the overall plan for bander.

Bander Version 0.0.1 is now in extras-devel FYI.

sixwheeledbeast 2013-04-01 16:22

Re: [Announce/WIP] Bander - Electronics Helper
 
Version 0.0.2 in Devel with new features :)
Wiki and Screenshots added to OP

Estel 2014-03-28 00:59

Re: [Announce/WIP] Bander - Electronics Helper
 
Have been playing with bander (no particular reason, just feeling disturbance in the force) that there is bug hidding inside ;) ) and found two glitches:

1. Bander crashes when something stupid is put into calculation fields. Like, when someone try to calculate current by providing something as voltage and 0 as resistance. It seems that it doesn't like dividing by 0 and just makes "bye bye" in a rude manner:

Code:

~ $ /opt/bander/bin/bander
Floating point exception

2. Even when calculating power, tabs used to choose what we calculate are labeled "voltage, current, resistance".

Cheers,
/Estel

sixwheeledbeast 2014-03-28 15:01

Re: [Announce/WIP] Bander - Electronics Helper
 
Quote:

Originally Posted by Estel (Post 1418812)
Have been playing with bander (no particular reason, just feeling disturbance in the force) that there is bug hidding inside ;) ) and found two glitches:

1. Bander crashes when something stupid is put into calculation fields. Like, when someone try to calculate current by providing something as voltage and 0 as resistance. It seems that it doesn't like dividing by 0 and just makes "bye bye" in a rude manner:

Code:

~ $ /opt/bander/bin/bander
Floating point exception


Thanks for the feedback.
Bander is still a work in progress, and TBH I have not had much time for Maemo things at the moment.
I had noted in the past some bugs with VIR but I haven't got the C++ coding skills to fix this calculator.

Maybe somebody could help out in making this program better.
The plan was to add 5 band resistors and LED CLR calculators too.

Estel 2014-03-28 15:40

Re: [Announce/WIP] Bander - Electronics Helper
 
Is electrodroid open source, at least in free version? Maybe code could get borrowed from there? Or some desktop program, that does same thing?

Then, "only" GUI part would be left.

/Estel

pichlo 2014-03-28 15:48

Re: [Announce/WIP] Bander - Electronics Helper
 
Thanks for bringing my attention to this thread.

Quote:

Originally Posted by sixwheeledbeast (Post 1418887)
Maybe somebody could help out in making this program better.

Looks easy. Let me have a look. I can send you my updates by email.

I have a few suggestions:
  • Use a bit darker colours for resitor colour bands. The current colours are a bit too bright and vivid. Plus, to my old eyes, orange is difficult to distingush from yellow. Same for white and silver.
  • Use units in brackets, e.g. Voltage (V), Current (A), Resistance (Ω), Power (W).
  • It took me a while to figure out that in Ohm's Law and Power calculations, one line edit was for results and not for the input. I think it should be made obvious immediately. Either use a label for the output instead of line edit or rearrange the tabs somehow. I have not yet worked out how.
  • Make sure the edit boxes accept digits by default and do not accept letters. The easiest way would be to use double spin boxes. That would also make it easy to cater for the divide-by-zero checks: if the denominator is zero, the "calculate" button could be disabled.

Actually, the whole thing can be implemented in a simple JavaScript. Let me dig out my HTML course material :)

Half-Life_4_Life 2014-03-28 17:51

Re: [Announce/WIP] Bander - Electronics Helper
 
I never knew about this neat program! Thanks for BUMPing it!
I must have a look at it. And I have to search for more. :D

pichlo 2014-03-28 19:22

Re: [Announce/WIP] Bander - Electronics Helper
 
1 Attachment(s)
Quote:

Originally Posted by pichlo (Post 1418900)
Actually, the whole thing can be implemented in a simple JavaScript. Let me dig out my HTML course material :)

Here it is (also in the attachment, only rename .txt to .htm):

HTML Code:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="javascript">
function calculate(form) {
  var n = (form.band1.value + form.band2.value) * form.multiplier.value;
  if (n >= 1000000)
    n = n / 1000000 + 'M';
  else if (n >= 1000)
    n = n / 1000 + 'K';
  form.result.value = n + form.tolerance.value;
}
</SCRIPT>
</HEAD>

<BODY>
<H1 ALIGN="center">Resistor Colour Code Calculator</H1>
The following calculator allows you to enter the colours of the bands on a given resistor, and it will then return the resistance value.<P>
For each band set the corresponding colour. When all the colours are correct, the corresponding value will be displayed in the 'Resistance' box.<P>

<FORM NAME="colour">
<TABLE ALIGN="center" WIDTH="80%" BORDER="2">
    <TR ALIGN="center">
        <TD>Band 1</TD>
        <TD>Band 2</TD>
        <TD>Multiplier</TD>
        <TD>Tolerance</TD>
    </TR>
    <TR ALIGN="center">
        <TD>
            <SELECT NAME="band1" ONCHANGE="calculate(colour)">
                <OPTION SELECTED VALUE="0" STYLE="background: black; color: white">Black</OPTION>
                <OPTION VALUE="1" STYLE="background: brown; color: white">Brown</OPTION>
                <OPTION VALUE="2" STYLE="background: red; color: white">Red</OPTION>
                <OPTION VALUE="3" STYLE="background: orange; color: white">Orange</OPTION>
                <OPTION VALUE="4" STYLE="background: yellow; color: black">Yellow</OPTION>
                <OPTION VALUE="5" STYLE="background: green; colour: white">Green</OPTION>
                <OPTION VALUE="6" STYLE="background: blue; color: white">Blue</OPTION>
                <OPTION VALUE="7" STYLE="background: purple; color: white">Purple</OPTION>
                <OPTION VALUE="8" STYLE="background: gray; color: white">Grey</OPTION>
                <OPTION VALUE="9" STYLE="background: white; color: black">White</OPTION>
            </SELECT>
        </TD>
        <TD>
            <SELECT NAME="band2" ONCHANGE="calculate(colour)">
                <OPTION SELECTED VALUE="0" STYLE="background: black; color: white">Black</OPTION>
                <OPTION VALUE="1" STYLE="background: brown; color: white">Brown</OPTION>
                <OPTION VALUE="2" STYLE="background: red; color: white">Red</OPTION>
                <OPTION VALUE="3" STYLE="background: orange; color: white">Orange</OPTION>
                <OPTION VALUE="4" STYLE="background: yellow; color: black">Yellow</OPTION>
                <OPTION VALUE="5" STYLE="background: green; color: white">Green</OPTION>
                <OPTION VALUE="6" STYLE="background: blue; color: white">Blue</OPTION>
                <OPTION VALUE="7" STYLE="background: purple; color: white">Purple</OPTION>
                <OPTION VALUE="8" STYLE="background: gray; color: white">Grey</OPTION>
                <OPTION VALUE="9" STYLE="background: white; color: black">White</OPTION>
            </SELECT>
        </TD>
        <TD>
            <SELECT NAME="multiplier" ONCHANGE="calculate(colour)">
                <OPTION SELECTED VALUE="1" STYLE="background: black; color: white">Black</OPTION>
                <OPTION VALUE="10" STYLE="background: brown; color: white">Brown</OPTION>
                <OPTION VALUE="100" STYLE="background: red; color: white">Red</OPTION>
                <OPTION VALUE="1000" STYLE="background: orange; color: white">Orange</OPTION>
                <OPTION VALUE="10000" STYLE="background: yellow; color: black">Yellow</OPTION>
                <OPTION VALUE="100000" STYLE="background: green; color: white">Green</OPTION>
                <OPTION VALUE="1000000" STYLE="background: blue; color: white">Blue</OPTION>
                <OPTION VALUE="0.1" STYLE="background: gold; color: black">Gold</OPTION>
                <OPTION VALUE="0.01" STYLE="background: silver; color: black">Silver</OPTION>
            </SELECT>
        </TD>
        <TD>
            <SELECT NAME="tolerance" ONCHANGE="calculate(colour)">
                <OPTION SELECTED VALUE="&Omega;  5%" STYLE="background: gold; color; black">Gold</OPTION>
                <OPTION VALUE="&Omega;  10%" STYLE="background: silver; color; black">Silver</OPTION>
                <OPTION VALUE="&Omega;  2%" STYLE="background: red; color; white">Red</OPTION>
                <OPTION VALUE="&Omega;  1%" STYLE="background: brown; color; white">Brown</OPTION>
            </SELECT>
        </TD>
    </TR>
</TABLE>
<BR>
<P ALIGN="center">
Resistance:
<INPUT TYPE="text" NAME="result">
<P ALIGN="center">
<INPUT TYPE="reset">
</FORM>
</BODY>
</HTML>

And here is the online version :)


All times are GMT. The time now is 03:09.

vBulletin® Version 3.8.8