-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
97 lines (94 loc) · 2.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<style>
input[type="text"]
{
width: 300px;
}
td {
padding: 10px;
border: 0;
}
</style>
<h2>Simple rectangular spiral footprint generator</h2>
<form onsubmit="return false;">
<table id="calculator" style="align:center; margin:0 auto 1em !important; width:auto;">
<tr>
<td>DPI</td>
<td><input type="text" id="dpi" value="2400" /></td>
<td>dpi</td>
</tr>
<tr>
<td>Margin</td>
<td><input type="text" id="margin" value="20" /></td>
<td>pixels</td>
</tr>
<tr>
<td>Turns</td>
<td><input type="text" id="turns" value="3" /></td>
<td></td>
</tr>
<tr>
<td>Antenna width</td>
<td><input type="text" id="ant_width" value="30" /></td>
<td>
<select id="ant_width_unit">
<option value="1.0" selected>mm</option>
<option value="0.0254">mil</option>
</select>
</td>
</tr>
<tr>
<td>Antenna height</td>
<td><input type="text" id="ant_height" value="20" /></td>
<td>
<select id="ant_height_unit">
<option value="1.0" selected>mm</option>
<option value="0.0254">mil</option>
</select>
</td>
</tr>
<tr>
<td>Track thickness</td>
<td><input type="text" id="cond_thickness" value="1.0" /></td>
<td>
<select id="cond_thickness_unit">
<option value="1.0">mm</option>
<option value="0.0254">mil</option>
<option value="0.03556" selected>oz</option>
</select>
</td>
</tr>
<tr>
<td>Track width</td>
<td><input type="text" id="cond_width" value="8" /></td>
<td>
<select id="cond_width_unit">
<option value="1.0">mm</option>
<option value="0.0254" selected>mil</option>
</select>
</td>
</tr>
<tr>
<td>Track spacing</td>
<td><input type="text" id="cond_spacing" value="8" /></td>
<td>
<select id="cond_spacing_unit">
<option value="1.0">mm</option>
<option value="0.0254" selected>mil</option>
</select>
</td>
</tr>
<tr>
<td>Calculated inductance</td>
<td><div id="ant_inductance"/></td>
<td>µH</td>
</tr>
<tr>
<td><input type="submit" id="generate" value="Generate!" onsubmit="" colspan="3" /></td>
</tr>
</table>
<br/><br/>
<br/><br/>
<a id="downloadLnk" href="nfc.png">Download PNG</a><br/>
<canvas id="canvas"/>
</form>
<script src="./nfc.js"></script>