Jan Ibrahim
Published © MIT

Build plate leveler

A bit more precise 3D resin printer build plate leveling device !

IntermediateProtip3 hours238
Build plate leveler

Things used in this project

Hardware components

M5Stack FIRE IoT Development Kit (PSRAM 2.0)
M5Stack FIRE IoT Development Kit (PSRAM 2.0)
×1
Grove - Round Force Sensor (FSR402)
Seeed Studio Grove - Round Force Sensor (FSR402)
×6
Arduino Sensor Measurement Shield
×1
Extend I/O Unit 2 (STM32F0)
M5Stack Extend I/O Unit 2 (STM32F0)
×1

Software apps and online services

M5Stack UI FLOW

Hand tools and fabrication machines

Soldering Iron Kit, Weller XNT/THM Tips
Soldering Iron Kit, Weller XNT/THM Tips

Story

Read more

Custom parts and enclosures

Photos

Schematics

img20230526124712_HrQo96UnC9.jpg

Code

Untitled file

MicroPython
from m5stack import *
from m5ui import *
from uiflow import *
import unit


setScreenColor(0x222222)
ext_io2_0 = unit.get(unit.EXT_IO2, unit.PORTA)






label0 = M5TextBox(232, 11, "label0", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label1 = M5TextBox(232, 124, "label1", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label2 = M5TextBox(152, 124, "label2", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label3 = M5TextBox(76, 124, "label3", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label6 = M5TextBox(29, 193, "BAT  LEVEL", lcd.FONT_DejaVu40, 0x0bef16, rotate=0)
label4 = M5TextBox(0, 124, "label4", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label5 = M5TextBox(8, 11, "label5", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)


ext_io2_0.init_i2c_address(0x45)
ext_io2_0.set_config_mode(0, 2)
ext_io2_0.set_config_mode(1, 2)
ext_io2_0.set_config_mode(2, 2)
ext_io2_0.set_config_mode(3, 2)
ext_io2_0.set_config_mode(4, 2)
ext_io2_0.set_config_mode(5, 2)
while True:
  label0.setText(str(ext_io2_0.read_adc8_pin(0)))
  label1.setText(str(ext_io2_0.read_adc8_pin(1)))
  label2.setText(str(ext_io2_0.read_adc8_pin(2)))
  label3.setText(str(ext_io2_0.read_adc8_pin(3)))
  label4.setText(str(ext_io2_0.read_adc8_pin(4)))
  label5.setText(str(ext_io2_0.read_adc8_pin(5)))
  label6.setText(str(power.getBatteryLevel()))
  wait_ms(2)

BUILD PLATE TENSION

MicroPython
The code is written in Micropython.
from m5stack import *
from m5ui import *
from uiflow import *
import unit


setScreenColor(0x222222)
ext_io2_0 = unit.get(unit.EXT_IO2, unit.PORTA)






label0 = M5TextBox(232, 11, "label0", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label1 = M5TextBox(232, 124, "label1", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label2 = M5TextBox(152, 124, "label2", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label3 = M5TextBox(76, 124, "label3", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label6 = M5TextBox(29, 193, "BAT  LEVEL", lcd.FONT_DejaVu40, 0x0bef16, rotate=0)
label4 = M5TextBox(0, 124, "label4", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label5 = M5TextBox(8, 11, "label5", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)


ext_io2_0.init_i2c_address(0x45)
ext_io2_0.set_config_mode(0, 2)
ext_io2_0.set_config_mode(1, 2)
ext_io2_0.set_config_mode(2, 2)
ext_io2_0.set_config_mode(3, 2)
ext_io2_0.set_config_mode(4, 2)
ext_io2_0.set_config_mode(5, 2)
while True:
  label0.setText(str(ext_io2_0.read_adc8_pin(0)))
  label1.setText(str(ext_io2_0.read_adc8_pin(1)))
  label2.setText(str(ext_io2_0.read_adc8_pin(2)))
  label3.setText(str(ext_io2_0.read_adc8_pin(3)))
  label4.setText(str(ext_io2_0.read_adc8_pin(4)))
  label5.setText(str(ext_io2_0.read_adc8_pin(5)))
  label6.setText(str(power.getBatteryLevel()))
  wait_ms(2)

Credits

Jan Ibrahim

Jan Ibrahim

4 projects • 21 followers

Comments