Ahork
Published © GPL3+

PUSH6060 ATOM RS485 Test

Pilot a Push6060 with ATOM and Tail485 with IUFLOW

BeginnerProtip1 hour2,814
PUSH6060 ATOM RS485 Test

Things used in this project

Hardware components

ATOM Lite ESP32 Development Kit
M5Stack ATOM Lite ESP32 Development Kit
×1
ATOM Tail485
M5Stack ATOM Tail485
×1
M5Stack 6060-PUSH
M5Stack 6060-PUSH
×1

Software apps and online services

M5Stack - UIFLOW

Story

Read more

Schematics

RS485

Code

Tail485 Pyhton

Python
from m5stack import *
from m5ui import *
from uiflow import *
import time






from numbers import Number

pos = None


def buttonA_wasReleased():
  global pos
  uart1.write(str((str('ID123:X') + str(((str(pos) + str('\r\n')))))))
  rgb.setColorAll(0x66ffff)
  pos = (pos if isinstance(pos, Number) else 0) + 1
  pass
btnA.wasReleased(buttonA_wasReleased)

def buttonA_pressFor():
  global pos
  uart1.write('ID123Z\r\n')
  pos = 0
  pass
btnA.pressFor(0.8, buttonA_pressFor)


uart1 = machine.UART(1, tx=26, rx=32)
uart1.init(9600, bits=8, parity=None, stop=1)
pos = 10
wait(1)
uart1.write('ID=123\\r\\n'+"\r\n")
rgb.setColorAll(0x6633ff)

Tail485

Credits

Ahork

Ahork

6 projects • 4 followers
Maker

Comments