pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Earth

Example Program

from m5stack import *
from m5stack_ui import *
from uiflow import *
import unit

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
earth_0 = unit.get(unit.EARTH, unit.PORTB)

while True:
  print((str('Analog Value:') + str((earth_0.analogValue))))
  print((str('Digital Value:') + str((earth_0.digitalValue))))
  wait_ms(2)

Function Description

earth_0.analogValue
  • Gets the analog value from the specified Earth device.
earth_0.digitalValue
  • Gets the digital value from the specified Earth device.
On This Page