Browse Source

add scroll-up button and anchor links with js and css

Thomas B 1 day ago
parent
commit
ff019b47a9

+ 1
- 1
input/blog/2022/2022_07_29_MCH2022.md View File

@@ -133,8 +133,8 @@ lightgallery([
133 133
 ])
134 134
 %-->
135 135
 
136
+<a class="anchor al2" name="app" href="#app"></a>
136 137
 ## Badge App Development
137
-<a class="anchor" name="app"></a>
138 138
 
139 139
 As is custromary for these events, every ticket-holder received an [MCH2022 Badge](https://badge.team/docs/badges/mch2022/) at the entrance.
140 140
 It contains a bunch of real nice gimmicks, like an FPGA and an RP2040 as well as an ESP32.

+ 1
- 1
input/blog/2023/2023_07_29_dampfmaschine.md View File

@@ -58,8 +58,8 @@ And here is one last look into the steam engine shed, affectionately called "Dam
58 58
 
59 59
 Another trip to the house will have to follow soon, to get all the smaller parts, tools, documents, etc.
60 60
 
61
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
61 62
 ## More Pictures
62
-<a class="anchor" name="more_pictures"></a>
63 63
 
64 64
 <div class="collapse">Some more photographs I didn't use above.</div>
65 65
 <div class="collapsecontent">

+ 1
- 1
input/blog/2023/2023_09_07_cccamp23.md View File

@@ -822,8 +822,8 @@ lightgallery([
822 822
 ])
823 823
 %-->
824 824
 
825
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
825 826
 ## More Pictures
826
-<a class="anchor" name="more_pictures"></a>
827 827
 
828 828
 <div class="collapse">Some more photographs I didn't use above.</div>
829 829
 <div class="collapsecontent">

+ 1
- 1
input/blog/2024/2024_03_09_toolbox_anniversary.md View File

@@ -37,8 +37,8 @@ lightgallery([
37 37
 We had a surprisingly large number of visitors.
38 38
 Hopefully this will help get things going again after the Covid dull.
39 39
 
40
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
40 41
 ## More Pictures
41
-<a class="anchor" name="more_pictures"></a>
42 42
 
43 43
 <div class="collapse">Some more photographs I didn't use above.</div>
44 44
 <div class="collapsecontent">

+ 1
- 1
input/projects/3d-printing/octoprint.md View File

@@ -134,8 +134,8 @@ systemctl list-units 'octoprint_connect*'
134 134
 journalctl -u octoprint_connect@ttyUSB0.service
135 135
 </pre>
136 136
 
137
+<a class="anchor al2" name="power_button" href="#power_button"></a>
137 138
 ## Physical Power Button
138
-<a class="anchor" name="power_button"></a>
139 139
 
140 140
 Besides controlling eg. an ATX power supply or a relay connecting the printer to the power supply, I also wanted a push-button connected to the Raspberry Pi that can toggle the power supply using the aforementioned connection on the Pi.
141 141
 This can be solved using a simple Python script.

+ 7
- 7
input/projects/3d-printing/sparkmaker_repair.md View File

@@ -32,8 +32,8 @@ lightgallery([
32 32
 * [Shelf Space (February 2023)](sparkmaker_repair.html#shelf_space)
33 33
 * [More Pictures](sparkmaker_repair.html#more_pictures)
34 34
 
35
+<a class="anchor al2" name="endstop" href="#endstop"></a>
35 36
 ## Endstop Fix
36
-<a class="anchor" name="endstop"></a>
37 37
 
38 38
 The printer only has a single axis, Z, with an optical endstop switch at the bottom.
39 39
 This switch is triggered by a large plastic shim screwed to the Z carriage.
@@ -48,8 +48,8 @@ lightgallery([
48 48
 ])
49 49
 %-->
50 50
 
51
+<a class="anchor al2" name="encoder" href="#encoder"></a>
51 52
 ## Encoder Replacement
52
-<a class="anchor" name="encoder"></a>
53 53
 
54 54
 After only a couple of hours of use, the encoder at the front of the machine stopped working properly.
55 55
 You can see this in the video below.
@@ -98,8 +98,8 @@ lightgallery([
98 98
 
99 99
 With the hardware back in working order I could now focus on the PC software side of things.
100 100
 
101
+<a class="anchor al2" name="experiments" href="#experiments"></a>
101 102
 ## First Slicing Experiments
102
-<a class="anchor" name="experiments"></a>
103 103
 
104 104
 After getting the hardware back running the next step is generating some sliced files.
105 105
 Unfortunately the official Sparkmaker website no longer exists and the downloads from there are hard to find.
@@ -130,8 +130,8 @@ lightgallery([
130 130
 Even though one corner was warping strongly, the results of the first print attempt were promising.
131 131
 It is an SA-profile keycap, sliced with ChituBox with 0.1mm layer height.
132 132
 
133
+<a class="anchor al2" name="script" href="#script"></a>
133 134
 ## SL1 to WOW File Format Converter Script
134
-<a class="anchor" name="script"></a>
135 135
 
136 136
 But there is one open-source alternative, [PrusaSlicer](https://github.com/prusa3d/PrusaSlicer), and it has support for SLA slicing for the [Prusa SL1 printer](https://www.prusa3d.com/product/original-prusa-sl1s-speed-3d-printer/).
137 137
 But it only produces `.sl1` files, their custom file format.
@@ -198,8 +198,8 @@ So G-Code always needs to take care to turn the LEDs off at the end of a print.
198 198
 For some reason we once managed to have the LEDs turned on with an error message showing.
199 199
 This requires draining the resin and scraping off any remaining bits.
200 200
 
201
+<a class="anchor al2" name="prusaslicer" href="#prusaslicer"></a>
201 202
 ## Configuring PrusaSlicer for the Sparkmaker
202
-<a class="anchor" name="prusaslicer"></a>
203 203
 
204 204
 To configure PrusaSlicer I recommend starting out with their built-in profile for the SL1.
205 205
 Selecting it as the machine automatically switches the program over into "SLA mode", where the support and pad generation work differently compared to the normal FDM mode.
@@ -263,8 +263,8 @@ lightgallery([
263 263
 ])
264 264
 %-->
265 265
 
266
+<a class="anchor al2" name="shelf_space" href="#shelf_space"></a>
266 267
 ## Shelf Space (February 2023)
267
-<a class="anchor" name="shelf_space"></a>
268 268
 
269 269
 I still had some drawer rails and a wooden plate left over from replacing my [Fabrikator Mini](fabrikator-mini.html) with my new [Laser Engraver](laser-engraver.html) in my [Ikea Lack tower](ikea-lack.html).
270 270
 So I decided to re-use these to properly store the Sparkmaker.
@@ -319,8 +319,8 @@ The only thing still missing is a good solution for curing / hardening.
319 319
 I'm thinking of some kind of small turntable and UV lamp or LED strip.
320 320
 That's still to come, so stay tuned! 🧐
321 321
 
322
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
322 323
 ## More Pictures
323
-<a class="anchor" name="more_pictures"></a>
324 324
 
325 325
 <div class="collapse">Some more photographs I didn't use above.</div>
326 326
 <div class="collapsecontent">

+ 1
- 1
input/projects/auto_brightness.md View File

@@ -193,8 +193,8 @@ lightgallery([
193 193
 ])
194 194
 %-->
195 195
 
196
+<a class="anchor al2" name="license" href="#license"></a>
196 197
 ## License
197
-<a class="anchor" name="license"></a>
198 198
 
199 199
 The [AutoBrightness project](https://git.xythobuz.de/thomas/AutoBrightness) is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
200 200
 

+ 10
- 10
input/projects/input_devices/trackball_v1.md View File

@@ -48,8 +48,8 @@ You can find everything you need to build it yourself in [the git repository](ht
48 48
  * [License](trackball_v1.html#license)
49 49
  * [More Pictures](trackball_v1.html#more_pictures)
50 50
 
51
+<a class="anchor al2" name="part_selection" href="#part_selection"></a>
51 52
 ## Part Selection
52
-<a class="anchor" name="part_selection"></a>
53 53
 
54 54
 Before embarking on this project some decisions and orders had to be made.
55 55
 
@@ -128,8 +128,8 @@ Therefore, if you only want to build a single trackball, it will be more expensi
128 128
 What you see on top is the actual price I paid for the parts, reduced to the amount required for a single device.
129 129
 Also some parts, like screws or 3D printing materials, I consider as normal parts of a workshop, so they are not added to the cost either.
130 130
 
131
+<a class="anchor al2" name="3d_design" href="#3d_design"></a>
131 132
 ## 3D Design
132
-<a class="anchor" name="3d_design"></a>
133 133
 
134 134
 The most important part of the 3D design is the mounting of the sensor and lens assembly in relation to the tracking surface, in our case the ball.
135 135
 The datasheet has lots of dimensional drawings which kind of hide all the important measurements somewhere in there.
@@ -179,8 +179,8 @@ Rendering takes ¾ of an hour on my machine.
179 179
 For development the `$fn` parameter can be set to a lower value.
180 180
 That helps somewhat.
181 181
 
182
+<a class="anchor al2" name="firmware_devel" href="#firmware_devel"></a>
182 183
 ## Firmware Development
183
-<a class="anchor" name="firmware_devel"></a>
184 184
 
185 185
 Before designing and printing the complete device I made a small test bed to hold the sensor and ball.
186 186
 
@@ -244,8 +244,8 @@ I simply reserved a bunch of memory in RAM that acts as the disk device.
244 244
 Before it is mounted by the user, the disk is formatted and filled with the required data.
245 245
 Then the host can mount it and read the files.
246 246
 
247
+<a class="anchor al2" name="wiring" href="#wiring"></a>
247 248
 ## Wiring
248
-<a class="anchor" name="wiring"></a>
249 249
 
250 250
 Wiring up the device is very easy, especially because the RP2040 provides great flexibility in its use of the GPIOs and the hardware periphery, in our case SPI.
251 251
 
@@ -276,8 +276,8 @@ GPIO 27 (pin 32)      -> Switch (right button)
276 276
 The switches use the internal pull-up resistors in the RP2040 GPIOs.
277 277
 So they should be wired active-low, with their common connection to GND.
278 278
 
279
+<a class="anchor al2" name="sensor_problems" href="#sensor_problems"></a>
279 280
 ## Sensor Problems
280
-<a class="anchor" name="sensor_problems"></a>
281 281
 
282 282
 With the firmware mostly done I hoped to be able to use the device immediately.
283 283
 But it didn't quite work.
@@ -331,8 +331,8 @@ Now all billard balls work fine, regardless of their colour.
331 331
 Even the white ball works without any problems.
332 332
 With the electronics and the firmware ready, we could now move on to refining the mechanics.
333 333
 
334
+<a class="anchor al2" name="first_prototype" href="#first_prototype"></a>
334 335
 ## First Prototype
335
-<a class="anchor" name="first_prototype"></a>
336 336
 
337 337
 The first top case was printed on Philipps [Anycubic Photon Mono 4K](https://www.anycubic.com/products/photon-mono-4k) SLA printer with [Anycubic Standard Resin + Grey](https://amzn.to/3RSLslf).
338 338
 This turned out to not be the best choice.
@@ -379,8 +379,8 @@ lightgallery([
379 379
 ])
380 380
 %-->
381 381
 
382
+<a class="anchor al2" name="improvements" href="#improvements"></a>
382 383
 ## Improvements
383
-<a class="anchor" name="improvements"></a>
384 384
 
385 385
 For the second iteration we didn't do that many changes in the 3D design.
386 386
 The button orientation has been overhauled.
@@ -434,8 +434,8 @@ lightgallery([
434 434
 ])
435 435
 %-->
436 436
 
437
+<a class="anchor al2" name="user_experience" href="#user_experience"></a>
437 438
 ## User Experience
438
-<a class="anchor" name="user_experience"></a>
439 439
 
440 440
 I have been using these Trackballs for about six weeks at the time of this writing.
441 441
 From a software and electronics perspective they work absolutely fine.
@@ -449,8 +449,8 @@ The second version, with some more thought put into the placement and orientatio
449 449
 But using a device each day that I've built completely myself, from the grounds up in pretty much all aspects, brings me a lot of joy.
450 450
 I highly recommend it.
451 451
 
452
+<a class="anchor al2" name="license" href="#license"></a>
452 453
 ## License
453
-<a class="anchor" name="license"></a>
454 454
 
455 455
 The Trackball is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
456 456
 
@@ -466,8 +466,8 @@ The Trackball is licensed under the [GNU General Public License](https://www.gnu
466 466
 
467 467
     See <http://www.gnu.org/licenses/>.
468 468
 
469
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
469 470
 ## More Pictures
470
-<a class="anchor" name="more_pictures"></a>
471 471
 
472 472
 <div class="collapse">Some more photographs I didn't use above.</div>
473 473
 <div class="collapsecontent">

+ 1
- 1
input/projects/lars.md View File

@@ -73,8 +73,8 @@ The software is not quite finished yet, but without access to the hardware I'm n
73 73
 
74 74
 [For now](lars_v2.html)...
75 75
 
76
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
76 77
 ## More Pictures
77
-<a class="anchor" name="more_pictures"></a>
78 78
 
79 79
 <div class="collapse">Some more photographs I didn't use above.</div>
80 80
 <div class="collapsecontent">

+ 14
- 14
input/projects/laser-engraver.md View File

@@ -40,8 +40,8 @@ lightgallery([
40 40
 * [Cutting Parameters](laser-engraver.html#cutting_parameters)
41 41
 * [More Pictures](laser-engraver.html#more_pictures)
42 42
 
43
+<a class="anchor al2" name="hardware" href="#hardware"></a>
43 44
 ## Hardware
44
-<a class="anchor" name="hardware"></a>
45 45
 
46 46
 I know I say this in a lot of articles here, probably in an attempt to justify my hoarding of electronic parts. 😳
47 47
 But this was even better than most of my previous projects, in the sense that I didn't have to buy any parts at all, except for the 2500mW 450nm laser diode, which I got used from my colleague [Philipp](https://www.phschoen.de/) for just 13€.
@@ -49,8 +49,8 @@ The rails I bought many years ago and never used.
49 49
 The steppers, mainboard, display, fans and cables came from my now disassembled [CTC i3](ctc-i3.html).
50 50
 Everything else came out of my parts bin.
51 51
 
52
+<a class="anchor al3" name="mechanics" href="#mechanics"></a>
52 53
 ### Mechanics
53
-<a class="anchor" name="mechanics"></a>
54 54
 
55 55
 The mechanism is based on the ["Cantilever Laser Engraver" by Meatball](https://www.printables.com/model/213526-cantilever-laser-engraver).
56 56
 This in turn is based on the ["Cantilever Laser Engraver" by GeoDave](https://www.thingiverse.com/thing:4605853).
@@ -91,8 +91,8 @@ lightgallery([
91 91
 ])
92 92
 %-->
93 93
 
94
+<a class="anchor al3" name="electronics" href="#electronics"></a>
94 95
 ### Electronics
95
-<a class="anchor" name="electronics"></a>
96 96
 
97 97
 As mentioned above I used the electronics, namely mainboard, LCD and fans, from my old 3D printer.
98 98
 
@@ -141,14 +141,14 @@ lightgallery([
141 141
 ])
142 142
 %-->
143 143
 
144
+<a class="anchor al2" name="software" href="#software"></a>
144 145
 ## Software
145
-<a class="anchor" name="software"></a>
146 146
 
147 147
 There's a surprisingly large amount of software involved in this project.
148 148
 All just to move a lamp around a bit 💡🤔
149 149
 
150
+<a class="anchor al3" name="mcu_firmware" href="#mcu_firmware"></a>
150 151
 ### MCU Firmware
151
-<a class="anchor" name="mcu_firmware"></a>
152 152
 
153 153
 Most DIY laser engravers or CNC machines seem to use the [GRBL firmware](https://github.com/gnea/grbl).
154 154
 Unfortunately this firmware only runs on Atmega328p MCUs, so I can not use it with the Atmega2560 on the GT2560 mainboard.
@@ -173,8 +173,8 @@ Using this I can generate G-Code where the object to cut starts at coordinates `
173 173
 
174 174
 My current Marlin configuration for the laser engraver can be found [on my Gitea instance](https://git.xythobuz.de/thomas/marlin/src/branch/laser-engraver).
175 175
 
176
+<a class="anchor al3" name="host_software" href="#host_software"></a>
176 177
 ### Host Software
177
-<a class="anchor" name="host_software"></a>
178 178
 
179 179
 Besides the microcontroller firmware, we also need some host software to prepare the G-Code from whatever kind of input file we start out with.
180 180
 There are two basic approaches for generating paths for the laser engraver.
@@ -192,8 +192,8 @@ But it is commercial paid software, not under any free software license, so [it
192 192
 
193 193
 Below I will try to document all different free software packages I tried for laser engraving.
194 194
 
195
+<a class="anchor al4" name="lasergrbl" href="#lasergrbl"></a>
195 196
 #### LaserGRBL
196
-<a class="anchor" name="lasergrbl"></a>
197 197
 
198 198
 The first solution I found out about is [LaserGRBL](https://lasergrbl.com/).
199 199
 It is a Windows-only program, but at least it is open-source / free software.
@@ -312,8 +312,8 @@ This is not possible when using LaserGRBL to import SVG vector paths.
312 312
 With them, the output will always start at coordinates `(0, 0)`.
313 313
 You will then have to set the proper offset on the machine itself, as described in the Marlin section above.
314 314
 
315
+<a class="anchor al4" name="inkscape" href="#inkscape"></a>
315 316
 #### Inkscape
316
-<a class="anchor" name="inkscape"></a>
317 317
 
318 318
 Inkscape includes the [G-Code Tools Plugin from the russian-language CNC-Club forums](https://www.cnc-club.ru/forum/viewtopic.php?t=35).
319 319
 Unfortunately I was not able to find much up-to-date english-language documentation for this.
@@ -323,8 +323,8 @@ I was able to get it to generate G-Code from a path, but not with any laser powe
323 323
 This section will be updated if I have more success in the future.
324 324
 Until then I'm just using Inkscape to export svg files for LaserGRBL.
325 325
 
326
+<a class="anchor al4" name="freecad" href="#freecad"></a>
326 327
 #### FreeCAD
327
-<a class="anchor" name="freecad"></a>
328 328
 
329 329
 FreeCAD has the [Path Workbench](https://wiki.freecadweb.org/Path_Workbench), which can be used to create G-Code instructions for all kinds of CNC machines.
330 330
 It is not really complete and fool-proof yet, unfortunately.
@@ -332,8 +332,8 @@ And it is also not designed for pure 2D machines, like laser engravers, by defau
332 332
 
333 333
 I have not yet tested that.
334 334
 
335
+<a class="anchor al4" name="g_code" href="#g_code"></a>
335 336
 #### Working with G-Code
336
-<a class="anchor" name="g_code"></a>
337 337
 
338 338
 One nice feature I saw in LaserGRBL, but was not able to use with Marlin, is the ability to draw the outline of the object to be cut, for positioning of the stock material.
339 339
 So I quickly made up a small Python script that analyzes a G-Code file, taking the coordinates from all G1 cutting moves and generating their bounding box, which is then drawn on the lowest possible power setting multiple times.
@@ -428,8 +428,8 @@ I also still had the text not aligned properly.
428 428
 The 3x1 and 3x3 runs on the left side were made after properly focussing the laser and fixing the text alignment.
429 429
 Here 200mm/min with 10 iterations was already enough to cut through the 3mm plywood.
430 430
 
431
+<a class="anchor al2" name="cutting_tests" href="#cutting_tests"></a>
431 432
 ## Cutting Tests
432
-<a class="anchor" name="cutting_tests"></a>
433 433
 
434 434
 For the first 'real' test I decided to cut the assembly jig for the [Pagoda antenna](https://www.maartenbaert.be/quadcopters/antennas/pagoda-antenna/#design-files) by Maarten Baert.
435 435
 The files are available in dxf and svg format.
@@ -474,8 +474,8 @@ lightgallery([
474 474
 The end-result does not seem to be really affected by this however, although with 200mm/min and 15 iterations the parts were not removable as easily as I hoped.
475 475
 So I think I either have to adjust the focus better or go up to 20 iterations for the 3mm birch plywood.
476 476
 
477
+<a class="anchor al2" name="future_improvements" href="#future_improvements"></a>
477 478
 ## Future Improvements
478
-<a class="anchor" name="future_improvements"></a>
479 479
 
480 480
 I didn't expect it to be this bad, but cutting wood really produces a noticeable amount of smoke and the smell of burnt wood.
481 481
 So in the long run I will have to add some kind of air filtration system to my Ikea Lack tower.
@@ -488,8 +488,8 @@ I also came across the [LaserWeb project](https://laserweb.yurl.ch/) which seems
488 488
 This would be a very useful addition and solve a lot of the software workflow problems illustrated above.
489 489
 Also theres more than enough room left on my base plate for a SBC.
490 490
 
491
+<a class="anchor al2" name="cutting_parameters" href="#cutting_parameters"></a>
491 492
 ## Cutting Parameters
492
-<a class="anchor" name="cutting_parameters"></a>
493 493
 
494 494
 Here are the results of all cutting tests I've made up to now.
495 495
 I will update this table as soon as I gather new data 🧑‍🔬
@@ -508,8 +508,8 @@ tableHelper([ "align-right", "align-right", "align-right", "align-right", "align
508 508
 )
509 509
 %-->
510 510
 
511
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
511 512
 ## More Pictures
512
-<a class="anchor" name="more_pictures"></a>
513 513
 
514 514
 <div class="collapse">Some more photographs I didn't use above.</div>
515 515
 <div class="collapsecontent">

+ 1
- 1
input/projects/ledmatrix_v2.md View File

@@ -196,8 +196,8 @@ lightgallery([
196 196
 I haven't yet given up that plan completely, but I have to think of a solution for diffusing the light first.
197 197
 The LEDs are too small and spaced too far apart to look good in this configuration.
198 198
 
199
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
199 200
 ## More Pictures
200
-<a class="anchor" name="more_pictures"></a>
201 201
 
202 202
 <div class="collapse">Some more photographs I didn't use above.</div>
203 203
 <div class="collapsecontent">

+ 2
- 2
input/projects/nas_2018.md View File

@@ -158,8 +158,8 @@ In the end I have to admit I've given up.
158 158
 To be honest, I don't really need the faster speeds.
159 159
 But if anyone has suggestions, I'm open to try it again!
160 160
 
161
+<a class="anchor al2" name="06_2022" href="#06_2022"></a>
161 162
 ## Four-Year Update (June 2022)
162
-<a class="anchor" name="06_2022"></a>
163 163
 
164 164
 Recently I was greeted by this log message in the TrueNAS web UI.
165 165
 
@@ -178,8 +178,8 @@ lightgallery([
178 178
 Unfortunately hard disk prices are still high and I'm currently not able to afford two new drives.
179 179
 So for now I'm making sure I have a [working backup](2022_06_06_hetzner_storage_box.html) and hope for the best 😅
180 180
 
181
+<a class="anchor al2" name="ups_dead" href="#ups_dead"></a>
181 182
 ## UPS Battery Dead (May 2023)
182
-<a class="anchor" name="ups_dead"></a>
183 183
 
184 184
 To operate the server more safely I bought an [APC Back-UPS 700](https://www.apc.com/de/de/product/BX700U-GR/apc-backups-700-va-230-v-avr-schukoausg%C3%A4nge-batterie-12v-7-0ah-wird-ersetzt-durch-bx750migr/) back when I built it.
185 185
 Sometime in 2022 I started getting alerts from the APC daemon that the battery needs to be replaced.

+ 10
- 10
input/projects/openchrono.md View File

@@ -55,8 +55,8 @@ You can find everything you need to build it yourself in [the git repository](ht
55 55
  * [License](openchrono.html#license)
56 56
  * [More Pictures](openchrono.html#more_pictures)
57 57
 
58
+<a class="anchor al2" name="prototype" href="#prototype"></a>
58 59
 ## Prototype
59
-<a class="anchor" name="prototype"></a>
60 60
 
61 61
 Because the optical sensing is dependent on environment conditions I decided to not do any breadboard prototyping and immediately went ahead and designed a case to test with.
62 62
 In this initial attempt I used an Arduino Nano, an SSD1306 128x64 OLED LCD and an AA-battery holder, all of which I still had left from other projects.
@@ -99,8 +99,8 @@ I think it makes sense to drive the LEDs at their current limit, so ~20mA.
99 99
 Also the pull-up resistors for the transistors need their value to be low enough to quickly drive the signal to near supply voltage when the BB interrupts the light beam.
100 100
 A value of 1kΩ seems to work well there.
101 101
 
102
+<a class="anchor al2" name="mounting_options" href="#mounting_options"></a>
102 103
 ## Mounting Options
103
-<a class="anchor" name="mounting_options"></a>
104 104
 
105 105
 Unfortunately the OpenChrono IR photo-sensing is a bit constrained in regards to the path of the BB.
106 106
 The sensors are only 3mm wide, and the BBs are 6mm wide commonly.
@@ -141,8 +141,8 @@ lightgallery([
141 141
 ])
142 142
 %-->
143 143
 
144
+<a class="anchor al2" name="test_results" href="#test_results"></a>
144 145
 ## Test Results
145
-<a class="anchor" name="test_results"></a>
146 146
 
147 147
 Attaching the whole unit to a airsoft gun barrel turned out to be a bit tricky.
148 148
 
@@ -227,8 +227,8 @@ The power output of the two LEDs is simply not enough (`2 × 3V × 20mA = 120mW`
227 227
 
228 228
 So for now I do **not** recommend to build OpenChrono with the tracer option as it currently can be found in the repository.
229 229
 
230
+<a class="anchor al2" name="build_guide" href="#build_guide"></a>
230 231
 ## Build Guide
231
-<a class="anchor" name="build_guide"></a>
232 232
 
233 233
 Also take a look at [the "Hardware" section of the README.md](https://git.xythobuz.de/thomas/OpenChrono/src/branch/master/README.md#hardware).
234 234
 You can find detailed parts lists, schematic and wiring plan there as well.
@@ -429,8 +429,8 @@ If for some reason the hole through the device is not perfectly aligned with you
429 429
 In that case, you will not hit what you are aiming at!
430 430
 So beware of your environment, wear proper safety gear and start out with a short distance to your bullet stop, increasing only slowly as you are sure everything works as expected.
431 431
 
432
+<a class="anchor al2" name="firmware" href="#firmware"></a>
432 433
 ## Firmware
433
-<a class="anchor" name="firmware"></a>
434 434
 
435 435
 To achieve high measurement accuracy I used some of the hardware features of the AtMega328p MCU included in standard Arduinos.
436 436
 
@@ -614,8 +614,8 @@ This is very easy to implement using the great [u8g2 library](https://github.com
614 614
 If you're interested I recommend taking a look at [the code](https://git.xythobuz.de/thomas/OpenChrono/src/branch/master/firmware/OpenChrono).
615 615
 I think it should be relatively easy to understand and well commented 😅
616 616
 
617
+<a class="anchor al2" name="possible_future_improvements" href="#possible_future_improvements"></a>
617 618
 ## Possible Future Improvements
618
-<a class="anchor" name="possible_future_improvements"></a>
619 619
 
620 620
 As usual I was mostly using parts that I already had.
621 621
 That explains some strange design decisions, like using cylindrical screws for the battery compartment lid, which honestly look and feel ugly and stand out from the device.
@@ -629,8 +629,8 @@ I also don't think it's realistic to take this bulky device onto a field, but wh
629 629
 To be quite honest, I'm happy with the device as it is now.
630 630
 But I'm always open to feedback and pull requests of course, especially ones improving the tracer option 😉
631 631
 
632
+<a class="anchor al2" name="potential_other_uses" href="#potential_other_uses"></a>
632 633
 ## Potential Other Uses
633
-<a class="anchor" name="potential_other_uses"></a>
634 634
 
635 635
 One thing I'd like to talk about is using this device for measuring other things besides Airsoft BBs.
636 636
 It is definitely feasible to use OpenChrono to measure the speed of air rifle pellets, and this is something I would be interested in as well.
@@ -646,16 +646,16 @@ All the hot gases coming out of a real gun will probably also be problematic, bo
646 646
 
647 647
 But all this is not something I can or want to test, and I also do not recommend you do it, either! 👮
648 648
 
649
+<a class="anchor al2" name="links" href="#links"></a>
649 650
 ## Links
650
-<a class="anchor" name="links"></a>
651 651
 
652 652
 You can find [all the source code and design files for OpenChrono](https://git.xythobuz.de/thomas/OpenChrono) on my [Gitea instance](https://git.xythobuz.de).
653 653
 The project is also [mirrored on GitHub](https://github.com/xythobuz/OpenChrono).
654 654
 
655 655
 If you decide to build it yourself I would be interested in any kind of feedback!
656 656
 
657
+<a class="anchor al2" name="license" href="#license"></a>
657 658
 ## License
658
-<a class="anchor" name="license"></a>
659 659
 
660 660
 OpenChrono is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
661 661
 
@@ -674,8 +674,8 @@ OpenChrono is licensed under the [GNU General Public License](https://www.gnu.or
674 674
     You should have received a copy of the GNU General Public License
675 675
     along with OpenChrono.  If not, see <https://www.gnu.org/licenses/>.
676 676
 
677
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
677 678
 ## More Pictures
678
-<a class="anchor" name="more_pictures"></a>
679 679
 
680 680
 <div class="collapse">Some more photographs I didn't use above.</div>
681 681
 <div class="collapsecontent">

+ 6
- 6
input/projects/osci_music_player.md View File

@@ -40,8 +40,8 @@ Skip to the [interesting part](osci_music_player.html#hardware) then!
40 40
 * [Hardware](osci_music_player.html#hardware)
41 41
 * [Software](osci_music_player.html#software)
42 42
 
43
+<a class="anchor al2" name="introduction" href="#introduction"></a>
43 44
 ## Introduction
44
-<a class="anchor" name="introduction"></a>
45 45
 
46 46
 An oscilloscope usually displays one or more waveforms of an electrical signal.
47 47
 To achieve this a single dot is moved across the screen, with the voltage or amplitude of the signal controlling the vertical deflection (Y axis), and time controlling the horizontal deflection (X axis), meaning the dot automatically moves from left to right with a pre-configured speed.
@@ -70,8 +70,8 @@ lightgallery([
70 70
 ])
71 71
 %-->
72 72
 
73
+<a class="anchor al2" name="artists" href="#artists"></a>
73 74
 ## Artists
74
-<a class="anchor" name="artists"></a>
75 75
 
76 76
 To generate the proper sounds you usually need some kind of software or self-written code.
77 77
 Many people have already experimented with this, with small scripts running on a PC, or directly on a microcontroller.
@@ -98,8 +98,8 @@ lightgallery([
98 98
 ])
99 99
 %-->
100 100
 
101
+<a class="anchor al2" name="playback" href="#playback"></a>
101 102
 ## Playback
102
-<a class="anchor" name="playback"></a>
103 103
 
104 104
 So there are some technical challenges involved in playing these properly on an oscilloscope.
105 105
 
@@ -134,8 +134,8 @@ These are DC coupled, support 192kHz and are cheap and easy to get.
134 134
 Now the image finally looks like in the YouTube videos.
135 135
 The only problem is, this is supposed to be used and operated at Toolbox events, so it needs to be easy to use and kind of sturdy.
136 136
 
137
+<a class="anchor al2" name="oscisettings" href="#oscisettings"></a>
137 138
 ## Oscilloscope Settings
138
-<a class="anchor" name="oscisettings"></a>
139 139
 
140 140
 To get the proper picture out of your oscilloscope you need to set it up correctly.
141 141
 Every oscilloscope has its own kind of front panel buttons, but in general they all have more or less the same kind of settings.
@@ -166,8 +166,8 @@ lightgallery([
166 166
 ])
167 167
 %-->
168 168
 
169
+<a class="anchor al2" name="hardware" href="#hardware"></a>
169 170
 ## Hardware
170
-<a class="anchor" name="hardware"></a>
171 171
 
172 172
 We need to consider the environments this device will be used in.
173 173
 Both at the Toolbox anniversary, as well as the IBO fair, it will be displayed as part of a public show, with many people walking by and maybe stopping for a short time.
@@ -222,8 +222,8 @@ This worked relatively well.
222 222
 Just take care with the lid, it was quite hard in my case, causing it to crack when I tried to drill a hole that was too big.
223 223
 But some superglue saved the day.
224 224
 
225
+<a class="anchor al2" name="software" href="#software"></a>
225 226
 ## Software
226
-<a class="anchor" name="software"></a>
227 227
 
228 228
 I've been using the [Raspberry Pi OS (Legacy, 32bit) Lite](https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-12-06/2023-12-05-raspios-bullseye-armhf-lite.img.xz) image.
229 229
 Install it [as usual](https://www.raspberrypi.com/software/), set up a user account, wireless network connection and SSH login.

+ 1
- 1
input/projects/quadcopters/rc_equipment.md View File

@@ -95,8 +95,8 @@ lightgallery([
95 95
 ])
96 96
 %-->
97 97
 
98
+<a class="anchor al2" name="can_storage" href="#can_storage"></a>
98 99
 ## Ammo Can Battery Storage
99
-<a class="anchor" name="can_storage"></a>
100 100
 
101 101
 For far too long I stored all my LiPos in a cardboard box on a wooden shelf in my livingroom.
102 102
 After seeing one too many videos of LiPo fires, I decided to work on a solution for safe storage of the batteries outside, on my balcony. Like with the charger described right above this section, I decided to get some used ammo cans for this project.

+ 1
- 1
input/projects/smarthome/espenv.md View File

@@ -84,8 +84,8 @@ lightgallery([
84 84
 
85 85
 The source code can be found [on my Gitea server](https://git.xythobuz.de/thomas/esp-env).
86 86
 
87
+<a class="anchor al2" name="relais_update" href="#relais_update"></a>
87 88
 ## Relais Update (August 2022)
88
-<a class="anchor" name="relais_update"></a>
89 89
 
90 90
 After successfully using the first [4x relais board](https://amzn.to/3FQdOXB) I ordered to control my bathroom lights and fan for a couple of months, I decided to use two more of the same boards for my livingroom lights.
91 91
 This turned out to be quite the feat however.

+ 42
- 3
page.html View File

@@ -124,6 +124,9 @@ else:
124 124
             link = githubCommitBadge(page, True)
125 125
             if len(link) > 0:
126 126
                 print("<p>Recent activity on GitHub: " + link + "</p>")
127
+
128
+            if page.get("auto_toc", "false") == "true":
129
+                print('<p class="access_link" id="toc_toggle_wrap"></p>')
127 130
         %-->
128 131
         {{ __content__ }}
129 132
         <hr id="footbar">
@@ -137,6 +140,7 @@ else:
137 140
                 print('<hr>')
138 141
         %-->
139 142
     </div>
143
+    <div id="scroll_up"></div>
140 144
     <div id="footer">
141 145
         <a href="https://hg.sr.ht/~obensonne/poole">Poole</a>
142 146
         &middot;
@@ -159,7 +163,38 @@ else:
159 163
         </span>
160 164
     </div>
161 165
     <script type="text/javascript">
162
-        function loadPage() {
166
+        // helper to show or hide scroll-up-button depending on scroll position
167
+        function scroll_visibility() {
168
+            if ($(document).scrollTop() > 0) {
169
+                $("#scroll_up").show("fast");
170
+            } else {
171
+                $("#scroll_up").hide("fast");
172
+            }
173
+        }
174
+
175
+        function add_scroll_up() {
176
+            // don't show on short pages
177
+            if ($("html").outerHeight() <= $(window).height()) {
178
+                return;
179
+            }
180
+
181
+            // add button, initially hidden
182
+            $("<a>", {
183
+                text: "⌃",
184
+                id: "scroll_up_btn",
185
+                click: function() {
186
+                    window.scrollTo({ top: 0, behavior: 'smooth' });
187
+                    return false;
188
+                },
189
+            }).appendTo('#scroll_up');
190
+            $("#scroll_up").hide();
191
+
192
+            // register handler and set initial state
193
+            scroll_visibility();
194
+            $(window).scroll(scroll_visibility);
195
+        }
196
+
197
+        function prepare_syntax_highlighting() {
163 198
             // adapted from https://sourceforge.net/p/shjs/feature-requests/5/#0940
164 199
             $("pre[class^='sh_']").each(function() {
165 200
                 // wrap pre with div._sh
@@ -196,14 +231,18 @@ else:
196 231
 
197 232
             sh_highlightDocument('/js/sh/', '.min.js');
198 233
         }
234
+
235
+        function loadPage() {
236
+            add_scroll_up();
237
+            prepare_syntax_highlighting();
238
+        }
199 239
     </script>
200 240
     <script type="text/javascript" src="js/sh_main.js"></script>
201 241
     <script type="text/javascript" src="js/jquery.min.js"></script>
202 242
     <!--%
203 243
         if page.get("comments", "false") == "true":
204 244
             print('<script defer src="https://comments.xythobuz.de/js/commento.js"></script>')
205
-    %-->
206
-    <!--%
245
+
207 246
         if page.get("auto_toc", "false") == "true":
208 247
             print('<script defer src="js/auto_toc.js"></script>')
209 248
     %-->

+ 72
- 2
static/css/style.css View File

@@ -1,6 +1,10 @@
1 1
 @import "/css/sh_bright.min.css";
2 2
 @import "/css/sh_darkness.min.css" (prefers-color-scheme: dark);
3 3
 
4
+html {
5
+    scroll-behavior: smooth;
6
+}
7
+
4 8
 body {
5 9
     font-size: 1.2em;
6 10
     font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
@@ -53,7 +57,42 @@ a.anchor {
53 57
     display: block;
54 58
     position: relative;
55 59
     visibility: hidden;
56
-    top: -60px;
60
+    height: 0px;
61
+    top: -0.5rem;
62
+}
63
+
64
+a.anchor:link:after {
65
+    content: "🔗";
66
+    position: relative;
67
+    visibility: visible;
68
+    left: -1rem;
69
+    font-size: 0.8rem;
70
+}
71
+
72
+a.anchor.al2:link:after {
73
+    top: 2.2rem;
74
+}
75
+
76
+a.anchor.al3:link:after {
77
+    top: 1.8rem;
78
+}
79
+
80
+a.anchor.al4:link:after {
81
+    top: 1.9rem;
82
+}
83
+
84
+#scroll_up {
85
+    display: none;
86
+}
87
+
88
+#scroll_up_btn:hover {
89
+    text-decoration: underline;
90
+    cursor: pointer;
91
+}
92
+
93
+.access_link {
94
+    font-size: small;
95
+    display: none;
57 96
 }
58 97
 
59 98
 @media (min-height: 750px) {
@@ -68,7 +107,19 @@ a.anchor {
68 107
     }
69 108
 
70 109
     a.anchor {
71
-        top: -175px;
110
+        top: -5.5rem;
111
+    }
112
+
113
+    a.anchor.al2:link:after {
114
+        top: 7.2rem;
115
+    }
116
+
117
+    a.anchor.al3:link:after {
118
+        top: 6.8rem;
119
+    }
120
+
121
+    a.anchor.al4:link:after {
122
+        top: 6.9rem;
72 123
     }
73 124
 }
74 125
 
@@ -76,6 +127,17 @@ a.anchor {
76 127
     #content {
77 128
         width: 75%;
78 129
     }
130
+
131
+    #scroll_up {
132
+        display: block;
133
+        position: fixed;
134
+        left: 5%;
135
+        bottom: 0;
136
+    }
137
+
138
+    .access_link {
139
+        display: block;
140
+    }
79 141
 }
80 142
 
81 143
 @media (min-width: 1500px) {
@@ -83,6 +145,10 @@ a.anchor {
83 145
         width: 50%;
84 146
     }
85 147
 
148
+    #scroll_up {
149
+        left: 12.5%;
150
+    }
151
+
86 152
     #navbar {
87 153
         position: relative;
88 154
         left: 12.5%;
@@ -374,6 +440,10 @@ hr {
374 440
     border-radius: 0.125em;
375 441
 }
376 442
 
443
+a.anchor:link:after {
444
+    opacity: 0.666;
445
+}
446
+
377 447
 /* colors */
378 448
 
379 449
 :not(pre) > code {

+ 14
- 1
static/js/auto_toc.js View File

@@ -37,7 +37,7 @@ function generate_toc() {
37 37
         output += '<a href="#' + link + '">' + title + '</a>';
38 38
         output += '</li>';
39 39
 
40
-        $(this).after('<a class="anchor" name="' + link + '"></a>')
40
+        $(this).before('<a class="anchor al' + this_level + '" name="' + link + '" href="#' + link + '"></a>')
41 41
 
42 42
         counters[this_level - 2]++;
43 43
     });
@@ -47,4 +47,17 @@ function generate_toc() {
47 47
     $("#toc_wrap").html(output);
48 48
 }
49 49
 
50
+function register_toc_toggle() {
51
+    $("<a>", {
52
+        text: "toggle ToC visibility",
53
+        href: "",
54
+        id: "toc_toggle",
55
+        click: function() {
56
+            $("#toc_wrap").toggle("fast");
57
+            return false;
58
+        },
59
+    }).appendTo('#toc_toggle_wrap');
60
+}
61
+
50 62
 generate_toc();
63
+register_toc_toggle();

Loading…
Cancel
Save