pdf-icon

UIFlow Guide

UiFlow1 Blockly

Event

Unit

UiFlow1 Project

Atomic HDriver Base

Example

from m5stack import *
from m5ui import *
from uiflow import *
from base.HDriver import HDriver
import time

hdriver = HDriver()
print((str('Input Voltage: ') + str((hdriver.get_voltage()))))
while True:
  print((str('Motor Fault Status: ') + str((hdriver.get_status()))))
  hdriver.set_speed(100)
  wait(1)
  hdriver.set_speed(0)
  wait(1)
  hdriver.set_speed(-100)
  wait(1)
  hdriver.set_speed(0)
  wait(1)
  wait_ms(2)

API

from base.HDriver import HDriver
hdriver = HDriver()
  • Initialize Atomic H-Driver.
hdriver.get_status()
  • Get the current operating status:
    • 0: Fault
    • 1: OK
hdriver.get_voltage()
  • Read the input voltage value (V).
hdriver.set_speed(100)
  • Control motor speed:
    • Input range: -100 to +100, with 0 to stop.
On This Page
Example
API
Q&A
Submit a question
Select question category*
Arduino
MicroPython
UIFlow1
UIFlow2
EzData
M5Burner
Software
Hardware
Other
Product name
Product version
Question description*
(Supports pasting screenshots.)
Attachments
Add Files
Email*
Submit
OK

M5Stack Support

Hi, this is M5Stack Support. How can I help you today?