Prusa MK4 3D Printer Timelapse App with Kotlin | Capture Every Layer Change!

Поделиться
HTML-код
  • Опубликовано: 20 фев 2024
  • I made this Android app using Kotlin, it is designed for creating timelapse videos on 3D printers.
    This Kotlin-powered application, developed in Android Studio, seamlessly connects to your Prusa MK4 printer, capturing snapshots at every Z-layer change. 📸#3DPrinting #PrusaMK4 #KotlinApp
    Github[Source]: github.com/UpdateNinja/3D_Pri...
    Add this custom g code to prusa slicer after layer change:
    ;AFTER_LAYER_CHANGE
    G1 X5 Y205 F{travel_speed*60} ;Move away from the print
    G4 S0 ;Wait for move to finish
    M221 S0
    G4 P3000 ;Wait for 3000ms
    M221 S100
    ;[layer_z]
    Song : GOOD VIBE - twisterium [Free Copyright Music]

Комментарии • 15

  • @aantoniv
    @aantoniv 4 месяца назад

    This idea looks cool! Going to test it this week! Thanks for the open source ;)

    • @simplecad7462
      @simplecad7462  4 месяца назад

      Thanks! Let me know how it works for you, i have currently tested it only on Galaxy S21 and Android 13.0 . Some older phones with older android might have some issues.

  • @VikingVeteranArtisan
    @VikingVeteranArtisan 28 дней назад

    I am trying to do this. I understand the printer side, like in terms of the machine. The computer side i am oblivious to. I Have a few old phones i am using with Prusa Connect. Is there a way i can, in more simple ways have them talk. I'd love to see #PrusaSlicer have a feature to capture a picture directly and save it. I feel i read they may be working on it. I believe this could be the solution to both maybe?
    Thanks anyway this is an amazing start for my base knowledge, id love to help in and test you like the run with my equipment currently a few MK4s

  • @kennethsawyer7624
    @kennethsawyer7624 10 дней назад

    How does the detection for "parked" work? I'm wondering what kind of modifications to the per layer gcode I might need to do to get this working with an XL. Also as a side question, I have not really done much in the way of getting into/using APIs, looks like this is all just open communication (after sign in) to the printer itself, and the API is just working as a handshake between the two (phone is polling to see the status, and if in park, take photo?). I'm wondering if i could rig something up like this using a PC and webcam to do the same types of checks.

    • @simplecad7462
      @simplecad7462  10 дней назад +1

      Hi, you are correct you can read printer api data from. 192.168.100.xx/api/v1/status
      data is formatted JSON, so you can parse it and use how you like.
      You can use use this python code to read data from prusa using computer:
      import requests
      from requests.auth import HTTPDigestAuth
      import json
      import time
      URL = '192.168.xx.xx/api/v1/status'
      USERNAME = 'maker'
      PASSWORD = 'xxxxxxxxxxxxxxxxxxxx'
      while True:
      try:
      response = requests.get(URL, auth=HTTPDigestAuth(USERNAME, PASSWORD))
      if response.status_code == 200:
      try:
      data = json.loads(response.text)
      print(json.dumps(data, indent=4))
      except ValueError:
      print("Response content is not in JSON format.")
      print("Response content:", response.content)
      else:
      print(f"Request failed with status code {response.status_code}")
      except requests.exceptions.RequestException as e:
      print(f"An error occurred: {e}")
      time.sleep(2)

    • @kennethsawyer7624
      @kennethsawyer7624 10 дней назад

      @@simplecad7462 Dude! Thank you for an awesome starting point here. I know what my next project is.

  • @marcus.makes3d
    @marcus.makes3d 2 месяца назад

    Do the pictures get saved to the phone when they're taken? Sorry kinda a noob but really wanna get this setup on my mk4. Also does the phone have to be new? Like what version of Android does it need?

    • @simplecad7462
      @simplecad7462  2 месяца назад

      Pictures are saved on phone. You can try it, if android is too old it might not be able to save pictures because of android permission rules.

  • @jaydenjegachandran557
    @jaydenjegachandran557 3 месяца назад

    I'm a little confused on how to set it up

    • @simplecad7462
      @simplecad7462  2 месяца назад

      First you have to setup Prusa wifi normally and make sure you can connect printer from web browser. Setup custom g code as seen in the video, this works as trigger for taking picture. Then use app to connect printer

  • @IdahoDualSport
    @IdahoDualSport 4 месяца назад

    May I ask what phone mount are you using?

    • @simplecad7462
      @simplecad7462  4 месяца назад

      Hi, it is this from thinginverse: www.thingiverse.com/thing:2194278
      I modified it little bit so there is embedded magnets and it can be attached to metal enclosure.

    • @IdahoDualSport
      @IdahoDualSport 4 месяца назад

      Very cool, thank you! I'm going to try this out. I'll let you know how it goes.

    • @IdahoDualSport
      @IdahoDualSport 4 месяца назад +1

      @@simplecad7462 This entire setup works excellent! Thanks for sharing! Working on Motorola One Action w/ Android 10

    • @simplecad7462
      @simplecad7462  4 месяца назад

      @@IdahoDualSport Great to hear it works!