Browse Source

some ikea lack and octoprint stuff

Thomas Buck 3 years ago
parent
commit
01cdf17874

+ 19
- 0
input/projects/3d-printing/ikea-lack.md View File

37
 
37
 
38
 My design files for the filament holder [can be found on my Gitea server](https://git.xythobuz.de/thomas/3d-print-designs/src/branch/master/ikea-lack).
38
 My design files for the filament holder [can be found on my Gitea server](https://git.xythobuz.de/thomas/3d-print-designs/src/branch/master/ikea-lack).
39
 
39
 
40
+## Lights
41
+
42
+To be able to better see in-progress prints, I decided to mount some LED light strips to the bottom sides of the two upper tables.
43
+I am using 12V warm-white LED strips with 120 LEDs per meter.
44
+They are simply connected to the 12V power supply of the Fabrikator Mini.
45
+That was the easiest solution for now, although they flicker somewhat when the Fabrikator Mini is running.
46
+I have to think of another solution for that, probably a second power supply.
47
+
48
+<!--%
49
+lightgallery([
50
+    [ "img/lack_light_switches.png", "Design of my light switch mount" ],
51
+    [ "img/lack_lights_1.jpg", "Finished light switches" ],
52
+    [ "img/lack_lights_2.jpg", "Top level lights" ],
53
+    [ "img/lack_lights_3.jpg", "Bottom level lights" ]
54
+])
55
+%-->
56
+
57
+My design files for the light switch mount [can be found on my Gitea server](https://git.xythobuz.de/thomas/3d-print-designs/src/branch/master/ikea-lack).
58
+
40
 ## Concrete slab for noise and vibration dampening
59
 ## Concrete slab for noise and vibration dampening
41
 
60
 
42
 Unfortunately, because the Ikea Lack tables are very lightweight and also hollow, they tend to amplify the sound coming from the 3D printers on them.
61
 Unfortunately, because the Ikea Lack tables are very lightweight and also hollow, they tend to amplify the sound coming from the 3D printers on them.

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

153
 import time
153
 import time
154
 import RPi.GPIO as GPIO
154
 import RPi.GPIO as GPIO
155
 
155
 
156
-sleep_timeout = 1000
157
-sleep_toggle = 5.0
156
+hold_timeout = 2000
157
+sleep_toggle = 2000
158
 pin_button = 5
158
 pin_button = 5
159
 pin_power = 3
159
 pin_power = 3
160
 
160
 
166
 GPIO.setup(pin_power, GPIO.OUT, initial=GPIO.input(pin_power))
166
 GPIO.setup(pin_power, GPIO.OUT, initial=GPIO.input(pin_power))
167
 
167
 
168
 while True:
168
 while True:
169
-    channel = GPIO.wait_for_edge(pin_button, GPIO.FALLING, timeout=sleep_timeout)
169
+    channel = GPIO.wait_for_edge(pin_button, GPIO.FALLING)
170
     if channel is not None:
170
     if channel is not None:
171
-        GPIO.output(pin_power, not GPIO.input(pin_power))
172
-        time.sleep(sleep_toggle)
171
+        time.sleep(hold_timeout / 1000.0)
172
+        if not GPIO.input(pin_button):
173
+            GPIO.output(pin_power, not GPIO.input(pin_power))
174
+            time.sleep(sleep_toggle / 1000.0)
173
 
175
 
174
 GPIO.cleanup()
176
 GPIO.cleanup()
175
 </pre>
177
 </pre>
193
 
195
 
194
 <pre class="sh_sh">
196
 <pre class="sh_sh">
195
 sudo chmod a+x /etc/init.d/octopi-power-button
197
 sudo chmod a+x /etc/init.d/octopi-power-button
196
-sudo update-rc.d /etc/init.d/octopi-power-button defaults
198
+sudo update-rc.d octopi-power-button defaults
197
 sudo /etc/init.d/octopi-power-button
199
 sudo /etc/init.d/octopi-power-button
198
 </pre>
200
 </pre>
199
 
201
 
200
-Now every time you press the button (with a 5s debounce delay afterwards) the printer power will be toggled.
202
+Now simply hold your power button for two seconds and the printer power will be toggled.
201
 
203
 
202
 ### Automatic Photo Upload
204
 ### Automatic Photo Upload
203
 
205
 

BIN
static/img/lack_light_switches.png View File


BIN
static/img/lack_light_switches_small.png View File


BIN
static/img/lack_lights_1.jpg View File


BIN
static/img/lack_lights_1_small.jpg View File


BIN
static/img/lack_lights_2.jpg View File


BIN
static/img/lack_lights_2_small.jpg View File


BIN
static/img/lack_lights_3.jpg View File


BIN
static/img/lack_lights_3_small.jpg View File


Loading…
Cancel
Save