feat: sync micropython k210, nrf, robot and educore source configs
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,203 @@
|
||||
"""
|
||||
BOT51
|
||||
|
||||
Micropython library for the BOT51(ADC*7, Motor*2*2, Matrix12x12, on/off)
|
||||
=======================================================
|
||||
|
||||
#Preliminary composition 20230812
|
||||
|
||||
@dahanzimin From the Mixly Team
|
||||
"""
|
||||
import uframebuf
|
||||
from micropython import const
|
||||
|
||||
_BOT51_ADDRESS = const(0x26)
|
||||
_BOT5_ID = const(0x00)
|
||||
_BOT51_VBAT = const(0x01)
|
||||
_BOT51_PS = const(0x03)
|
||||
_BOT51_ALS = const(0x07)
|
||||
_BOT51_FLAG = const(0x0B)
|
||||
_BOT51_MOTOR = const(0x0C)
|
||||
_BOT51_LEDS = const(0x10)
|
||||
|
||||
class BOT51(uframebuf.FrameBuffer_Uincode):
|
||||
def __init__(self, i2c_bus, address=_BOT51_ADDRESS, brightness=0.8, font_address=0x3A0000, width=12, height=12):
|
||||
self._i2c= i2c_bus
|
||||
self._addr = address
|
||||
if self._rreg(_BOT5_ID) != 0x26:
|
||||
raise AttributeError("Cannot find a BOT51")
|
||||
self._buffer = bytearray((width + 7) // 8 * height)
|
||||
super().__init__(self._buffer, width, height, uframebuf.MONO_HMSB)
|
||||
self.reset()
|
||||
self.font(font_address)
|
||||
self.set_brightness(brightness)
|
||||
|
||||
def _wreg(self, reg, val):
|
||||
'''Write memory address'''
|
||||
self._i2c.writeto_mem(self._addr, reg, val.to_bytes(1, 'little'))
|
||||
|
||||
def _rreg(self, reg, nbytes=1):
|
||||
'''Read memory address'''
|
||||
self._i2c.writeto(self._addr, reg.to_bytes(1, 'little'))
|
||||
return self._i2c.readfrom(self._addr, nbytes)[0] if nbytes<=1 else self._i2c.readfrom(self._addr, nbytes)[0:nbytes]
|
||||
|
||||
def reset(self):
|
||||
"""Reset all registers to default state"""
|
||||
for reg in range(_BOT51_MOTOR, _BOT51_MOTOR + 28):
|
||||
self._wreg(reg, 0x00)
|
||||
|
||||
def shutdown(self, flag=True):
|
||||
"""This function is only available on battery power"""
|
||||
if flag:
|
||||
self._wreg(_BOT51_FLAG, (self._rreg(_BOT51_FLAG)) & 0XBF)
|
||||
else:
|
||||
self._wreg(_BOT51_FLAG, (self._rreg(_BOT51_FLAG)) | 0X40)
|
||||
|
||||
def get_brightness(self):
|
||||
return self._brightness
|
||||
|
||||
def set_brightness(self, brightness):
|
||||
if not 0.0 <= brightness <= 1.0:
|
||||
raise ValueError("Brightness must be a decimal number in the range: 0.0-1.0")
|
||||
self._brightness = brightness
|
||||
self._wreg(_BOT51_FLAG, round(15 * brightness) | (self._rreg(_BOT51_FLAG)) & 0xF0)
|
||||
|
||||
def direction(self, angle=0):
|
||||
'''set display direction '''
|
||||
if not 0 <= angle <= 3:
|
||||
raise ValueError("Direction must be a number in the range: 0~3")
|
||||
self._wreg(_BOT51_FLAG, angle << 4 | (self._rreg(_BOT51_FLAG)) & 0xCF)
|
||||
|
||||
def show(self):
|
||||
"""Refresh the display and show the changes."""
|
||||
self._i2c.writeto_mem(self._addr, _BOT51_LEDS, self._buffer)
|
||||
|
||||
def pwm(self, index, duty=None):
|
||||
"""Motor*2*2 PWM duty cycle data register"""
|
||||
if not 0 <= index <= 3:
|
||||
raise ValueError("Motor port must be a number in the range: 0~3")
|
||||
if duty is None:
|
||||
return self._rreg(_BOT51_MOTOR + index)
|
||||
else:
|
||||
if not 0 <= duty <= 255:
|
||||
raise ValueError("Duty must be a number in the range: 0~255")
|
||||
self._wreg(_BOT51_MOTOR + index, duty)
|
||||
|
||||
def motor(self, index, action, speed=0, atten=0.4):
|
||||
speed = round(max(min(speed, 100), -100) * atten)
|
||||
if action=="N":
|
||||
self.pwm(index * 2, 0)
|
||||
self.pwm(index * 2 + 1, 0)
|
||||
elif action=="P":
|
||||
self.pwm(index * 2, 255)
|
||||
self.pwm(index * 2 + 1, 255)
|
||||
elif action=="CW":
|
||||
if speed >= 0:
|
||||
self.pwm(index * 2, 0)
|
||||
self.pwm(index * 2 + 1, speed * 255 // 100)
|
||||
else:
|
||||
self.pwm(index * 2, - speed * 255 // 100)
|
||||
self.pwm(index * 2 + 1, 0)
|
||||
elif action=="CCW":
|
||||
if speed >= 0:
|
||||
self.pwm(index * 2, speed * 255 // 100)
|
||||
self.pwm(index * 2 + 1, 0)
|
||||
else:
|
||||
self.pwm(index * 2, 0)
|
||||
self.pwm(index * 2 + 1, - speed * 255 // 100)
|
||||
elif action=="NC":
|
||||
return round(self.pwm(index * 2) * 100 / 255 / atten), round(self.pwm(index * 2 + 1) * 100 / 255 / atten)
|
||||
else:
|
||||
raise ValueError('Invalid input, valid are "N","P","CW","CCW"')
|
||||
|
||||
def move(self, action, speed=100, atten=0.4):
|
||||
if action=="N":
|
||||
self.motor(0, "N")
|
||||
self.motor(1, "N")
|
||||
elif action=="P":
|
||||
self.motor(0, "P")
|
||||
self.motor(1, "P")
|
||||
elif action=="F":
|
||||
self.motor(0, "CCW", speed, atten)
|
||||
self.motor(1, "CW", speed, atten)
|
||||
elif action=="B":
|
||||
self.motor(0, "CW", speed, atten)
|
||||
self.motor(1, "CCW", speed, atten)
|
||||
elif action=="L":
|
||||
self.motor(0, "CW", speed, atten)
|
||||
self.motor(1, "CW", speed, atten)
|
||||
elif action=="R":
|
||||
self.motor(0, "CCW", speed, atten)
|
||||
self.motor(1, "CCW", speed, atten)
|
||||
else:
|
||||
raise ValueError('Invalid input, valid are "N","P","F","B","L","R"')
|
||||
|
||||
def read_bat(self, ratio=5/1023):
|
||||
'''Read battery power'''
|
||||
vbat= self._rreg(_BOT51_VBAT) << 2 | self._rreg(_BOT51_VBAT + 1) >> 6
|
||||
return round(vbat * ratio, 2)
|
||||
|
||||
def read_ps(self, index, ratio=100/1023):
|
||||
'''Read proximity sensor values'''
|
||||
if not 0 <= index <= 1:
|
||||
raise ValueError("Proximity sensor port must be a number in the range: 0,1")
|
||||
vps= self._rreg(_BOT51_PS + (1 - index) * 2) << 2 | self._rreg(_BOT51_PS + (1 - index) * 2 + 1) >> 6
|
||||
return round(vps * ratio, 2)
|
||||
|
||||
def read_als(self, index, ratio=100/255):
|
||||
'''Read light sensor values'''
|
||||
if not 0 <= index <= 3:
|
||||
raise ValueError("Light sensor port must be a number in the range: 0~3")
|
||||
vals= self._rreg(_BOT51_ALS + index)
|
||||
return round(vals * ratio)
|
||||
|
||||
"""Graph module"""
|
||||
HEART_SMALL=b'\x00\x00\x00\x00\x88\x00\xdc\x01\xfe\x03\xfe\x03\xfc\x01\xf8\x00p\x00 \x00\x00\x00\x00\x00'
|
||||
HEART=b'\x00\x00\x88\x00\xdc\x01\xfe\x03\xff\x07\xff\x07\xfe\x03\xfc\x01\xf8\x00p\x00 \x00\x00\x00'
|
||||
HAPPY=b'\x00\x00\x00\x00\x01\x08\x01\x08\x01\x08\x00\x00\x00\x00\x04\x02\x08\x01\x90\x00`\x00\x00\x00'
|
||||
SAD=b'\x00\x00\x00\x00\x07\x0e\x00\x00\x00\x00\x00\x00\x00\x00`\x00\x90\x00\x08\x01\x04\x02\x00\x00'
|
||||
SMILE=b'\x00\x00\x00\x00\x01\x08\x03\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x03\x0c\x0e\x07\xf8\x01\x00\x00'
|
||||
SILLY=b'\x00\x00\x00\x00\x01\x08\x02\x04\x01\x08\x00\x00\x00\x00\xf8\x01\x08\x01\x90\x00`\x00\x00\x00'
|
||||
FABULOUS=b'\x00\x00\x01\x08\x02\x04\x03\x0c\x00\x00\x00\x00\xfe\x07\x02\x04\x02\x04\x04\x02\xf8\x01\x00\x00'
|
||||
SURPRISED=b'`\x00`\x00`\x00`\x00`\x00`\x00`\x00`\x00\x00\x00`\x00`\x00\x00\x00'
|
||||
ASLEEP=b'\x00\x00\x00\x00\x00\x00\x03\x0c\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x04\x02\xf8\x01\x00\x00'
|
||||
ANGRY=b'\x00\x00\x08\x01\x04\x02\x02\x04\x01\x08\x00\x00\x00\x00`\x00\x90\x00\x08\x01\x04\x02\x02\x04'
|
||||
CONFUSED=b'\xf0\x00\x98\x01\x0c\x03\x0c\x03\x00\x03\x80\x01\xc0\x00`\x00`\x00\x00\x00`\x00`\x00'
|
||||
NO=b'\x00\x00\x00\x00\x04\x02\x08\x01\x90\x00`\x00`\x00\x90\x00\x08\x01\x04\x02\x00\x00\x00\x00'
|
||||
YES=b'\x00\x00\x00\x00\x00\x0c\x00\x06\x00\x03\x80\x01\xc3\x00f\x00<\x00\x18\x00\x00\x00\x00\x00'
|
||||
LEFT_ARROW=b'\x00\x00\x00\x00\x10\x00\x08\x00\x04\x00\xfa\x07\x04\x00\x08\x00\x10\x00\x00\x00\x00\x00\x00\x00'
|
||||
RIGHT_ARROW=b'\x00\x00\x00\x00\x80\x00\x00\x01\x00\x02\xfe\x05\x00\x02\x00\x01\x80\x00\x00\x00\x00\x00\x00\x00'
|
||||
DRESS=b'\x00\x00\x00\x00\x88\x00\xfc\x01\xd8\x00\x70\x00\xa8\x00\x54\x01\xaa\x02\xfc\x01\x00\x00\x00\x00'
|
||||
TRANSFORMERS=b'\x00\x00\x40\x00\x40\x00\xb0\x01\x50\x01\x50\x01\x50\x01\xa0\x00\xa0\x00\x10\x01\x08\x02\x00\x00'
|
||||
SCISSORS=b'\x00\x00\x01\x04\x03\x06\x06\x03\x8c\x01\xd8\x00\x70\x00\x20\x00\xdc\x01\x52\x02\x52\x02\x8c\x01'
|
||||
EXIT=b'\x00\x00\xc0\x00\x40\x00\x70\x00\xe8\x00\x24\x03\x20\x00\x54\x00\x90\x00\x10\x01\x00\x02\x00\x00'
|
||||
TREE=b'\x00\x00\x20\x00\x70\x00\xf8\x00\xfc\x01\xfe\x03\xff\x07\x20\x00\x20\x00\x20\x00\x20\x00\x00\x00'
|
||||
PACMAN=b'\x00\x00\xfc\x01\x06\x02\x23\x01\x83\x00\x41\x00\x83\x00\x03\x01\x06\x02\xfc\x01\x00\x00\x00\x00'
|
||||
TARGET=b'\x00\x00\x00\x00\xf0\x01\x08\x02\x08\x02\x48\x02\x08\x02\x08\x02\xf0\x01\x00\x00\x00\x00\x00\x00'
|
||||
TSHIRT=b'\x10\x01\xe8\x02\x04\x04\x02\x08\x0c\x06\x08\x02\x08\x02\x08\x02\x08\x02\x08\x02\xf8\x03\x00\x00'
|
||||
ROLLERSKATE=b'\x00\x00\x3e\x00\x22\x00\x22\x00\xe2\x03\x02\x04\x02\x04\xfe\x07\x05\x0a\x07\x0e\x00\x00\x00\x00'
|
||||
DUCK=b'\x00\x00\x00\x00\x38\x00\x24\x00\x42\x00\x4f\x00\xc8\x0f\x08\x04\x08\x02\xf8\x01\x00\x00\x00\x00'
|
||||
HOUSE=b'\x00\x00\xfc\x03\x06\x06\x03\x0c\xf4\x02\x94\x02\x94\x02\xb4\x02\x94\x02\x94\x02\x00\x00\x00\x00'
|
||||
TORTOISE=b'\x00\x00\x60\x00\x68\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf8\x01\xf0\x00\x08\x01\x00\x00'
|
||||
BUTTERFLY=b'\x00\x00\x06\x03\x89\x04\x51\x04\xfe\x03\x70\x00\xa8\x00\x74\x01\x8a\x02\x06\x03\x00\x00\x00\x00'
|
||||
STICKFIGURE=b'\x20\x00\x50\x00\x50\x00\x20\x00\x20\x00\x70\x00\xa8\x00\x24\x01\x50\x00\x88\x00\x04\x01\x00\x00'
|
||||
GHOST=b'\x00\x00\xf8\x00\xac\x01\xac\x01\xac\x01\xfc\x01\xac\x01\xac\x01\x54\x01\xfc\x03\xfc\x07\x00\x00'
|
||||
PITCHFORK=b'\x00\x00\x00\x00\x00\x0f\x80\x00\x80\x00\xff\x0f\x80\x00\x80\x00\x00\x0f\x00\x00\x00\x00\x00\x00'
|
||||
MUSIC_QUAVERS=b'\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x01\xde\x03\x79\x0f\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
MUSIC_QUAVER=b'\xc0\x00\x40\x01\x40\x01\x40\x01\x40\x01\x40\x00\x40\x00\x58\x00\x7c\x00\x7e\x00\x3e\x00\x1c\x00'
|
||||
MUSIC_CROTCHET=b'\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x58\x00\x7c\x00\x7e\x00\x3e\x00\x1c\x00'
|
||||
COW=b'\x00\x00\x00\x00\x08\x00\x1e\x00\xfa\x03\xfe\x07\xfe\x0b\x18\x0b\x18\x03\x18\x03\x18\x03\x00\x00'
|
||||
RABBIT=b'\x50\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\x8c\x01\x04\x01\x54\x01\x04\x01\x24\x01\x74\x01\xf8\x00'
|
||||
SQUARE_SMALL=b'\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x00\x90\x00\x90\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
SQUARE=b'\xff\x0f\x01\x08\x01\x08\x01\x08\x01\x08\x01\x08\x01\x08\x01\x08\x01\x08\x01\x08\x01\x08\xff\x0f'
|
||||
DIAMOND_SMALL=b'\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\xa8\x00\x50\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
DIAMOND=b'\x00\x00\x00\x00\xfc\x01\x56\x03\xfb\x06\x76\x03\xac\x01\xd8\x00\x70\x00\x20\x00\x00\x00\x00\x00'
|
||||
CHESSBOARD=b'\x00\x00\x00\x00\xff\x07\x55\x05\xff\x07\x55\x05\xff\x07\x55\x05\xff\x07\x00\x00\x00\x00\x00\x00'
|
||||
TRIANGLE_LEFT=b'\x00\x00\x00\x00\x80\x00\xc0\x00\xe0\x00\xf0\x00\xe0\x00\xc0\x00\x80\x00\x00\x00\x00\x00\x00\x00'
|
||||
TRIANGLE=b'\x00\x00\x00\x00\x00\x00\x60\x00\xf0\x00\xf8\x01\xfc\x03\xfe\x07\xff\x0f\x00\x00\x00\x00\x00\x00'
|
||||
SNAKE=b'\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0a\x00\x0e\xf0\x03\xf8\x03\x1c\x00\x0e\x00\x00\x00\x00\x00'
|
||||
UMBRELLA=b'\x00\x00\x00\x00\x20\x00\xf8\x00\xfc\x01\xfe\x03\x20\x00\x20\x00\x20\x00\xa0\x00\x40\x00\x00\x00'
|
||||
SKULL=b'\x00\x00\x00\x00\xf8\x00\x24\x01\x22\x02\xde\x03\xfc\x01\x88\x00\x88\x00\xa8\x00\x70\x00\x00\x00'
|
||||
GIRAFFE=b'\xc0\x00\xc0\x01\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x78\x00\x48\x00\x48\x00\x48\x00'
|
||||
SWORD=b'\x00\x00\x00\x00\x00\x00\x04\x00\x0c\x00\xff\x07\xff\x07\x0c\x00\x04\x00\x00\x00\x00\x00\x00\x00'
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
"""
|
||||
MixGo CC -Onboard resources
|
||||
|
||||
MicroPython library for the MixGo CC -Onboard resources
|
||||
=======================================================
|
||||
|
||||
#Preliminary composition 20221010
|
||||
|
||||
dahanzimin From the Mixly Team
|
||||
"""
|
||||
|
||||
import time,gc
|
||||
from machine import Pin,SoftI2C,ADC,PWM,Timer,RTC
|
||||
|
||||
'''i2c-onboard'''
|
||||
onboard_i2c=SoftI2C(scl = Pin(6), sda = Pin(7), freq = 400000)
|
||||
|
||||
'''RTC'''
|
||||
rtc_clock=RTC()
|
||||
|
||||
'''ACC-Sensor'''
|
||||
try :
|
||||
import mxc6655xa
|
||||
onboard_acc = mxc6655xa.MXC6655XA(onboard_i2c)
|
||||
except Exception as e:
|
||||
print("Warning: Failed to communicate with MXC6655XA (ACC) or",e)
|
||||
|
||||
'''ALS_PS-Sensor'''
|
||||
try :
|
||||
import ltr553als
|
||||
onboard_als = ltr553als.LTR_553ALS(onboard_i2c)
|
||||
except Exception as e:
|
||||
print("Warning: Failed to communicate with TR_553ALS (ALS&PS) or",e)
|
||||
|
||||
#PS The previous version cancelled this feature
|
||||
# '''BPS-Sensor'''
|
||||
# try :
|
||||
# import hp203x
|
||||
# onboard_hp203x = hp203x.HP203X(onboard_i2c)
|
||||
# except Exception as e:
|
||||
# print("Warning: Failed to communicate with HP203X (BPS) or",e)
|
||||
|
||||
# '''THS-Sensor'''
|
||||
# try :
|
||||
# import ahtx0
|
||||
# onboard_ahtx0 = ahtx0.AHTx0(onboard_i2c)
|
||||
# except Exception as e:
|
||||
# print("Warning: Failed to communicate with AHTx0 (THS) or",e)
|
||||
|
||||
'''RFID-Sensor'''
|
||||
try :
|
||||
import rc522
|
||||
onboard_rfid = rc522.RC522(onboard_i2c)
|
||||
except Exception as e:
|
||||
print("Warning: Failed to communicate with RC522 (RFID) or",e)
|
||||
|
||||
'''ADC*7, Motor*2*2, Matrix12x12'''
|
||||
try :
|
||||
import bot51
|
||||
onboard_bot51 = bot51.BOT51(onboard_i2c)
|
||||
onboard_matrix = onboard_bot51
|
||||
except Exception as e:
|
||||
print("Warning: Failed to communicate with Bot51 (Matrix Motor ALS ADC..) or",e)
|
||||
|
||||
'''MGS-Sensor'''
|
||||
try :
|
||||
import mmc5603
|
||||
onboard_mgs = mmc5603.MMC5603(onboard_i2c)
|
||||
except Exception as e:
|
||||
print("Warning: Failed to communicate with MMC5603 (MGS) or",e)
|
||||
|
||||
'''2RGB_WS2812'''
|
||||
from ws2812 import NeoPixel
|
||||
onboard_rgb = NeoPixel(Pin(8), 4)
|
||||
|
||||
'''1Buzzer-Music'''
|
||||
from music import MIDI
|
||||
onboard_music =MIDI(10)
|
||||
|
||||
'''MIC_Sensor'''
|
||||
class MICSensor:
|
||||
def __init__(self,pin):
|
||||
self.adc=ADC(Pin(pin))
|
||||
self.adc.atten(ADC.ATTN_11DB)
|
||||
|
||||
def read(self):
|
||||
maxloudness = 0
|
||||
for i in range(5):
|
||||
loudness = self.sample()
|
||||
if loudness > maxloudness:
|
||||
maxloudness = loudness
|
||||
return maxloudness
|
||||
|
||||
def sample(self):
|
||||
values = []
|
||||
for i in range(50):
|
||||
val = self.adc.read_u16()
|
||||
values.append(val)
|
||||
return max(values) - min(values)
|
||||
|
||||
onboard_sound = MICSensor(4)
|
||||
|
||||
'''2Button'''
|
||||
class Button:
|
||||
def __init__(self, pin):
|
||||
self.pin = Pin(pin, Pin.IN, Pin.PULL_UP)
|
||||
self.flag = True
|
||||
|
||||
def get_presses(self, delay = 1):
|
||||
last_time,presses = time.time(), 0
|
||||
while time.time() < last_time + delay:
|
||||
time.sleep(0.05)
|
||||
if self.was_pressed():
|
||||
presses += 1
|
||||
return presses
|
||||
|
||||
def is_pressed(self):
|
||||
return not self.pin.value()
|
||||
|
||||
def was_pressed(self, flag = 0):
|
||||
if(self.pin.value() != self.flag):
|
||||
self.flag = self.pin.value()
|
||||
time.sleep(0.02)
|
||||
if self.flag:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def irq(self, handler, trigger):
|
||||
self.pin.irq(handler = handler, trigger = trigger)
|
||||
|
||||
button_a = Button(5)
|
||||
button_b = Button(9)
|
||||
|
||||
'''Reclaim memory'''
|
||||
gc.collect()
|
||||
@@ -0,0 +1,354 @@
|
||||
"""
|
||||
Mixbot-Onboard resources
|
||||
|
||||
Micropython library for the Mixbot-Onboard resources
|
||||
=======================================================
|
||||
|
||||
@dahanzimin From the Mixly Team
|
||||
"""
|
||||
|
||||
import time, gc, random, uframebuf
|
||||
from micropython import const
|
||||
from machine import Pin, SoftI2C, ADC, PWM, RTC
|
||||
|
||||
'''RTC'''
|
||||
rtc_clock=RTC()
|
||||
|
||||
'''2RGB_WS2812'''
|
||||
from ws2812 import NeoPixel
|
||||
onboard_rgb = NeoPixel(Pin(12), 2, default=1, timing=(450, 900, 850, 500))
|
||||
|
||||
'''1Buzzer-Music'''
|
||||
from music import MIDI
|
||||
onboard_music =MIDI(25)
|
||||
|
||||
spk_en = Pin(27, Pin.OUT)
|
||||
spk_en.value(0)
|
||||
|
||||
'''i2c-onboard & ext'''
|
||||
class I2C_device(SoftI2C):
|
||||
|
||||
CRC8_Table =b'\x00^\xbc\xe2a?\xdd\x83\xc2\x9c~ \xa3\xfd\x1fA\x9d\xc3!\x7f\xfc\xa2@\x1e_\x01\xe3\xbd>`\x82\xdc#}\x9f\xc1B\x1c\xfe\xa0\xe1\xbf]\x03\x80\xde<b\xbe\xe0\x02\\\xdf\x81c=|"\xc0\x9e\x1dC\xa1\xffF\x18\xfa\xa4\'y\x9b\xc5\x84\xda8f\xe5\xbbY\x07\xdb\x85g9\xba\xe4\x06X\x19G\xa5\xfbx&\xc4\x9ae;\xd9\x87\x04Z\xb8\xe6\xa7\xf9\x1bE\xc6\x98z$\xf8\xa6D\x1a\x99\xc7%{:d\x86\xd8[\x05\xe7\xb9\x8c\xd20n\xed\xb3Q\x0fN\x10\xf2\xac/q\x93\xcd\x11O\xad\xf3p.\xcc\x92\xd3\x8do1\xb2\xec\x0eP\xaf\xf1\x13M\xce\x90r,m3\xd1\x8f\x0cR\xb0\xee2l\x8e\xd0S\r\xef\xb1\xf0\xaeL\x12\x91\xcf-s\xca\x94v(\xab\xf5\x17I\x08V\xb4\xeai7\xd5\x8bW\t\xeb\xb56h\x8a\xd4\x95\xcb)w\xf4\xaaH\x16\xe9\xb7U\x0b\x88\xd64j+u\x97\xc9J\x14\xf6\xa8t*\xc8\x96\x15K\xa9\xf7\xb6\xe8\nT\xd7\x89k5'
|
||||
|
||||
def _crc8(self, buf):
|
||||
_sum = 0
|
||||
for i in range(0, len(buf)):
|
||||
_sum = self.CRC8_Table[_sum ^ buf[i]]
|
||||
return _sum
|
||||
|
||||
def read_device(self, addr, cmd, nbytes=1):
|
||||
buf = self.readfrom_mem(addr, cmd, nbytes+2)
|
||||
if self._crc8(buf[:-1]) == buf[-1]:
|
||||
return buf[1] if nbytes<=1 else buf[1:-1]
|
||||
|
||||
def write_device(self, addr, cmd, buf=0):
|
||||
buf = buf.to_bytes(1, 'little') if type(buf) is int else buf
|
||||
buf = bytearray([cmd, random.randint(0, 255)]) + buf
|
||||
crc8 = self._crc8(buf).to_bytes(1, 'little')
|
||||
self.writeto(addr, buf + crc8)
|
||||
if crc8 == self.readfrom(addr, 1):
|
||||
return True
|
||||
|
||||
onboard_i2c = I2C_device(scl=Pin(18), sda=Pin(23) , freq=400000)
|
||||
ext_i2c = I2C_device(scl=Pin(22), sda=Pin(21), freq=200000)
|
||||
|
||||
'''Version judgment'''
|
||||
if 0x68 in onboard_i2c.scan():
|
||||
version=1
|
||||
else:
|
||||
version=0
|
||||
|
||||
'''Accelerometer+Gyroscope'''
|
||||
if version:
|
||||
import icm42670
|
||||
acc_gyr = icm42670.ICM42670(onboard_i2c)
|
||||
|
||||
'''2-Button'''
|
||||
class Button:
|
||||
def __init__(self, pin, level=True):
|
||||
self._pin = Pin(pin, Pin.IN)
|
||||
self._flag = True
|
||||
self._level = level
|
||||
|
||||
def get_presses(self, delay = 1):
|
||||
last_time,presses = time.time(), 0
|
||||
while time.time() < last_time + delay:
|
||||
time.sleep(0.05)
|
||||
if self.was_pressed():
|
||||
presses += 1
|
||||
return presses
|
||||
|
||||
def is_pressed(self):
|
||||
return self._pin.value() == self._level
|
||||
|
||||
def was_pressed(self):
|
||||
if self._pin.value() != self._flag:
|
||||
time.sleep(0.01)
|
||||
self._flag = self._pin.value()
|
||||
return self._level if self._flag else not self._level
|
||||
|
||||
def irq(self, handler, trigger):
|
||||
self._pin.irq(handler = handler, trigger = trigger)
|
||||
|
||||
button_p = Button(34, True)
|
||||
button_a = Button(35, False)
|
||||
button_b = Button(39, False)
|
||||
|
||||
'''2-LED'''
|
||||
class LED:
|
||||
def __init__(self, pin):
|
||||
self._pin =PWM(Pin(pin), freq=5000, duty_u16=65535)
|
||||
self.setbrightness(0)
|
||||
|
||||
def setbrightness(self,val):
|
||||
if not 0 <= val <= 100:
|
||||
raise ValueError("Brightness must be in the range: 0-100%")
|
||||
self._brightness=val
|
||||
self._pin.duty_u16(val * 65535 // 100)
|
||||
|
||||
def getbrightness(self):
|
||||
return self._brightness
|
||||
|
||||
def setonoff(self,val):
|
||||
if(val == -1):
|
||||
self.setbrightness(100) if self._brightness < 50 else self.setbrightness(0)
|
||||
elif(val == 1):
|
||||
self.setbrightness(100)
|
||||
elif(val == 0):
|
||||
self.setbrightness(0)
|
||||
|
||||
def getonoff(self):
|
||||
return True if self._brightness > 0 else False
|
||||
|
||||
def value(self,val=None):
|
||||
if val is None:
|
||||
return self.getonoff()
|
||||
else:
|
||||
self.setbrightness(100) if val else self.setbrightness(0)
|
||||
|
||||
rled = LED(2)
|
||||
gled = LED(4)
|
||||
|
||||
'''3-ADCSensor'''
|
||||
class ADCSensor:
|
||||
def __init__(self, pin):
|
||||
self.adc=ADC(Pin(pin))
|
||||
self.adc.atten(ADC.ATTN_11DB)
|
||||
|
||||
def read(self):
|
||||
return self.adc.read_u16()
|
||||
|
||||
def voltage(self, scale=4.6):
|
||||
return round(self.adc.read_uv() * scale / 1000000, 2)
|
||||
|
||||
def loudness(self):
|
||||
values = []
|
||||
for i in range(200):
|
||||
val = self.adc.read_u16()
|
||||
values.append(val)
|
||||
return max(values) - min(values)
|
||||
|
||||
adc1 = ADCSensor(33)
|
||||
adc2 = ADCSensor(32)
|
||||
battery = ADCSensor(36)
|
||||
sound = ADCSensor(38)
|
||||
|
||||
'''4-FindLine /i2c'''
|
||||
class FindLine(object):
|
||||
|
||||
CORRECTING_WHITE = const(0x01)
|
||||
CORRECTING_BLACK = const(0x02)
|
||||
CORRECTING_RESET_TO_FAB = const(0x04)
|
||||
|
||||
def __init__(self, i2c_bus, addr=0x01):
|
||||
self._i2c = i2c_bus
|
||||
self._addr = addr
|
||||
self._data = (0,0,0,0)
|
||||
|
||||
def getdata(self):
|
||||
_buf = self._i2c.read_device(self._addr, 0x10, 4)
|
||||
if _buf:
|
||||
self._data = tuple(_buf)
|
||||
return self._data
|
||||
|
||||
def correct(self,type):
|
||||
'''type 0x01 校正白色 0x02 校正黑色 0x04 恢复出厂 '''
|
||||
if type not in [CORRECTING_WHITE, CORRECTING_BLACK, CORRECTING_RESET_TO_FAB]:
|
||||
raise ValueError('Invalid parameter')
|
||||
self._i2c.write_device(self._addr, 0xA0, type)
|
||||
|
||||
patrol = FindLine(onboard_i2c)
|
||||
|
||||
'''4-LEDmatrix /i2c'''
|
||||
class Matrix5x5(uframebuf.FrameBuffer_Ascall):
|
||||
|
||||
"""Graph module 5x5"""
|
||||
HEART = b'\n\x1f\x1f\x0e\x04'
|
||||
HEART_SMALL = b'\x00\n\x0e\x04\x00'
|
||||
HAPPY = b'\x00\n\x00\x11\x0e'
|
||||
SAD = b'\x00\n\x00\x0e\x11'
|
||||
SMILE = b'\x00\x00\x00\x11\x0e'
|
||||
SILLY = b'\x11\x00\x1f\x14\x1c'
|
||||
FABULOUS = b'\x1f\x1b\x00\n\x0e'
|
||||
SURPRISED = b'\n\x00\x04\n\x04'
|
||||
ASLEEP = b'\x00\x1b\x00\x0e\x00'
|
||||
ANGRY = b'\x11\n\x00\x1f\x15'
|
||||
CONFUSED = b'\x00\n\x00\n\x15'
|
||||
NO = b'\x11\n\x04\n\x11'
|
||||
YES = b'\x00\x10\x08\x05\x02'
|
||||
LEFT_ARROW = b'\x04\x02\x1f\x02\x04'
|
||||
RIGHT_ARROW = b'\x04\x08\x1f\x08\x04'
|
||||
DRESS = b'\n\x1b\x0e\x0e\x1f'
|
||||
TRANSFORMERS = b'\x04\x0e\x15\n\x11'
|
||||
SCISSORS = b'\x13\x0b\x04\x0b\x13'
|
||||
EXIT = b'\x04\x0e\x15\x0b\x10'
|
||||
TREE = b'\x04\x0e\x1f\x04\x04'
|
||||
PACMAN = b'\x1e\x0b\x07\x0f\x1e'
|
||||
TARGET = b'\x04\x0e\x1b\x0e\x04'
|
||||
TSHIRT = b'\x1b\x1f\x0e\x0e\x0e'
|
||||
ROLLERSKATE = b'\x18\x18\x1f\x1f\n'
|
||||
DUCK = b'\x06\x07\x1e\x0e\x00'
|
||||
HOUSE = b'\x04\x0e\x1f\x0e\n'
|
||||
TORTOISE = b'\x00\x0e\x1f\n\x00'
|
||||
BUTTERFLY = b'\x1b\x1f\x04\x1f\x1b'
|
||||
STICKFIGURE = b'\x04\x1f\x04\n\x11'
|
||||
GHOST = b'\x1f\x15\x1f\x1f\x15'
|
||||
PITCHFORK = b'\x15\x15\x1f\x04\x04'
|
||||
MUSIC_QUAVERS = b'\x1e\x12\x12\x1b\x1b'
|
||||
MUSIC_QUAVER = b'\x04\x0c\x14\x07\x07'
|
||||
MUSIC_CROTCHET = b'\x04\x04\x04\x07\x07'
|
||||
COW = b'\x11\x11\x1f\x0e\x04'
|
||||
RABBIT = b'\x05\x05\x0f\x0b\x0f'
|
||||
SQUARE_SMALL = b'\x00\x0e\n\x0e\x00'
|
||||
SQUARE = b'\x1f\x11\x11\x11\x1f'
|
||||
DIAMOND_SMALL = b'\x00\x04\n\x04\x00'
|
||||
DIAMOND = b'\x04\n\x11\n\x04'
|
||||
CHESSBOARD = b'\n\x15\n\x15\n'
|
||||
TRIANGLE_LEFT = b'\x01\x03\x05\t\x1f'
|
||||
TRIANGLE = b'\x00\x04\n\x1f\x00'
|
||||
SNAKE = b'\x03\x1b\n\x0e\x00'
|
||||
UMBRELLA = b'\x0e\x1f\x04\x05\x06'
|
||||
SKULL = b'\x0e\x15\x1f\x0e\x0e'
|
||||
GIRAFFE = b'\x03\x02\x02\x0e\n'
|
||||
SWORD = b'\x04\x04\x04\x0e\x04'
|
||||
|
||||
|
||||
def __init__(self, i2c_bus, addr=0x03, brightness=0.5):
|
||||
self._i2c = i2c_bus
|
||||
self._addr = addr
|
||||
self._brightness= brightness
|
||||
self._buffer = bytearray(5)
|
||||
super().__init__(self._buffer, 5, 5, uframebuf.MONO_HMSB)
|
||||
self.font("5x5")
|
||||
self.screenbright(self._brightness)
|
||||
self.clear()
|
||||
|
||||
def screenbright(self, brightness=None, background=0):
|
||||
if brightness is None :
|
||||
return self._brightness
|
||||
else:
|
||||
if not 0.0 <= brightness <= 1.0:
|
||||
raise ValueError("Brightness must be a decimal number in the range: 0.0-1.0")
|
||||
self._brightness = brightness
|
||||
self._i2c.write_device(self._addr, 0xA5, bytes([round(255 * brightness), round(255 * background)]))
|
||||
|
||||
def ambientbright(self):
|
||||
bright = self._i2c.read_device(self._addr, 0x10)
|
||||
if bright:
|
||||
return bright
|
||||
|
||||
def direction(self,mode = 0):
|
||||
'''set display direction '''
|
||||
self._i2c.write_device(self._addr, 0xA7, mode)
|
||||
|
||||
def show(self):
|
||||
'''Refresh the display and show the changes'''
|
||||
buf = bytearray(4)
|
||||
buf[0] = (self._buffer[4] & 0xF0) >> 4
|
||||
buf[1] = (self._buffer[3] & 0x1E) >> 1 | (self._buffer[4] & 0x0F) << 4
|
||||
buf[2] = (self._buffer[1] & 0x18) >> 3 | (self._buffer[2] & 0x1F) << 2 | (self._buffer[3] & 0x01) << 7
|
||||
buf[3] = (self._buffer[0] & 0x1F) | (self._buffer[1] & 0x07) << 5
|
||||
self._i2c.write_device(self._addr, 0xA1, buf)
|
||||
|
||||
def clear(self):
|
||||
''' clear display'''
|
||||
self._i2c.write_device(self._addr, 0xA6)
|
||||
|
||||
onboard_matrix = Matrix5x5(onboard_i2c)
|
||||
|
||||
'''2 Motor /i2c'''
|
||||
class Motor(object):
|
||||
|
||||
STOP_MODE = const(0x00)
|
||||
BRAKE_MODE = const(0x01)
|
||||
PWR_MODE = const(0x02)
|
||||
SPEED_MODE = const(0x03)
|
||||
TURNS_MODE = const(0x04)
|
||||
|
||||
def __init__(self, i2c_bus, addr=0x02, scale=90 * 4):
|
||||
self._i2c = i2c_bus
|
||||
self._addr = addr
|
||||
self._scale = scale
|
||||
self._signala = PWM(Pin(13), freq=500, duty_u16=49150)
|
||||
self._signalb = PWM(Pin(14), freq=500, duty_u16=49150)
|
||||
self._status = ((0,0,0,0), (0,0,0,0))
|
||||
self._motor = ([0,0], [0,0])
|
||||
|
||||
def _u2s(self, value, n=8):
|
||||
return value if value < (1 << (n-1)) else value - (1 << n)
|
||||
|
||||
def status(self):
|
||||
_buf = self._i2c.read_device(self._addr, 0x10, 9)
|
||||
if _buf:
|
||||
self._status = ((_buf[0] >> 4, -self._u2s(_buf[1]), -self._u2s(_buf[3]), abs(self._u2s(_buf[6] << 8 | _buf[5], 16))),
|
||||
(_buf[0] & 0x0F, self._u2s(_buf[2]), self._u2s(_buf[4]), abs(self._u2s(_buf[8] << 8 | _buf[7], 16))))
|
||||
return self._status
|
||||
|
||||
def run(self, idx, mode, value):
|
||||
if idx == 1 or idx == 2:
|
||||
self._motor[idx-1][0], self._motor[idx-1][1] = mode, value
|
||||
else:
|
||||
self._motor = ([mode, value], [mode, value])
|
||||
|
||||
buf = bytearray(5)
|
||||
m1_pwr_speed, m2_pwr_speed = 0, 0
|
||||
buf[0] = (self._motor[0][0] << 4) | self._motor[1][0]
|
||||
if self._motor[0][0] == self.TURNS_MODE:
|
||||
_turns = round(self._motor[0][1] * self._scale)
|
||||
buf[1] = (- _turns) & 0xFF
|
||||
buf[2] = ((- _turns) >> 8) & 0xFF
|
||||
else:
|
||||
m1_pwr_speed = - max(min(self._motor[0][1], 100), -100)
|
||||
if self._motor[1][0] == self.TURNS_MODE:
|
||||
_turns = round(self._motor[1][1] * self._scale)
|
||||
buf[3] = _turns & 0xFF
|
||||
buf[4] = (_turns >> 8) & 0xFF
|
||||
else:
|
||||
m2_pwr_speed = max(min(self._motor[1][1], 100), -100)
|
||||
|
||||
self._i2c.write_device(self._addr, 0xA0, buf)
|
||||
self._signala.duty_u16(33422 + 31457 * (m1_pwr_speed + 100) // 200)
|
||||
self._signalb.duty_u16(33422 + 31457 * (m2_pwr_speed + 100) // 200)
|
||||
|
||||
def move(self, action, mode, value=100):
|
||||
if action=="N":
|
||||
self.run(0, self.STOP_MODE, 0)
|
||||
elif action=="P":
|
||||
self.run(0, self.BRAKE_MODE, 0)
|
||||
elif action=="F":
|
||||
self.run(0, mode, value)
|
||||
elif action=="B":
|
||||
self.run(0, mode, -value)
|
||||
elif action=="L":
|
||||
self.run(1, mode, -value)
|
||||
self.run(2, mode, value)
|
||||
elif action=="R":
|
||||
self.run(1, mode, value)
|
||||
self.run(2, mode, -value)
|
||||
else:
|
||||
raise ValueError('Invalid input, valid are "N","P","F","B","L","R"')
|
||||
|
||||
motor = Motor(onboard_i2c)
|
||||
|
||||
'''Reclaim memory'''
|
||||
gc.collect()
|
||||
@@ -0,0 +1,44 @@
|
||||
"""
|
||||
Mixbot-EXT
|
||||
|
||||
Micropython library for the Mixbot-External integrated I2C equipment
|
||||
=======================================================
|
||||
|
||||
@dahanzimin From the Mixly Team
|
||||
"""
|
||||
import i2cdevice
|
||||
from mixbot import ext_i2c
|
||||
|
||||
'''Motor'''
|
||||
ext_motor = i2cdevice.Motor(ext_i2c)
|
||||
|
||||
'''Traffic light'''
|
||||
ext_traffic = i2cdevice.Traffic_LED(ext_i2c)
|
||||
|
||||
'''LED /RGBYW'''
|
||||
R_LED = i2cdevice.R_LED(ext_i2c)
|
||||
G_LED = i2cdevice.G_LED(ext_i2c)
|
||||
B_LED = i2cdevice.B_LED(ext_i2c)
|
||||
Y_LED = i2cdevice.Y_LED(ext_i2c)
|
||||
W_LED = i2cdevice.W_LED(ext_i2c)
|
||||
|
||||
'''button*5'''
|
||||
ext_button = i2cdevice.Buttonx5(ext_i2c)
|
||||
|
||||
'''collision sensor'''
|
||||
ext_collision = i2cdevice.Button(ext_i2c)
|
||||
|
||||
'''Infrared sensor'''
|
||||
ext_infrared = i2cdevice.Infrared(ext_i2c)
|
||||
|
||||
'''Potentiometer'''
|
||||
ext_potentiometer = i2cdevice.Dimmer(ext_i2c)
|
||||
|
||||
'''Color sensor'''
|
||||
ext_color = i2cdevice.Color_ID(ext_i2c)
|
||||
|
||||
'''Servo Motor'''
|
||||
ext_servo = i2cdevice.Motor_servo(ext_i2c)
|
||||
|
||||
'''Sonar'''
|
||||
ext_sonar = i2cdevice.Sonar(ext_i2c)
|
||||
@@ -0,0 +1,174 @@
|
||||
"""
|
||||
RM E1 -Onboard resources
|
||||
|
||||
MicroPython library for the RM E1 -Onboard resources
|
||||
=======================================================
|
||||
|
||||
#Preliminary composition 20220703
|
||||
|
||||
dahanzimin From the Mixly Team
|
||||
"""
|
||||
|
||||
import time,gc
|
||||
#import ble_handle
|
||||
from machine import Pin,SoftI2C,ADC,PWM,RTC
|
||||
|
||||
'''Bluetooth-handle'''
|
||||
#handle=ble_handle.Handle()
|
||||
|
||||
'''i2c-onboard'''
|
||||
onboard_i2c=SoftI2C(scl = Pin(22), sda = Pin(21), freq = 400000)
|
||||
|
||||
'''RTC'''
|
||||
rtc_clock=RTC()
|
||||
|
||||
'''ACC-Sensor'''
|
||||
class ACC:
|
||||
def __init__(self,i2c_bus):
|
||||
self._device = i2c_bus
|
||||
self._address = 0x09
|
||||
|
||||
def _rreg(self,nbytes):
|
||||
'''Read memory address'''
|
||||
return self._device.readfrom(self._address, nbytes)
|
||||
|
||||
def acceleration(self):
|
||||
data_reg=self._rreg(3)
|
||||
return data_reg[0],data_reg[1],data_reg[2] #返回x y轴数值(0~180)及晃动值
|
||||
|
||||
try :
|
||||
gyro=ACC(onboard_i2c)
|
||||
except Exception as e:
|
||||
print("Warning: Failed to communicate with ACC or",e)
|
||||
|
||||
'''2RGB_WS2812''' #color_chase(),rainbow_cycle()方法移至类里
|
||||
from ws2812 import NeoPixel
|
||||
onboard_rgb = NeoPixel(Pin(12), 2, default=1, timing=(450, 900, 850, 500))
|
||||
|
||||
'''3-Button'''
|
||||
class Button:
|
||||
def __init__(self, pin):
|
||||
self._pin = Pin(pin, Pin.IN)
|
||||
self._flag = True
|
||||
|
||||
def get_presses(self, delay = 1):
|
||||
last_time,presses = time.time(), 0
|
||||
while time.time() < last_time + delay:
|
||||
time.sleep(0.05)
|
||||
if self.was_pressed():
|
||||
presses += 1
|
||||
return presses
|
||||
|
||||
def is_pressed(self):
|
||||
return self._pin.value() == False
|
||||
|
||||
def was_pressed(self):
|
||||
if self._pin.value() != self._flag:
|
||||
time.sleep(0.01)
|
||||
self._flag = self._pin.value()
|
||||
if self._flag:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def irq(self, handler, trigger):
|
||||
self._pin.irq(handler = handler, trigger = trigger)
|
||||
|
||||
button_p = Button(35)
|
||||
button_cw = Button(39)
|
||||
button_ccw = Button(36)
|
||||
|
||||
'''3-ADCSensor'''
|
||||
class ADCSensor:
|
||||
def __init__(self, pin):
|
||||
self._adc=ADC(Pin(pin))
|
||||
self._adc.atten(ADC.ATTN_11DB)
|
||||
|
||||
def read(self):
|
||||
return self._adc.read_u16()
|
||||
|
||||
def voltage(self):
|
||||
return round(self._adc.read_uv()*4.6/1000000,2)
|
||||
|
||||
adc1=ADCSensor(32)
|
||||
adc2=ADCSensor(33)
|
||||
|
||||
'''ADC conflicts with WiFi'''
|
||||
try:
|
||||
battery=ADCSensor(26)
|
||||
except:
|
||||
class Clash:
|
||||
def voltage(self):
|
||||
print("Warning: battery power collection conflicts with WiFi")
|
||||
return None
|
||||
battery=Clash()
|
||||
|
||||
'''2-LED''' #Repair brightness adjustment range 0-100%
|
||||
class LED:
|
||||
def __init__(self, pin):
|
||||
self._pin =PWM(Pin(pin),freq=5000,duty_u16=0)
|
||||
self.setbrightness(0)
|
||||
|
||||
def value(self, val):
|
||||
self.setonoff(val)
|
||||
|
||||
def setbrightness(self,val):
|
||||
if not 0 <= val <= 100:
|
||||
raise ValueError("Brightness must be in the range: 0-100%")
|
||||
self._brightness=val
|
||||
self._pin.duty_u16(val*65535//100)
|
||||
|
||||
def getbrightness(self):
|
||||
return self._brightness
|
||||
|
||||
def setonoff(self,val):
|
||||
if(val == -1):
|
||||
self.setbrightness(100) if self._brightness<50 else self.setbrightness(0)
|
||||
elif(val == 1):
|
||||
self.setbrightness(100)
|
||||
elif(val == 0):
|
||||
self.setbrightness(0)
|
||||
|
||||
def getonoff(self):
|
||||
return True if self._brightness>0 else False
|
||||
|
||||
rled = LED(2)
|
||||
gled = LED(4)
|
||||
|
||||
'''3-Motor'''
|
||||
class Motor:
|
||||
def __init__(self, apin,bpin):
|
||||
self._apin =PWM(Pin(apin),freq=5000,duty_u16=65535)
|
||||
self._bpin =PWM(Pin(bpin),freq=5000,duty_u16=65535)
|
||||
self.motion("P")
|
||||
|
||||
def motion(self,action,speed=0):
|
||||
if action=="N":
|
||||
self._apin.duty_u16(0)
|
||||
self._bpin.duty_u16(0)
|
||||
elif action=="P":
|
||||
self._apin.duty_u16(65535)
|
||||
self._bpin.duty_u16(65535)
|
||||
elif action=="CW":
|
||||
if speed >=0:
|
||||
self._apin.duty_u16(speed*65535//100)
|
||||
self._bpin.duty_u16(0)
|
||||
else:
|
||||
self._apin.duty_u16(0)
|
||||
self._bpin.duty_u16(-speed*65535//100)
|
||||
elif action=="CCW":
|
||||
if speed >=0:
|
||||
self._apin.duty_u16(0)
|
||||
self._bpin.duty_u16(speed*65535//100)
|
||||
else:
|
||||
self._apin.duty_u16(-speed*65535//100)
|
||||
self._bpin.duty_u16(0)
|
||||
else:
|
||||
raise ValueError('Invalid input, valid are "N","P","CW","CCW"')
|
||||
|
||||
motor1=Motor(23,27)
|
||||
motor2=Motor(18,19)
|
||||
motor3=Motor(13,14)
|
||||
|
||||
'''Reclaim memory'''
|
||||
gc.collect()
|
||||
209
mixly/boards/default_src/micropython_robot/origin/config.json
Normal file
209
mixly/boards/default_src/micropython_robot/origin/config.json
Normal file
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"board": {
|
||||
"飞乙": {
|
||||
"key": "micropython:esp32c3:feiyi",
|
||||
"config": [
|
||||
{
|
||||
"key": "BurnSpeed",
|
||||
"label": "Burn Speed",
|
||||
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||
"options": [
|
||||
{
|
||||
"key": "921600",
|
||||
"label": "921600"
|
||||
},
|
||||
{
|
||||
"key": "115200",
|
||||
"label": "115200"
|
||||
},
|
||||
{
|
||||
"key": "230400",
|
||||
"label": "230400"
|
||||
},
|
||||
{
|
||||
"key": "921600",
|
||||
"label": "921600"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"超霸大师": {
|
||||
"key": "micropython:esp32:mixbot",
|
||||
"config": [
|
||||
{
|
||||
"key": "BurnSpeed",
|
||||
"label": "Burn Speed",
|
||||
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||
"options": [
|
||||
{
|
||||
"key": "460800",
|
||||
"label": "460800"
|
||||
},
|
||||
{
|
||||
"key": "115200",
|
||||
"label": "115200"
|
||||
},
|
||||
{
|
||||
"key": "230400",
|
||||
"label": "230400"
|
||||
},
|
||||
{
|
||||
"key": "921600",
|
||||
"label": "921600"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"机器人大师": {
|
||||
"key": "micropython:esp32:rm_e1",
|
||||
"config": [
|
||||
{
|
||||
"key": "BurnSpeed",
|
||||
"label": "Burn Speed",
|
||||
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||
"options": [
|
||||
{
|
||||
"key": "460800",
|
||||
"label": "460800"
|
||||
},
|
||||
{
|
||||
"key": "115200",
|
||||
"label": "115200"
|
||||
},
|
||||
{
|
||||
"key": "230400",
|
||||
"label": "230400"
|
||||
},
|
||||
{
|
||||
"key": "921600",
|
||||
"label": "921600"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"language": "MicroPython",
|
||||
"burn": {
|
||||
"type": "command",
|
||||
"portSelect": "all",
|
||||
"micropython:esp32c3:feiyi": {
|
||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud {baudrate} write_flash -e 0x0 \"{indexPath}/build/Mixgo_FeiYi_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||
},
|
||||
"micropython:esp32:rm_e1": {
|
||||
"command": "\"{esptool}\" --port {com} --baud {baudrate} write_flash -e 0x1000 \"{indexPath}/build/RM_E1_lib-v1.25.0.bin\""
|
||||
},
|
||||
"micropython:esp32:mixbot": {
|
||||
"command": "\"{esptool}\" --port {com} --baud {baudrate} write_flash -e 0x1000 \"{indexPath}/build/MixBot_lib-v1.25.0.bin\""
|
||||
}
|
||||
},
|
||||
"upload": {
|
||||
"type": "command",
|
||||
"portSelect": "all",
|
||||
"libPath": [
|
||||
"{indexPath}/build/lib",
|
||||
"{indexPath}/../micropython/build/lib"
|
||||
],
|
||||
"command": "\"{ampy}\" -p {com} -d 1 -r \"{reset}\" put \"{indexPath}/build/upload\"",
|
||||
"filePath": "{indexPath}/build/upload/main.py",
|
||||
"copyLib": false,
|
||||
"reset": [],
|
||||
"micropython:esp32c3:feiyi": {
|
||||
"reset": [
|
||||
{
|
||||
"dtr": false,
|
||||
"rts": true
|
||||
}, {
|
||||
"sleep": 300
|
||||
}, {
|
||||
"dtr": false,
|
||||
"rts": false
|
||||
}, {
|
||||
"sleep": 300
|
||||
}, {
|
||||
"dtr": false,
|
||||
"rts": true
|
||||
}, {
|
||||
"sleep": 300
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"nav": {
|
||||
"burn": true,
|
||||
"upload": true,
|
||||
"save": {
|
||||
"py": true
|
||||
},
|
||||
"setting": {
|
||||
"thirdPartyLibrary": true
|
||||
}
|
||||
},
|
||||
"serial": {
|
||||
"ctrlCBtn": true,
|
||||
"ctrlDBtn": true,
|
||||
"baudRates": 115200,
|
||||
"yMax": 100,
|
||||
"yMin": 0,
|
||||
"pointNum": 100,
|
||||
"rts": false,
|
||||
"dtr": false,
|
||||
"micropython:esp32c3:feiyi": {
|
||||
"rts": true,
|
||||
"dtr": false
|
||||
}
|
||||
},
|
||||
"lib": {
|
||||
"mixly": {
|
||||
"url": [
|
||||
"http://download.mixlylibs.cloud/mixly3-packages/cloud-libs/micropython_esp32/libs.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"pythonToBlockly": false,
|
||||
"web": {
|
||||
"devices": {
|
||||
"serial": true,
|
||||
"hid": true,
|
||||
"usb": false
|
||||
},
|
||||
"burn": {
|
||||
"erase": true,
|
||||
"micropython:esp32c3:feiyi": {
|
||||
"binFile": [
|
||||
{
|
||||
"offset": "0x0000",
|
||||
"path": "./build/Mixgo_FeiYi_lib-v1.25.0.bin"
|
||||
},
|
||||
{
|
||||
"offset": "0X3A0000",
|
||||
"path": "../micropython/build/HZK12.bin"
|
||||
}
|
||||
]
|
||||
},
|
||||
"micropython:esp32:rm_e1": {
|
||||
"binFile": [
|
||||
{
|
||||
"offset": "0x1000",
|
||||
"path": "./build/RM_E1_lib-v1.25.0.bin"
|
||||
}
|
||||
]
|
||||
},
|
||||
"micropython:esp32:mixbot": {
|
||||
"binFile": [
|
||||
{
|
||||
"offset": "0x1000",
|
||||
"path": "./build/MixBot_lib-v1.25.0.bin"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"upload": {
|
||||
"reset": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="uGqKi63f$[pop^hKypP1" x="-1001" y="-592"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="FHH/x5]5+}TTfa}bt86Y"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="display_show_image" id="[u/Naue89_y@6,YjhXgD"><value name="data"><shadow type="pins_builtinimg" id="5~FQ`HXtH_`)4@q@y(ve"><field name="PIN">onboard_matrix.HEART</field></shadow></value><next><block type="display_scroll_string" id="PI*+.P!__H]5wvX:H2]Y"><value name="data"><shadow type="text" id="chMg.kv52QGbBf(V=f@j"><field name="TEXT">你好,米思齐!</field></shadow></value></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKCgp3aGlsZSBUcnVlOgogICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXguSEVBUlQpCiAgICBvbmJvYXJkX21hdHJpeC5zY3JvbGwoJ+S9oOWlve+8jOexs+aAnem9kO+8gScpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="Y92z/{`.gz;J}`M=.GKR" x="-1330" y="-796"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="2;YwR]F1xOTONlO7KL#q"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="display_show_image" id="1kUoepa5ZB[(#n|zQeHd"><value name="data"><shadow type="pins_builtinimg" id="Q1vB]h2=OQYK.YE3HF24"><field name="PIN">onboard_matrix.HEART</field></shadow><block type="image_invert" id="!89R5{`I!CgIPA}MBOF6"><value name="A"><shadow type="pins_builtinimg" id="-.9qRrjmvA}Y`F8t?1vK"><field name="PIN">onboard_matrix.HEART</field></shadow></value></block></value><next><block type="display_scroll_string_delay" id="kQTH#[uq.u_$dN;ExJ*|"><value name="data"><shadow type="text" id="6+!W)dms}5McDcd1hB.0"><field name="TEXT">你好,米思齐!</field></shadow></value><value name="space"><shadow type="math_number" id="ZrxyprMF5P(lHP+b9Qa}"><field name="NUM">0</field></shadow></value><value name="time"><shadow type="math_number" id="@9ly.(RVM)ASg,[NoX{/"><field name="NUM">50</field></shadow></value></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKCgp3aGlsZSBUcnVlOgogICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXgubWFwX2ludmVydChvbmJvYXJkX21hdHJpeC5IRUFSVCkpCiAgICBvbmJvYXJkX21hdHJpeC5zY3JvbGwoJ+S9oOWlve+8jOexs+aAnem9kO+8gScsc3BlZWQgPTUwLHNwYWNlID0gMCkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="AHttj}5ip|/w|z*.h{bg" x="-851" y="-584"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id=")PoaY^s+nS|!^E0-OGPO"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="display_show_image" id="pHS[VOs$oL^F-jP(FgmF"><value name="data"><shadow type="pins_builtinimg" id="qQ9a*gKz)`Y?1T?z8Ca|"><field name="PIN">onboard_matrix.HEART</field></shadow></value><next><block type="controls_delay_new" id="$4|/v@+(EO8GR5,59jtf"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="e(Cq9tzZWp^klSdDnL3F"><field name="NUM">0.1</field></shadow></value><next><block type="display_show_image" id="dmNY5usE=i1K45?hbao5"><value name="data"><shadow type="pins_builtinimg" id="2!_@V`5(7i!^JKdr6N5G"><field name="PIN">onboard_matrix.HEART_SMALL</field></shadow></value><next><block type="controls_delay_new" id="Qv;dy$U5:!ikG|PBC8T;"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="1^SU[bFXRDi+Q*CKPmzc"><field name="NUM">0.1</field></shadow></value></block></next></block></next></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKaW1wb3J0IHRpbWUKCgp3aGlsZSBUcnVlOgogICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXguSEVBUlQpCiAgICB0aW1lLnNsZWVwKDAuMSkKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LkhFQVJUX1NNQUxMKQogICAgdGltZS5zbGVlcCgwLjEpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="display_scroll_string" id=";W#UhNJa|[M,;(~k^m5r" x="-847" y="-630"><value name="data"><shadow type="text" id="0!f}zDCL{JW@E[*0YWX0"><field name="TEXT">米思齐</field></shadow></value><next><block type="controls_whileUntil" id="qqp,TDeHLm7t_rcfG@D*"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id=",|nkAEUn}x.e6ivnUdOn"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="display_show_image" id="8Zq-dYg!N[~Snu^?SzU?"><value name="data"><shadow type="pins_builtinimg" id="H|vIaY0HN5uqdk/3Kshn"><field name="PIN">onboard_matrix.HEART</field></shadow></value><next><block type="controls_delay_new" id="(=cKv2v`]BPJ?O,Vu@$N"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="PF$s@b+YIR3#s~L!!|xJ"><field name="NUM">0.1</field></shadow></value><next><block type="display_show_image" id="[OdY~tWIo4.i?H=jd+k."><value name="data"><shadow type="pins_builtinimg" id="p=bKZR6=/;[N|mk):BR1"><field name="PIN">onboard_matrix.HEART_SMALL</field></shadow></value><next><block type="controls_delay_new" id="a:FlCAs;8^Qex*~opKo*"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="J|OAo1J1Aaj;poy/vkF]"><field name="NUM">0.1</field></shadow></value></block></next></block></next></block></next></block></statement></block></next></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKaW1wb3J0IHRpbWUKCgpvbmJvYXJkX21hdHJpeC5zY3JvbGwoJ+exs+aAnem9kCcpCndoaWxlIFRydWU6CiAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhvbmJvYXJkX21hdHJpeC5IRUFSVCkKICAgIHRpbWUuc2xlZXAoMC4xKQogICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXguSEVBUlRfU01BTEwpCiAgICB0aW1lLnNsZWVwKDAuMSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="iZUoKWXp}$l{AKc$#_/3" x="-1017" y="-593"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="]WIJwb)GKU`B^dT39h4V"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="1dyheY:uE@k*Ib:R+Cq|"><mutation else="1"></mutation><value name="IF0"><block type="sensor_mixgo_button_is_pressed" id="Ym=rt91Efp7An=+)ScHr"><value name="btn"><shadow type="pins_button" id="P8ha/m^2.Y0g?G6kgA,i"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="display_show_image" id="jKg2)cKgDn4:9^~y52!~"><value name="data"><shadow type="pins_builtinimg" id="Tdco83||Af}d8;tP.`mi"><field name="PIN">onboard_matrix.HEART</field></shadow></value></block></statement><statement name="ELSE"><block type="display_show_image" id="u[Fn!W/K^(`UR){qVrhT"><value name="data"><shadow type="pins_builtinimg" id="J#n97yGr2K]tOmxo15u!"><field name="PIN">onboard_matrix.HEART_SMALL</field></shadow></value></block></statement></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgoKd2hpbGUgVHJ1ZToKICAgIGlmIGZlaXlpLmJ1dHRvbl9hLmlzX3ByZXNzZWQoKToKICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhvbmJvYXJkX21hdHJpeC5IRUFSVCkKICAgIGVsc2U6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXguSEVBUlRfU01BTEwpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="KsN7THSsa/0vg-(g*+$R" x="-1059" y="-724"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="bCs?e|Mv]X~4I,-/*x|Y"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id=";S$ReQOw-C{y|b`{g6,n"><mutation elseif="2" else="1"></mutation><value name="IF0"><block type="logic_operation" id="bjh_Qf~V1iBAVKALW:ub"><field name="OP">AND</field><value name="A"><block type="sensor_mixgo_button_is_pressed" id="@5ytY2sZh77D|FYv^WlQ"><value name="btn"><shadow type="pins_button" id="Nm#G#`;Wl~8=h?Nq`~!e"><field name="PIN">button_a</field></shadow></value></block></value><value name="B"><block type="sensor_mixgo_button_is_pressed" id="Nv_@_OB.-*^,aQ~@f5$S"><value name="btn"><shadow type="pins_button" id="l]m+jNE:#IV+,ixQ[Epc"><field name="PIN">button_b</field></shadow></value></block></value></block></value><statement name="DO0"><block type="display_show_image" id=":2wy[|{83Mi54:7BlWc."><value name="data"><shadow type="pins_builtinimg" id="Y!r|3E2oNP#WDU}V8ur:"><field name="PIN">onboard_matrix.SAD</field></shadow></value></block></statement><value name="IF1"><block type="sensor_mixgo_button_is_pressed" id="6r+zM?zR1q*R32$D{Qn:"><value name="btn"><shadow type="pins_button" id="Pfm6Q_o[r}z5tlHIan!d"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO1"><block type="display_show_image" id="?`Y=SAS^2owRXC~0]E4("><value name="data"><shadow type="pins_builtinimg" id="L.|Q;-EK/l[E~bd`s.0K"><field name="PIN">onboard_matrix.HEART</field></shadow></value></block></statement><value name="IF2"><block type="sensor_mixgo_button_is_pressed" id="e``Gdf;_Hm-FsK9[6L8n"><value name="btn"><shadow type="pins_button" id="8!.S9C#;g,IR5$kh;rkx"><field name="PIN">button_b</field></shadow></value></block></value><statement name="DO2"><block type="display_show_image" id="J(L.8oC6H(;!rGgXyIYo"><value name="data"><shadow type="pins_builtinimg" id="{OQa?/3Q$!/a*YF~X{De"><field name="PIN">onboard_matrix.HEART_SMALL</field></shadow></value></block></statement><statement name="ELSE"><block type="display_show_image" id="/;b1S4c@C?Cf(Bq@OKeR"><value name="data"><shadow type="pins_builtinimg" id="O[`nL_yi;701COD0mwx$"><field name="PIN">onboard_matrix.SMILE</field></shadow></value></block></statement></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgoKd2hpbGUgVHJ1ZToKICAgIGlmIGZlaXlpLmJ1dHRvbl9hLmlzX3ByZXNzZWQoKSBhbmQgZmVpeWkuYnV0dG9uX2IuaXNfcHJlc3NlZCgpOgogICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LlNBRCkKICAgIGVsaWYgZmVpeWkuYnV0dG9uX2EuaXNfcHJlc3NlZCgpOgogICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LkhFQVJUKQogICAgZWxpZiBmZWl5aS5idXR0b25fYi5pc19wcmVzc2VkKCk6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXguSEVBUlRfU01BTEwpCiAgICBlbHNlOgogICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LlNNSUxFKQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="itY@[J*hE1T`}A|?~saF" x="-1059" y="-724"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="ymZ[aZBdyq-V(vVfz~/G"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_forEach" id="{iQC=r5k4@!LJsE+dJFx"><value name="LIST"><shadow type="list_many_input" id="uG(}g?ejgC(c3BVX05~-"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="DIlD~MFDbsARfn.L^U+?"><value name="FROM"><shadow type="math_number" id="KIf+137UbiJ;gv~va/d|"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="]AlA/tGGx={_]|r}tp/["><field name="NUM">4</field></shadow></value><value name="STEP"><shadow type="math_number" id="o~QCU3.^i))Po^@`IV@0"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="gQC#$!Q`@G]}eeK~udfb"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="actuator_onboard_neopixel_rgb" id="we+Paav#7s$dM-;7(g(("><value name="_LED_"><shadow type="math_number" id=";qO(^o|I34qsQr=d]zE_"><field name="NUM">0</field></shadow><block type="variables_get" id="{Q~,uM7dWi^bo$TReZ2L"><field name="VAR">i</field></block></value><value name="RVALUE"><shadow type="math_number" id="O,:y2Q2+pp|.j3]aT.Hj"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="LQf][5xKev|T_62R2f1i"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="o:N1u.v]-XG3Q*^5LScv"><field name="NUM">255</field></shadow></value><next><block type="actuator_onboard_neopixel_write" id="K,kf{=.0i9,]XZ]RB?:?"><next><block type="controls_delay_new" id="R|/]`|.aCoR9Q:.1X[~?"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="o[ycJ[Se1nZqUc8Yr,EW"><field name="NUM">0.5</field></shadow></value></block></next></block></next></block></statement><next><block type="actuator_onboard_neopixel_rgb_all" id="Tv[4Wdlfwu,c6MIM@A-Y"><value name="RVALUE"><shadow type="math_number" id="hI[|^?A2_]!?)x@K1NkX"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="7[29SzWFB)PjROJ.movZ"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="]T]{PdPsi0|z7k^KXs)c"><field name="NUM">0</field></shadow></value></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9yZ2IKaW1wb3J0IHRpbWUKCgp3aGlsZSBUcnVlOgogICAgZm9yIGkgaW4gcmFuZ2UoMCwgNCwgMSk6CiAgICAgICAgb25ib2FyZF9yZ2JbaV0gPSAoMCwgMCwgMjU1KQogICAgICAgIG9uYm9hcmRfcmdiLndyaXRlKCkKICAgICAgICB0aW1lLnNsZWVwKDAuNSkKICAgIG9uYm9hcmRfcmdiLmZpbGwoKDAsIDAsIDApKQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="YTw^S8|@;([7(fQ:v-#a" x="-1059" y="-724"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="bgi+*DK.SiM3/s7(WMu9"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_forEach" id="8t(JrIMaff,HFvKasr+Q"><value name="LIST"><shadow type="list_many_input" id="2Ynp6f-~@?0qe!absuX2"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="hg,.DyYa5P@tqkFgkiJ7"><value name="FROM"><shadow type="math_number" id=")ruAKJ+Qd*hD|wIZC~#Z"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id=":V5s;Mc0J/VBD1}*hJFU"><field name="NUM">4</field></shadow></value><value name="STEP"><shadow type="math_number" id="/h@hX4m+O]TPfoHW1GUz"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="aqxCnH|+|f9K.J}k4zs_"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="actuator_onboard_neopixel_rgb_all" id="7oLparaN0{t;tff;n#Rf"><value name="RVALUE"><shadow type="math_number" id=".P?f7)TUim,f$?6~|l*2"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="^a_t`-L|(Op_=6F7^0Io"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id=";8O9+qlY[sqS?Hvj!K1S"><field name="NUM">0</field></shadow></value><next><block type="actuator_onboard_neopixel_rgb" id="p7[Kd4SEZ+.Rphk5*22("><value name="_LED_"><shadow type="math_number" id="rWfXQ~Z=14$TzUVER,|Y"><field name="NUM">0</field></shadow><block type="variables_get" id="]p$9.LREH/YHH8EBY=v$"><field name="VAR">i</field></block></value><value name="RVALUE"><shadow type="math_number" id="W7Uc==-yyA4EP)p)Tv9A"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="gM*va]Lgq}[nE.4Mu{Qm"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="#d#W}01ZEhV:CEI`1GK`"><field name="NUM">255</field></shadow></value><next><block type="actuator_onboard_neopixel_write" id="m`^]cQY+~URGn.AhQ9Fn"><next><block type="controls_delay_new" id="|{piwbVF+}nv)o9jer2h"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="cP(AUyZD22{~d[[uJjQa"><field name="NUM">0.5</field></shadow></value></block></next></block></next></block></next></block></statement></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9yZ2IKaW1wb3J0IHRpbWUKCgp3aGlsZSBUcnVlOgogICAgZm9yIGkgaW4gcmFuZ2UoMCwgNCwgMSk6CiAgICAgICAgb25ib2FyZF9yZ2IuZmlsbCgoMCwgMCwgMCkpCiAgICAgICAgb25ib2FyZF9yZ2JbaV0gPSAoMCwgMCwgMjU1KQogICAgICAgIG9uYm9hcmRfcmdiLndyaXRlKCkKICAgICAgICB0aW1lLnNsZWVwKDAuNSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="snezJupoVr14_jYPQSx*" x="-1059" y="-724"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="c5Lz,0-0fi$P0?1rA0A5"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="275x@]bx*SR7G{Z_vbx."><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="a,k0_,Gl4/|UH1D(Y~V7"><value name="btn"><shadow type="pins_button" id="]~.F;KAQ|FI$RO3,hrgH"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="display_show_image" id="c?U0[abhVY(8F|aOqHAa"><value name="data"><shadow type="pins_builtinimg" id="$0[5wm?J4HjoNc6Q#J$M"><field name="PIN">onboard_matrix.HEART</field></shadow></value></block></statement><next><block type="controls_if" id="Du=fKvd@DF!(8)@Gx`5F"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="Vp{NLJOnRJ*,tXA^~0e}"><value name="btn"><shadow type="pins_button" id="dseZx1C2+Ql)=_^,2-X,"><field name="PIN">button_b</field></shadow></value></block></value><statement name="DO0"><block type="display_clear" id="8!~~vu2xDF]Zuo*amE*b"></block></statement></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgoKd2hpbGUgVHJ1ZToKICAgIGlmIGZlaXlpLmJ1dHRvbl9hLndhc19wcmVzc2VkKCk6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXguSEVBUlQpCiAgICBpZiBmZWl5aS5idXR0b25fYi53YXNfcHJlc3NlZCgpOgogICAgICAgIG9uYm9hcmRfbWF0cml4LmZpbGwoMCkKICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93KCkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="4mQM,UkE`,($aZAW~i{a" x="-1437" y="-624"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="faR7:)hNwMqwS8Y~-d1k"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="|d`WR[WWaC]!(lTWK2bL"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="!Y3(T/90O}DxF-jmYTz3"><value name="btn"><shadow type="pins_button" id="l(Hzu61=ROu`]wfd:~]I"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="do_while" id="+R~Dn]]r{bNE7yYwaZgw"><field name="type">true</field><statement name="input_data"><block type="display_show_image" id="(bqJpB6Ic8*:lkB@e/[?"><value name="data"><shadow type="pins_builtinimg" id=",uYq_v2q2g04N;xL$!|0"><field name="PIN">onboard_matrix.HEART</field></shadow></value></block></statement><value name="select_data"><block type="sensor_mixgo_button_was_pressed" id="k#(m0r#csrvTfv+woLAL"><value name="btn"><shadow type="pins_button" id="ocV;:;bav0(gHR-WrA0q"><field name="PIN">button_a</field></shadow></value></block></value><next><block type="display_clear" id="Jt(G+H!M|9GiA@|S$h,r"></block></next></block></statement></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgoKd2hpbGUgVHJ1ZToKICAgIGlmIGZlaXlpLmJ1dHRvbl9hLndhc19wcmVzc2VkKCk6CiAgICAgICAgd2hpbGUgVHJ1ZToKICAgICAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXguSEVBUlQpCiAgICAgICAgICAgIGlmIChmZWl5aS5idXR0b25fYS53YXNfcHJlc3NlZCgpKToKICAgICAgICAgICAgICAgIGJyZWFrCiAgICAgICAgb25ib2FyZF9tYXRyaXguZmlsbCgwKQogICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3coKQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="8h@zLvb79u`Th!4EP=Fg" x="-1054" y="-758"><field name="VAR">显示</field><value name="VALUE"><block type="logic_boolean" id="lK4jq0MV;HN}1wcIhjz`"><field name="BOOL">FALSE</field></block></value><next><block type="controls_whileUntil" id="o}oBTm5kQvm(~!hFKp5t"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="IlU;GLh4jOz_-.icQi1?"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="|ib?#C2gVKm=)E?Fx9SO"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="EobZxO51L`mPa|q6^nID"><value name="btn"><shadow type="pins_button" id="ymmX3bd6`,[FVPv{p]Vy"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="a0P7]3)8x$]hOQ7$Y_Y{"><field name="VAR">显示</field><value name="VALUE"><block type="logic_negate" id="p}Vx]l7t_WHiJS6VjF[="><value name="BOOL"><block type="variables_get" id="FQY7,~q$;ua0g,MMgd2a"><field name="VAR">显示</field></block></value></block></value></block></statement><next><block type="controls_if" id="iX^b7Q9~ig9jfpljBm8x"><mutation else="1"></mutation><value name="IF0"><block type="variables_get" id="S38jC.Y-96Lj0uLz#uKI"><field name="VAR">显示</field></block></value><statement name="DO0"><block type="display_show_image" id="QjX!sIsP2TFD~!oZJV8-"><value name="data"><shadow type="pins_builtinimg" id="e[{g;,bA[Qe@+JNIfQ9Y"><field name="PIN">onboard_matrix.HEART</field></shadow></value></block></statement><statement name="ELSE"><block type="display_clear" id="u{QyT4@s;H?R?c@),vX#"></block></statement></block></next></block></statement></block></next></block></xml><config>{}</config><code>aW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgoKX0U2Xzk4X0JFX0U3X0E0X0JBID0gRmFsc2UKd2hpbGUgVHJ1ZToKICAgIGlmIGZlaXlpLmJ1dHRvbl9hLndhc19wcmVzc2VkKCk6CiAgICAgICAgX0U2Xzk4X0JFX0U3X0E0X0JBID0gbm90IF9FNl85OF9CRV9FN19BNF9CQQogICAgaWYgX0U2Xzk4X0JFX0U3X0E0X0JBOgogICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LkhFQVJUKQogICAgZWxzZToKICAgICAgICBvbmJvYXJkX21hdHJpeC5maWxsKDApCiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvdygpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="8ov:nK7j!pDhKi9{!RT8" x="-1444" y="-789"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="E]oF=$MB-_kM|UobRNaW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="system_print" id="y;}chAYkn|K|~O;c{S1j"><value name="VAR"><shadow type="text" id="3[{K9(3}{zoUOb~=6vI("><field name="TEXT">Mixly</field></shadow><block type="sensor_sound" id="Vqj^dJ;q8DjGjVR#+dE."></block></value><next><block type="controls_delay_new" id="Xz6@j@MVjl?Sg+THwpyR"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="g40GtKS@xwlpoE8T/iyA"><field name="NUM">0.01</field></shadow></value></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9zb3VuZAppbXBvcnQgdGltZQoKCndoaWxlIFRydWU6CiAgICBwcmludChvbmJvYXJkX3NvdW5kLnJlYWQoKSkKICAgIHRpbWUuc2xlZXAoMC4wMSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="display_scroll_string" id="u[bPw)hI}4sgt.u+et#X" x="-1457" y="-840"><value name="data"><shadow type="text" id=",g~60inC6romYxbAI{oi"><field name="TEXT">看见声音</field></shadow></value><next><block type="controls_whileUntil" id="8ov:nK7j!pDhKi9{!RT8"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="E]oF=$MB-_kM|UobRNaW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_forEach" id="B7CSf.hU/p5fB?Z~schp"><value name="LIST"><shadow type="list_many_input" id="@.jCG$Kh`uOKmZgcR`Xq"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="(l|M=X~PTIacX{?9U`ti"><value name="FROM"><shadow type="math_number" id="X-Sk{IrjaliSk?i|xLr!"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="#X~1oUAjlHfUfxg`b37c"><field name="NUM">5</field></shadow><block type="text_to_number" id="0.JChiEi9udnc(?hdvOW"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="9D=:hnVhV}eT@0|_xM7;"><field name="VAR">x</field></shadow><block type="math_map" id="=pxS00k4:)]5m*`!gpHd"><value name="NUM"><shadow type="math_number" id="~H}tt)]2`YOIz.-=6toE"><field name="NUM">50</field></shadow><block type="sensor_sound" id="Vqj^dJ;q8DjGjVR#+dE."></block></value><value name="fromLow"><shadow type="math_number" id="6wS*~S+lK*wX}v.*ccJZ"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="06W{`tF9YVao@QPEz_^7"><field name="NUM">20000</field></shadow></value><value name="toLow"><shadow type="math_number" id="/$rTj^a$Kz)nQ^c=O~Z|"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="1oBP|mxl7}O6}*$kgaD_"><field name="NUM">12</field></shadow></value></block></value></block></value><value name="STEP"><shadow type="math_number" id="cXwGOFEY0EKN|zcXKWfJ"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="Ti#k18N+),VPGs0oOV!}"><field name="VAR">y</field></shadow></value><statement name="DO"><block type="display_bright_point" id="*=P~;lZNq!AaMNB)J,ml"><value name="x"><shadow type="pins_exlcdh" id="@0Mu#8cSGsbS9_e?l_i_"><field name="PIN">11</field></shadow></value><value name="y"><shadow type="pins_exlcdv" id="[f/}SP]BcL.^S^6YN7YZ"><field name="PIN">0</field></shadow><block type="math_arithmetic" id="/(uArfbEuFFaUt}#k,:t"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="hXyg3Web5tG;?^=16A}|"><field name="NUM">11</field></shadow></value><value name="B"><shadow type="math_number" id="yy52!6gvS8[RPvOi$];T"><field name="NUM">1</field></shadow><block type="variables_get" id="N0=d?GkrSK~2YLL3mbg@"><field name="VAR">y</field></block></value></block></value><value name="STAT"><shadow type="display_onoff" id="?qsl?-(~.cO)h1-Jv5po"><field name="ONOFF">ON</field></shadow></value></block></statement><next><block type="display_shift" id="9|JMis;o}pGxQ!wk8_~U"><field name="OP">shift_left</field><value name="val"><shadow type="math_number" id="(nL4_/$C^reP}M5+_/:q"><field name="NUM">1</field></shadow></value></block></next></block></statement></block></next></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9zb3VuZApmcm9tIG1peHB5IGltcG9ydCBtYXRoX21hcAoKCm9uYm9hcmRfbWF0cml4LnNjcm9sbCgn55yL6KeB5aOw6Z+zJykKd2hpbGUgVHJ1ZToKICAgIGZvciB5IGluIHJhbmdlKDAsIGludCgobWF0aF9tYXAob25ib2FyZF9zb3VuZC5yZWFkKCksIDAsIDIwMDAwLCAwLCAxMikpKSwgMSk6CiAgICAgICAgb25ib2FyZF9tYXRyaXgucGl4ZWwoaW50KDExKSwgaW50KDExIC0geSksIDEpCiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvdygpCiAgICBvbmJvYXJkX21hdHJpeC5zaGlmdF9sZWZ0KDEpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="FYuP(nBH.:$ffcHdZ67*" x="-1433" y="-745"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="L)#1510(Cy6J~2WBQKIj"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="variables_set" id="6)mVDGE9-VL.-rXKyeV,"><field name="VAR">光强</field><value name="VALUE"><block type="sensor_LTR308" id="V{BAf^Wf~zji$xa@]|*Z"></block></value><next><block type="system_print" id="doslr-aYU}xKK]BB0+ER"><value name="VAR"><shadow type="text" id="YpEJBQpg2[?G=]jQkZ.1"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="EeFCQci0|+fI)[.A|/3P"><field name="VAR">光强</field></block></value><next><block type="display_show_image_or_string_delay" id="K0cizTq?mV2sMyJ@@+1d"><field name="center">False</field><value name="data"><shadow type="text" id="QA_(]$2mSn):ou|yj0DL"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="5gXKx+FWM/7P[*i^oC3L"><value name="VAR"><shadow type="variables_get" id="X)!^X[U$$*.=R{;ddzNE"><field name="VAR">x</field></shadow><block type="text_to_number" id=")m#CoKvTP=M@A.=STD|@"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="-IgcyLr;|]4(.AS!xWIY"><field name="VAR">光强</field></shadow></value></block></value></block></value><value name="space"><shadow type="math_number" id="SJTC?Hn0-[Im{g).J8uC"><field name="NUM">0</field></shadow></value><next><block type="controls_delay_new" id="lUD9Yc}*o$T|ibF{g2`q"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="^gND?4~Vizxgp)J~w)M,"><field name="NUM">0.1</field></shadow></value></block></next></block></next></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9hbHMKaW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKaW1wb3J0IHRpbWUKCgp3aGlsZSBUcnVlOgogICAgX0U1Xzg1Xzg5X0U1X0JDX0JBID0gb25ib2FyZF9hbHMuYWxzX3ZpcygpCiAgICBwcmludChfRTVfODVfODlfRTVfQkNfQkEpCiAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhzdHIoaW50KF9FNV84NV84OV9FNV9CQ19CQSkpLHNwYWNlID0gMCxjZW50ZXIgPSBGYWxzZSkKICAgIHRpbWUuc2xlZXAoMC4xKQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="gg}vJPS!Af}#$dA4Vz#n" x="-1439" y="-816"><field name="VAR">当前光强</field><value name="VALUE"><block type="math_number" id="1szkVQmP#axF]?KI{Hlk"><field name="NUM">0</field></block></value><next><block type="variables_set" id="!/d~s49SB;JpFoyyL4||"><field name="VAR">补光大小</field><value name="VALUE"><block type="math_number" id="F`N9Cx(q)sV0{sj.#EEP"><field name="NUM">0</field></block></value><next><block type="controls_whileUntil" id="QyLU6Cd.BZ1O)]mUv}/R"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="LUGt`M;]g6qC/dzW92lX"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="variables_set" id="oLc}Eql~[Wk$J1:8l.Op"><field name="VAR">当前光强</field><value name="VALUE"><block type="text_to_number" id="FcXf~fiC|HLq,o$wE}Qn"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="~Hi:WcwN!GV3Loqy(JJD"><field name="VAR">x</field></shadow><block type="sensor_LTR308" id="$#]iAbHDier(T/n@4eh:"></block></value></block></value><next><block type="system_print" id="|1UhWpE_hCf{;b}Z:7Gu"><value name="VAR"><shadow type="text" id="JOcf6}(KQ.ovB3#T|QjQ"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="ex#6VpPU{wIIJROp}PER"><field name="VAR">当前光强</field></block></value><next><block type="display_show_image_or_string_delay" id="2E_;z^;}iwMUh$/S(Nv{"><field name="center">False</field><value name="data"><shadow type="text" id="*CS~N#nvt^KL_iEmfj^l"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="W82jafRuc`s2]rek-fCJ"><value name="VAR"><shadow type="variables_get" id="QXT|Nxj*4m*3Pk],p!UG"><field name="VAR">x</field></shadow><block type="variables_get" id="d3nct=aeZ*[o_5AEF*g+"><field name="VAR">当前光强</field></block></value></block></value><value name="space"><shadow type="math_number" id="||gdBwCMccHtSnq|^|Xg"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="kzo(19.N7N,eYS@.ngp("><field name="VAR">补光大小</field><value name="VALUE"><block type="math_arithmetic" id="#?plEy-UB?{_L1u!zLL?"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="Zz]+oLii2*M+AXRJiU*u"><field name="NUM">255</field></shadow></value><value name="B"><shadow type="math_number" id="a`)vON!o]oU[rB-E.b@c"><field name="NUM">1</field></shadow><block type="variables_get" id="m6D5pAt8c@V{5`QTAADh"><field name="VAR">当前光强</field></block></value></block></value><next><block type="actuator_onboard_neopixel_rgb_all" id="sFkFp.:M#SKL03B7T}Mr"><value name="RVALUE"><shadow type="math_number" id="}.]qB^7Kv!vE@*`U=.XD"><field name="NUM">0</field></shadow><block type="variables_get" id="VcC5]fS+[P*HT;QA1;`-"><field name="VAR">补光大小</field></block></value><value name="GVALUE"><shadow type="math_number" id="!0ku8|*wWnqJ/+{+~D8P"><field name="NUM">0</field></shadow><block type="variables_get" id="Bkvhn{gt4VXXXd*vxexO"><field name="VAR">补光大小</field></block></value><value name="BVALUE"><shadow type="math_number" id="d(u+)!Q^~6I{1-.kTmRb"><field name="NUM">0</field></shadow><block type="variables_get" id="~-9D^QHQhTV`e#LhIhyI"><field name="VAR">补光大小</field></block></value><next><block type="actuator_onboard_neopixel_write" id="C]}BCimJp*EK#pZSIt}+"></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></next></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9hbHMKaW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9yZ2IKCgpfRTVfQkRfOTNfRTVfODlfOERfRTVfODVfODlfRTVfQkNfQkEgPSAwCl9FOF9BMV9BNV9FNV84NV84OV9FNV9BNF9BN19FNV9CMF84RiA9IDAKd2hpbGUgVHJ1ZToKICAgIF9FNV9CRF85M19FNV84OV84RF9FNV84NV84OV9FNV9CQ19CQSA9IGludChvbmJvYXJkX2Fscy5hbHNfdmlzKCkpCiAgICBwcmludChfRTVfQkRfOTNfRTVfODlfOERfRTVfODVfODlfRTVfQkNfQkEpCiAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhzdHIoX0U1X0JEXzkzX0U1Xzg5XzhEX0U1Xzg1Xzg5X0U1X0JDX0JBKSxzcGFjZSA9IDAsY2VudGVyID0gRmFsc2UpCiAgICBfRThfQTFfQTVfRTVfODVfODlfRTVfQTRfQTdfRTVfQjBfOEYgPSAyNTUgLSBfRTVfQkRfOTNfRTVfODlfOERfRTVfODVfODlfRTVfQkNfQkEKICAgIG9uYm9hcmRfcmdiLmZpbGwoKF9FOF9BMV9BNV9FNV84NV84OV9FNV9BNF9BN19FNV9CMF84RiwgX0U4X0ExX0E1X0U1Xzg1Xzg5X0U1X0E0X0E3X0U1X0IwXzhGLCBfRThfQTFfQTVfRTVfODVfODlfRTVfQTRfQTdfRTVfQjBfOEYpKQogICAgb25ib2FyZF9yZ2Iud3JpdGUoKQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="0X#WAfhHgwHP)W^~^L+)" x="-1439" y="-816"><field name="VAR">接近距离</field><value name="VALUE"><block type="math_number" id="bo^dk$0UHmBzR=tAh8=G"><field name="NUM">0</field></block></value><next><block type="controls_whileUntil" id="6Myx(wC+?$Xb2Byb3~rW"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="mbm{4F`}BK.V:fyWSxNm"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="variables_set" id="SNA@JFhF`S2uTd~Gq?t5"><field name="VAR">接近距离</field><value name="VALUE"><block type="text_to_number" id=",4jH:tyrpoygSqf,$[H2"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="S,lOr0okQf#~Bd.FLG,r"><field name="VAR">x</field></shadow><block type="sensor_mixgo_pin_near_single" id="C:HuDGerZp,I#T;PrQLP"></block></value></block></value><next><block type="system_print" id="i2r*=3|$l;k-d_)s_a1:"><value name="VAR"><shadow type="text" id="kmFOzPD`Ht?=ZQZK?_wp"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id=")MA?vM)@G^5$Mlg!-#Xo"><field name="VAR">接近距离</field></block></value><next><block type="display_scroll_string" id="m@mU!}ByJV{U_HH2-[sv"><value name="data"><shadow type="text" id="$#J[n+.d!C{*c~NPJ4[l"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id=")t{Kpm8MD]*8V@ZHzzpb"><value name="VAR"><shadow type="variables_get" id="FzZV6FfXRt)!@ppHRwvN"><field name="VAR">x</field></shadow><block type="variables_get" id="Dyc842^`r?D[DGZXrlld"><field name="VAR">接近距离</field></block></value></block></value></block></next></block></next></block></statement></block></next></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9hbHMKaW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKCgpfRTZfOEVfQTVfRThfQkZfOTFfRThfQjdfOURfRTdfQTZfQkIgPSAwCndoaWxlIFRydWU6CiAgICBfRTZfOEVfQTVfRThfQkZfOTFfRThfQjdfOURfRTdfQTZfQkIgPSBpbnQob25ib2FyZF9hbHMucHNfbmwoKSkKICAgIHByaW50KF9FNl84RV9BNV9FOF9CRl85MV9FOF9CN185RF9FN19BNl9CQikKICAgIG9uYm9hcmRfbWF0cml4LnNjcm9sbChzdHIoX0U2XzhFX0E1X0U4X0JGXzkxX0U4X0I3XzlEX0U3X0E2X0JCKSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="1t-NxI:TFfZ-([G?x2y9" x="-1439" y="-831"><field name="VAR">接近距离</field><value name="VALUE"><block type="math_number" id="MLJ`4y48$l56LRTG!095"><field name="NUM">0</field></block></value><next><block type="variables_set" id="uVku[7hBj1l}0dSTO}I="><field name="VAR">是否报警</field><value name="VALUE"><block type="logic_boolean" id="VqcKaorQ0r3K@mY|1K]p"><field name="BOOL">FALSE</field></block></value><next><block type="controls_whileUntil" id="Fe,k5u$*;P_t6iY~7=bW"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="kre_f#f;Ac!|Sk:Fq75*"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="variables_set" id="N}}xMN8}}MN.aW}d0J,V"><field name="VAR">接近距离</field><value name="VALUE"><block type="text_to_number" id="q4L6Ifnsw*@GIWdR0NAn"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="}7p:L^4p*v75eg?h@fuL"><field name="VAR">x</field></shadow><block type="sensor_mixgo_pin_near_single" id="tKaJ4SErW!mJxw:CO(j5"></block></value></block></value><next><block type="system_print" id="kK;WdejA52mg@qTjaAr2"><value name="VAR"><shadow type="text" id="/FyaiS8FX6)ofl`Sud2?"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="2R91KD/WmlT2,RttaHT="><field name="VAR">接近距离</field></block></value><next><block type="display_show_image_or_string_delay" id="Ws3uXB!2uTAf$85M27FH"><field name="center">False</field><value name="data"><shadow type="text" id="IU}$=}9bRF7#N$a3EPpx"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="tpfiBmA4dY87dN|XXWbc"><value name="VAR"><shadow type="variables_get" id="8PD;aVt*7he$J^C{f?2N"><field name="VAR">x</field></shadow><block type="math_arithmetic" id="pEV6A`t$uKI[ts#3vE@Z"><field name="OP">ZHENGCHU</field><value name="A"><shadow type="math_number" id="aBoXy8,APHxTC(d3x4sT"><field name="NUM">1</field></shadow><block type="variables_get" id="@Zjx_C3?PIc;(M7S6{|B"><field name="VAR">接近距离</field></block></value><value name="B"><shadow type="math_number" id="-l.DNV8yIh^aX1[V3p|Z"><field name="NUM">100</field></shadow></value></block></value></block></value><value name="space"><shadow type="math_number" id="9H|b!vIC}uHWO{R*?L-Y"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="DhKB#=fFyO{,ZN#q|)v]"><field name="VAR">是否报警</field><value name="VALUE"><block type="logic_compare" id="/okvZ_BMCn=Nm}B=,7Ae"><field name="OP">GT</field><value name="A"><block type="variables_get" id="wY0(am~u[HGv/vsF[pHv"><field name="VAR">接近距离</field></block></value><value name="B"><block type="math_number" id="!(Dh/v1Ze1_:S$Kf([Rd"><field name="NUM">1000</field></block></value></block></value><next><block type="controls_if" id="6C[o/Oh9yQhrF049{^u8"><value name="IF0"><block type="variables_get" id="Y{t;h49tebPkx+BF-gnO"><field name="VAR">是否报警</field></block></value><statement name="DO0"><block type="esp32_onboard_music_play_list" id="Ts:z]Bued07E[$vVH{H;"><value name="LIST"><shadow type="pins_playlist" id="L`W@:_s$cBDh:Q89^Fe("><field name="PIN">onboard_music.DADADADUM</field></shadow></value></block></statement></block></next></block></next></block></next></block></next></block></statement></block></next></block></next></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9hbHMKaW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tdXNpYwoKCl9FNl84RV9BNV9FOF9CRl85MV9FOF9CN185RF9FN19BNl9CQiA9IDAKX0U2Xzk4X0FGX0U1XzkwX0E2X0U2XzhBX0E1X0U4X0FEX0E2ID0gRmFsc2UKd2hpbGUgVHJ1ZToKICAgIF9FNl84RV9BNV9FOF9CRl85MV9FOF9CN185RF9FN19BNl9CQiA9IGludChvbmJvYXJkX2Fscy5wc19ubCgpKQogICAgcHJpbnQoX0U2XzhFX0E1X0U4X0JGXzkxX0U4X0I3XzlEX0U3X0E2X0JCKQogICAgb25ib2FyZF9tYXRyaXguc2hvd3Moc3RyKChfRTZfOEVfQTVfRThfQkZfOTFfRThfQjdfOURfRTdfQTZfQkIgLy8gMTAwKSksc3BhY2UgPSAwLGNlbnRlciA9IEZhbHNlKQogICAgX0U2Xzk4X0FGX0U1XzkwX0E2X0U2XzhBX0E1X0U4X0FEX0E2ID0gX0U2XzhFX0E1X0U4X0JGXzkxX0U4X0I3XzlEX0U3X0E2X0JCID4gMTAwMAogICAgaWYgX0U2Xzk4X0FGX0U1XzkwX0E2X0U2XzhBX0E1X0U4X0FEX0E2OgogICAgICAgIG9uYm9hcmRfbXVzaWMucGxheShvbmJvYXJkX211c2ljLkRBREFEQURVTSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="8ov:nK7j!pDhKi9{!RT8" x="-1405" y="-729"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="E]oF=$MB-_kM|UobRNaW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="system_print" id="goqy-{~93*wQ+k}{E]*y"><value name="VAR"><shadow type="text" id="rUDBTJmcfmu6uc]V-oW^"><field name="TEXT">Mixly</field></shadow><block type="sensor_get_acceleration" id="2B*EMGzc2{vs$T36NXz$"><field name="key"></field></block></value><next><block type="controls_delay_new" id="i+]EfNV=Gs[0H|[-k2zk"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="#4XPltzTNvvbA`[fh{Yr"><field name="NUM">1</field></shadow></value></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9hY2MKaW1wb3J0IHRpbWUKCgp3aGlsZSBUcnVlOgogICAgcHJpbnQob25ib2FyZF9hY2MuYWNjZWxlcmF0aW9uKCkpCiAgICB0aW1lLnNsZWVwKDEpCg==</code>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="8ov:nK7j!pDhKi9{!RT8" x="-1474" y="-692"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="E]oF=$MB-_kM|UobRNaW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="system_print" id="3P=El/W99t?DSK^]N{x!"><value name="VAR"><shadow type="text" id="2P@M++XTb46?qUMSA=]!"><field name="TEXT">Mixly</field></shadow><block type="sensor_mixgo_cc_mmc5603_get_magnetic" id="0bVZf!loi*~,$)KVel2]"><field name="key">all</field></block></value><next><block type="controls_delay_new" id="f.m#lU!,zynTK#/ortXW"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="C)n-#@iof:|*@x}]`]_A"><field name="NUM">1</field></shadow></value></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tZ3MKaW1wb3J0IHRpbWUKCgp3aGlsZSBUcnVlOgogICAgcHJpbnQob25ib2FyZF9tZ3MuZ2V0c3RyZW5ndGgoKSkKICAgIHRpbWUuc2xlZXAoMSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="8ov:nK7j!pDhKi9{!RT8" x="-1507" y="-849"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="E]oF=$MB-_kM|UobRNaW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="hi-mf`]bq(-X3t:|F}5|"><value name="IF0"><block type="logic_compare" id="NqpHQk)+L48o)K[LdSZ|"><field name="OP">GT</field><value name="A"><block type="sensor_mixgo_cc_mmc5603_get_magnetic" id="6#NyI|:wbi/^Zh!a_nb7"><field name="key">all</field></block></value><value name="B"><block type="math_number" id="+_-/ANT#dZowyh{J/j3F"><field name="NUM">2000</field></block></value></block></value><statement name="DO0"><block type="esp32_onboard_music_pitch_with_time" id="-v_;5f8xP`,Fw(Vha7;3"><value name="pitch"><shadow type="pins_tone_notes" id="a3?w|=hUqWN|n6@5C(PY"><field name="PIN">440</field></shadow></value><value name="time"><shadow type="math_number" id="9tt(A]3^d^LI==L,m)Y="><field name="NUM">100</field></shadow></value><next><block type="display_show_image_or_string_delay" id="GK`:ypXNhFZ!fvwrPJ@`"><field name="center">True</field><value name="data"><shadow type="text" id="*$$IGe+Z*WaA:R?KLLkC"><field name="TEXT">金</field></shadow></value><value name="space"><shadow type="math_number" id="s2zmD/oX~l@:~r0n+CX:"><field name="NUM">0</field></shadow></value><next><block type="controls_delay_new" id="f.m#lU!,zynTK#/ortXW"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="C)n-#@iof:|*@x}]`]_A"><field name="NUM">1</field></shadow></value></block></next></block></next></block></statement><next><block type="controls_if" id="JD||HKYmD/}*n*bn|VEq"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="c!q^cQdAje/YqE!Wn.km"><value name="btn"><shadow type="pins_button" id=":D$^A]x|BfH80Ry0;S(a"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="display_clear" id=")7raZ]fAED2(F8qCJtN;"></block></statement></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tZ3MKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tdXNpYwpmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX21hdHJpeAppbXBvcnQgdGltZQppbXBvcnQgZmVpeWkKCgp3aGlsZSBUcnVlOgogICAgaWYgb25ib2FyZF9tZ3MuZ2V0c3RyZW5ndGgoKSA+IDIwMDA6CiAgICAgICAgb25ib2FyZF9tdXNpYy5waXRjaF90aW1lKDQ0MCwgMTAwKQogICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKCfph5EnLHNwYWNlID0gMCxjZW50ZXIgPSBUcnVlKQogICAgICAgIHRpbWUuc2xlZXAoMSkKICAgIGlmIGZlaXlpLmJ1dHRvbl9hLndhc19wcmVzc2VkKCk6CiAgICAgICAgb25ib2FyZF9tYXRyaXguZmlsbCgwKQogICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3coKQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="8ov:nK7j!pDhKi9{!RT8" x="-1507" y="-849"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="E]oF=$MB-_kM|UobRNaW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_forEach" id="FF7$lC*xy5Sy/;-$1$n3"><value name="LIST"><shadow type="list_many_input" id="FHt;dsHEBK[hh(?Wo8G/"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="L[F?^K!AFU0o3j9j1}ac"><value name="FROM"><shadow type="math_number" id="AMrZDI-qBT@0X8J_nwG:"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="s1rCf,uik^V3b`K9nZp."><field name="NUM">4</field></shadow></value><value name="STEP"><shadow type="math_number" id=",xsVoch+f;*e{xSFi,.6"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="$zo$8,fnh::8B.NCp^!e"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="system_print_end" id="0E9iU4o|XSK9;G:jh_-m"><value name="VAR"><shadow type="text" id="Qn*wx*$J(},Mq~Ug+OG*"><field name="TEXT">Mixly</field></shadow><block type="sensor_bitbot_ALS" id="T#/!iQu@7swU=asD/~ni"><value name="mode"><shadow type="bitbot_als_num" id="1Wog3sJKe.I.;N9Qc8P~"><field name="PIN">0</field></shadow><block type="variables_get" id="OnfDk6=lzckmwJrOtYK`"><field name="VAR">i</field></block></value></block></value><value name="END"><shadow type="text" id="OY+P|u]Yjy2V=xtXhWCo"><field name="TEXT">,</field></shadow></value></block></statement><next><block type="system_print" id="x{lA/4iG-zPX[epig*UO"><value name="VAR"><shadow type="text" id="HM8YKOiH2h~o5NLVG9E]"><field name="TEXT">光照强度</field></shadow></value><next><block type="controls_delay_new" id="8U35ri/hl.)D}OBOdyU,"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="BIPRl[IPqRFigY,G:=3u"><field name="NUM">1</field></shadow></value></block></next></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9ib3Q1MQppbXBvcnQgbWFjaGluZQppbXBvcnQgdGltZQoKCndoaWxlIFRydWU6CiAgICBmb3IgaSBpbiByYW5nZSgwLCA0LCAxKToKICAgICAgICBwcmludChvbmJvYXJkX2JvdDUxLnJlYWRfYWxzKGkpLGVuZCA9JywnKQogICAgcHJpbnQoJ+WFieeFp+W8uuW6picpCiAgICB0aW1lLnNsZWVwKDEpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="8ov:nK7j!pDhKi9{!RT8" x="-1764" y="-851"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="E]oF=$MB-_kM|UobRNaW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="actuator_onboard_neopixel_rgb" id="4g.,XU437QIY1r}CNNic"><value name="_LED_"><shadow type="math_number" id="c]6Ev4f=U4w}a8ealL[("><field name="NUM">3</field></shadow></value><value name="RVALUE"><shadow type="math_number" id="j04Ed2?,VZw;4O*syoek"><field name="NUM">0</field></shadow><block type="text_to_number" id="LHk,@`~+U:LxQ|MEN(*T"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="o{2i~[C6wHn9[yCr,a89"><field name="VAR">x</field></shadow><block type="math_map" id="|u$k(b`^QwPDG5{-C1i4"><value name="NUM"><shadow type="math_number" id="I{!;~cf.Wr`3V/@U*yhi"><field name="NUM">50</field></shadow><block type="sensor_bitbot_ALS" id="T#/!iQu@7swU=asD/~ni"><value name="mode"><shadow type="bitbot_als_num" id="1Wog3sJKe.I.;N9Qc8P~"><field name="PIN">0</field></shadow></value></block></value><value name="fromLow"><shadow type="math_number" id="R5XYwN0xLW;02tK,?FZT"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="+-9q#:f[VP`3rX~wUgD{"><field name="NUM">100</field></shadow></value><value name="toLow"><shadow type="math_number" id="#v$a7NjBi5dkkk)_lOiY"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="rr~-|a{oo=/WewZl4]Nh"><field name="NUM">255</field></shadow></value></block></value></block></value><value name="GVALUE"><shadow type="math_number" id="*g1Q_+fnMyZ_0{]opkq["><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="f3iFLXgi{Q+Cyt/c,.~L"><field name="NUM">0</field></shadow></value><next><block type="actuator_onboard_neopixel_rgb" id="fHXrE~wupuStgIx$9tV|"><value name="_LED_"><shadow type="math_number" id="M.b_,:Eye+D0c[*$(KZj"><field name="NUM">2</field></shadow></value><value name="RVALUE"><shadow type="math_number" id="j04Ed2?,VZw;4O*syoek"><field name="NUM">0</field></shadow><block type="text_to_number" id="?FZRqeEFO5Ts5:ir[_L3"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="!k/x+5v|CW?]{3b`e3L3"><field name="VAR">x</field></shadow><block type="math_map" id="=(M~~$58pE/+/{6=-~^."><value name="NUM"><shadow type="math_number" id="I{!;~cf.Wr`3V/@U*yhi"><field name="NUM">50</field></shadow><block type="sensor_bitbot_ALS" id="m8gjFi!)ZDm6{[,{^0BQ"><value name="mode"><shadow type="bitbot_als_num" id="dK(,8N`zA:Q)!E[yL@pq"><field name="PIN">1</field></shadow></value></block></value><value name="fromLow"><shadow type="math_number" id="D0p2``Tlxd1#sXj/M}8r"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="gp;D*Xt.02/SIg/Mu6MW"><field name="NUM">100</field></shadow></value><value name="toLow"><shadow type="math_number" id="{^JksrH5jwoDbUou;;FQ"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="VHlrG9*7LMqY|a4S8AAY"><field name="NUM">255</field></shadow></value></block></value></block></value><value name="GVALUE"><shadow type="math_number" id=",6PwnsWHxTFoc_j+A_|B"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="H6jcAHknc-@t)1r9N,p~"><field name="NUM">0</field></shadow></value><next><block type="actuator_onboard_neopixel_write" id="J6nJ4(3k_bc:sg:oCezl"></block></next></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9yZ2IKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9ib3Q1MQpmcm9tIG1peHB5IGltcG9ydCBtYXRoX21hcAoKCndoaWxlIFRydWU6CiAgICBvbmJvYXJkX3JnYlszXSA9IChpbnQoKG1hdGhfbWFwKG9uYm9hcmRfYm90NTEucmVhZF9hbHMoMCksIDAsIDEwMCwgMCwgMjU1KSkpLCAwLCAwKQogICAgb25ib2FyZF9yZ2JbMl0gPSAoaW50KChtYXRoX21hcChvbmJvYXJkX2JvdDUxLnJlYWRfYWxzKDEpLCAwLCAxMDAsIDAsIDI1NSkpKSwgMCwgMCkKICAgIG9uYm9hcmRfcmdiLndyaXRlKCkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="onboard_RTC_set_datetime" id=":7TZmyh8.PWXL.ZRPBv8" inline="true" x="-1763" y="-898"><value name="year"><shadow type="math_number" id="k=TgwjE5aK.vOd:-ipGf"><field name="NUM">2024</field></shadow></value><value name="month"><shadow type="math_number" id="`m94=XUoU7)zk[Rl58Up"><field name="NUM">4</field></shadow></value><value name="day"><shadow type="math_number" id="s*iB@Ewb$9.h|}s4qBYe"><field name="NUM">2</field></shadow></value><value name="hour"><shadow type="math_number" id="E7(xX}X@i^2Z+L7+P3n="><field name="NUM">21</field></shadow></value><value name="minute"><shadow type="math_number" id="KUo]xNm6#m4MHsG=3Y-/"><field name="NUM">4</field></shadow></value><value name="second"><shadow type="math_number" id="-S7zK^O~m2W?FR9UkI,Z"><field name="NUM">45</field></shadow></value><next><block type="controls_whileUntil" id="8ov:nK7j!pDhKi9{!RT8"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="E]oF=$MB-_kM|UobRNaW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="system_print" id="+S{kNldVb1r`fPMViQ49"><value name="VAR"><shadow type="text" id="[X)i!~Q!_:aleJ7$O)mC"><field name="TEXT">Mixly</field></shadow><block type="onboard_RTC_get_time" id="9en}$|f{*@nKDh2phGqY"></block></value><next><block type="controls_delay_new" id="8T*)6l*K8W7XD#hg1*U^"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id=".pHAz[@78*q,c*cu-.FX"><field name="NUM">1</field></shadow></value></block></next></block></statement></block></next></block></xml><config>{}</config><code>aW1wb3J0IG50cHRpbWUKaW1wb3J0IG1hY2hpbmUKaW1wb3J0IHRpbWUKCgpudHB0aW1lLnNldHRpbWUoKDIwMjQsNCwyLDIxLDA0LDQ1LDAsMCkpCndoaWxlIFRydWU6CiAgICBwcmludCh0aW1lLmxvY2FsdGltZSgpKQogICAgdGltZS5zbGVlcCgxKQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="onboard_RTC_set_datetime" id="N8A7Q*aElFIiE:Vg^wMc" inline="true" x="-2187" y="-818"><value name="year"><shadow type="math_number" id="i#Y0I;h|,8wh=(XFJ_pS"><field name="NUM">2024</field></shadow></value><value name="month"><shadow type="math_number" id="BV.#@X;P~(/Cxc@oG?Z5"><field name="NUM">4</field></shadow></value><value name="day"><shadow type="math_number" id="MsOA#;sG(qKzg*(x@E`D"><field name="NUM">2</field></shadow></value><value name="hour"><shadow type="math_number" id="nJwgs4YHOJ;qz#}m2ty`"><field name="NUM">21</field></shadow></value><value name="minute"><shadow type="math_number" id="u0Hgbjx^R}385DaPqAfG"><field name="NUM">4</field></shadow></value><value name="second"><shadow type="math_number" id="#ommO`__L@LfTwtN~U*4"><field name="NUM">45</field></shadow></value><next><block type="controls_whileUntil" id="{VY1I{xP[#kLEt`VNE0Y"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="H@0Ksp6`T{WXR0wi+V-o"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="variables_set" id="C4+QA`U(Qj+o)UeRAMwy"><field name="VAR">mytup</field><value name="VALUE"><block type="onboard_RTC_get_time" id="b59LE+u`O]K1!Lg$K3Fw"></block></value><next><block type="display_scroll_string" id="v^s!gr+~Of~QJ6qa#{?s"><value name="data"><shadow type="text" id="UGB9F:-pPz!Du^WbaZt{"><field name="TEXT">Mixly</field></shadow><block type="text_format_noreturn" id="[gY-n3Wz:_Z]19f3)8(P" inline="false"><mutation items="3"></mutation><value name="VAR"><shadow type="text" id="@o-snBVS])Zg6pd4GR9U"><field name="TEXT">{}:{}:{}</field></shadow></value><value name="ADD0"><block type="number_to_text" id="rejV1XrjkfLh$+rfXK)x"><value name="VAR"><shadow type="variables_get" id="TrV#$0_U2Pt_HU1lJy8z"><field name="VAR">x</field></shadow><block type="tuple_getIndex" id="pAjddceMg,=Q_y`R=BHj"><value name="TUP"><shadow type="variables_get" id="0z6w]pgfk,/z:9[-{N`4"><field name="VAR">mytup</field></shadow></value><value name="AT"><shadow type="math_number" id="6C4Ai@vHa!wba:Lqq}hq"><field name="NUM">3</field></shadow></value></block></value></block></value><value name="ADD1"><block type="number_to_text" id="Y,G,E|JP5-_`fH$ZZ`-c"><value name="VAR"><shadow type="variables_get" id="TrV#$0_U2Pt_HU1lJy8z"><field name="VAR">x</field></shadow><block type="tuple_getIndex" id="/blS[!.EU.X?kozl4dc."><value name="TUP"><shadow type="variables_get" id="7t*C^Dt#1Y2-+Kj|U^YN"><field name="VAR">mytup</field></shadow></value><value name="AT"><shadow type="math_number" id="_DHViuGJ}b)LRzI{f/dd"><field name="NUM">4</field></shadow></value></block></value></block></value><value name="ADD2"><block type="number_to_text" id="CgWxY(eHd^sq+q@,L,u{"><value name="VAR"><shadow type="variables_get" id="eTSyC[!KuD|C.LwK+Nx+"><field name="VAR">x</field></shadow><block type="tuple_getIndex" id="0L7zJHXPh]2-0u}e11};"><value name="TUP"><shadow type="variables_get" id="AaCwlcro!631XRDmEkpZ"><field name="VAR">mytup</field></shadow></value><value name="AT"><shadow type="math_number" id="ew~8D]j+W0,mPevmM5Q2"><field name="NUM">5</field></shadow></value></block></value></block></value></block></value><next><block type="controls_delay_new" id="KW{j-(1YCmm(63jj3SX`"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="S`a3}W!P|Q}`AQ+XVu^("><field name="NUM">0.5</field></shadow></value></block></next></block></next></block></statement></block></next></block></xml><config>{}</config><code>aW1wb3J0IG50cHRpbWUKaW1wb3J0IHRpbWUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKCgpudHB0aW1lLnNldHRpbWUoKDIwMjQsNCwyLDIxLDA0LDQ1LDAsMCkpCndoaWxlIFRydWU6CiAgICBteXR1cCA9IHRpbWUubG9jYWx0aW1lKCkKICAgIG9uYm9hcmRfbWF0cml4LnNjcm9sbCgne306e306e30nLmZvcm1hdChzdHIobXl0dXBbM10pLCBzdHIobXl0dXBbNF0pLCBzdHIobXl0dXBbNV0pKSkKICAgIHRpbWUuc2xlZXAoMC41KQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="N@9+M-8LkHl3u-Laf`y!" x="-2099" y="-915"><field name="VAR">按下时刻</field><value name="VALUE"><block type="math_number" id="BqNf5@hXfU)JIo$=5/2f"><field name="NUM">0</field></block></value><next><block type="variables_set" id="tZQUbz+OIw4DhofU8UX0"><field name="VAR">抬起时刻</field><value name="VALUE"><block type="math_number" id="?nhsALX{nBN2{)@x-z9Q"><field name="NUM">0</field></block></value><next><block type="controls_whileUntil" id="9W1.dy{TYm8[qcL_s`1*"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="ed-?;UscMLU!6k(JOiE9"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="PZ9r|+E*==nl4O!#Zn*Y"><value name="IF0"><block type="sensor_mixgo_button_is_pressed" id="cdT#_VevWw^FN?mBS5GM"><value name="btn"><shadow type="pins_button" id="z;,r5Qgl-eDTh;_.6yYc"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="pC+mf6-xoz?_t!I[*mWh"><field name="VAR">按下时刻</field><value name="VALUE"><block type="controls_millis" id="*;TO_7O8q@oF,a~fBf;v"><field name="Time">ms</field></block></value><next><block type="do_while" id="ACyoo=EEhN?s@~b{m)6V"><field name="type">true</field><value name="select_data"><block type="logic_negate" id="E+50fn`-8ej^VsZbp6@j"><value name="BOOL"><block type="sensor_mixgo_button_is_pressed" id="Wh+dNtc`e:uWkuDFjq(P"><value name="btn"><shadow type="pins_button" id="J!GCh!iC9Oj3*`~QA{^p"><field name="PIN">button_a</field></shadow></value></block></value></block></value><next><block type="variables_set" id="{ojzy0cmF]H@`@kB6D2Z"><field name="VAR">抬起时刻</field><value name="VALUE"><block type="controls_millis" id="+Wl6yIi#d[bN1M/!#1ad"><field name="Time">ms</field></block></value><next><block type="system_print" id="P|`fd!L:*XIy8~h@fb6?"><value name="VAR"><shadow type="text" id="!x+;^9|#FYzrQ^k8V@eM"><field name="TEXT">Mixly</field></shadow><block type="math_arithmetic" id="?(/t2`JO.3D)hq@+rvA2"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="ZZz}.8m[nC^*S5|ep_U6"><field name="NUM">1</field></shadow><block type="variables_get" id="kKF.mdA0oCc2@LAB1:.f"><field name="VAR">抬起时刻</field></block></value><value name="B"><shadow type="math_number" id="^`+G`!imqqi`K]4no/2J"><field name="NUM">1</field></shadow><block type="variables_get" id="EAZMqzu(I0W|R+xGe9OL"><field name="VAR">按下时刻</field></block></value></block></value><next><block type="display_scroll_string" id="w};]V3Slv!HWzOlOZm[4"><value name="data"><shadow type="text" id="1HpKCDU=[^Ag_z|aikXj"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="MrazaHF7O(JF43no,9+Z"><value name="VAR"><shadow type="variables_get" id="}__^]k}p@Ydd)}eO(B*#"><field name="VAR">x</field></shadow><block type="math_arithmetic" id="Q87eUECUt7ZqgG}#e{Q["><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="=6U#Dkp;dv7B;nw}Ga1Z"><field name="NUM">1</field></shadow><block type="variables_get" id="He::D@G[*pa?Fx8sZA03"><field name="VAR">抬起时刻</field></block></value><value name="B"><shadow type="math_number" id="1@cF[(zsSVeUN$caNq2D"><field name="NUM">1</field></shadow><block type="variables_get" id="WWF4hVTzh}/.UU,vMoNX"><field name="VAR">按下时刻</field></block></value></block></value></block></value></block></next></block></next></block></next></block></next></block></statement></block></statement></block></next></block></next></block></xml><config>{}</config><code>aW1wb3J0IGZlaXlpCmltcG9ydCB0aW1lCmltcG9ydCBtYWNoaW5lCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgoKX0U2XzhDXzg5X0U0X0I4XzhCX0U2Xzk3X0I2X0U1Xzg4X0JCID0gMApfRTZfOEFfQUNfRThfQjVfQjdfRTZfOTdfQjZfRTVfODhfQkIgPSAwCndoaWxlIFRydWU6CiAgICBpZiBmZWl5aS5idXR0b25fYS5pc19wcmVzc2VkKCk6CiAgICAgICAgX0U2XzhDXzg5X0U0X0I4XzhCX0U2Xzk3X0I2X0U1Xzg4X0JCID0gdGltZS50aWNrc19tcygpCiAgICAgICAgd2hpbGUgVHJ1ZToKICAgICAgICAgICAgaWYgKG5vdCBmZWl5aS5idXR0b25fYS5pc19wcmVzc2VkKCkpOgogICAgICAgICAgICAgICAgYnJlYWsKICAgICAgICBfRTZfOEFfQUNfRThfQjVfQjdfRTZfOTdfQjZfRTVfODhfQkIgPSB0aW1lLnRpY2tzX21zKCkKICAgICAgICBwcmludCgoX0U2XzhBX0FDX0U4X0I1X0I3X0U2Xzk3X0I2X0U1Xzg4X0JCIC0gX0U2XzhDXzg5X0U0X0I4XzhCX0U2Xzk3X0I2X0U1Xzg4X0JCKSkKICAgICAgICBvbmJvYXJkX21hdHJpeC5zY3JvbGwoc3RyKChfRTZfOEFfQUNfRThfQjVfQjdfRTZfOTdfQjZfRTVfODhfQkIgLSBfRTZfOENfODlfRTRfQjhfOEJfRTZfOTdfQjZfRTVfODhfQkIpKSkK</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="H.d3JohNgQX_ph+4=O5Z" x="-2754" y="-915"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="cB^l(2(DclQr]^!rujbV"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="display_show_image" id="!_WF9ZjQM_)dZkX{|4+f"><value name="data"><shadow type="pins_builtinimg" id="TDWG7xA^Wh[g@8pZ;e*C"><field name="PIN">onboard_matrix.HEART</field></shadow></value><next><block type="controls_delay_new" id="9k$/J=$,yeyUsAVAa3QC"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="m|mmBq${^)-y*edS/M?Y"><field name="NUM">0.5</field></shadow></value><next><block type="display_show_image" id="@^Xqs`{3MC$.*H}?(`UL"><value name="data"><shadow type="pins_builtinimg" id="h?WGh#Q.sVF..(-@d)=5"><field name="PIN">onboard_matrix.HEART_SMALL</field></shadow></value><next><block type="controls_delay_new" id="v3se]T)+yU3}r#ZjnHSK"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="9p@tZU)P_/)~r}I$xtY;"><field name="NUM">0.5</field></shadow></value><next><block type="controls_if" id="`:kepa}hg]zGsS}}0ycL"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="dQ`$A-TJUE9O6F6T|5b}"><value name="btn"><shadow type="pins_button" id="6H8NIgYjIMK5b-hCP08k"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="actuator_onboard_neopixel_rgb_all" id="z{e`QQ*tjC9.!CBz;2_@"><value name="RVALUE"><shadow type="math_number" id="T?+,/w1CHr]43{zttc22"><field name="NUM">50</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="]ivJYk!6_UoEx*e{:;kx"><field name="NUM">50</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="{c{8C]8@)Xh6E$.[}M/Q"><field name="NUM">50</field></shadow></value><next><block type="actuator_onboard_neopixel_write" id="RPgQmdoK{nrXunw^u49e"></block></next></block></statement><next><block type="controls_if" id="k^,d2i`O4u}IRhLo0l84"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="X`rvfX}(=xAmyV_PG9rw"><value name="btn"><shadow type="pins_button" id="!,aj.j;1ems8!m(s=tnX"><field name="PIN">button_b</field></shadow></value></block></value><statement name="DO0"><block type="actuator_onboard_neopixel_rgb_all" id="xXvShZZrH!H9q^Ot8E5Y"><value name="RVALUE"><shadow type="math_number" id=");xBdH(U_)fZ-(.#sC$j"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="3gIA{BuI,Z=EJSukLBCW"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="EO2K;xsgRIj60T#3nug."><field name="NUM">0</field></shadow></value><next><block type="actuator_onboard_neopixel_write" id="/HC@3Q.?y#[zfb`6!m!1"></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKaW1wb3J0IHRpbWUKaW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfcmdiCgoKd2hpbGUgVHJ1ZToKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LkhFQVJUKQogICAgdGltZS5zbGVlcCgwLjUpCiAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhvbmJvYXJkX21hdHJpeC5IRUFSVF9TTUFMTCkKICAgIHRpbWUuc2xlZXAoMC41KQogICAgaWYgZmVpeWkuYnV0dG9uX2Eud2FzX3ByZXNzZWQoKToKICAgICAgICBvbmJvYXJkX3JnYi5maWxsKCg1MCwgNTAsIDUwKSkKICAgICAgICBvbmJvYXJkX3JnYi53cml0ZSgpCiAgICBpZiBmZWl5aS5idXR0b25fYi53YXNfcHJlc3NlZCgpOgogICAgICAgIG9uYm9hcmRfcmdiLmZpbGwoKDAsIDAsIDApKQogICAgICAgIG9uYm9hcmRfcmdiLndyaXRlKCkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><variables><variable id="kujED6C|3`}2*o!`dvF;">x</variable></variables><block type="sensor_mixgo_button_attachInterrupt" id=".tYK9eOD7PxFd4]jy-I/" x="-2789" y="-1014"><field name="mode">machine.Pin.IRQ_RISING</field><value name="btn"><shadow type="pins_button" id="8};3cF-g+vRgUU;HZ8n~"><field name="PIN">button_a</field></shadow></value><value name="DO"><shadow type="factory_block_return" id="#m#Cc21GwhNQL_XTAF;r"><field name="VALUE">attachInterrupt_func</field></shadow></value><next><block type="sensor_mixgo_button_attachInterrupt" id="A{q}Puik}b6?N2)@X2h4"><field name="mode">machine.Pin.IRQ_RISING</field><value name="btn"><shadow type="pins_button" id="_54w0}mrnYeHVmPM@y[K"><field name="PIN">button_b</field></shadow></value><value name="DO"><shadow type="factory_block_return" id="^BpSMWOFJRef]IH$Xfft"><field name="VALUE">attachInterrupt_func2</field></shadow></value><next><block type="controls_whileUntil" id="H.d3JohNgQX_ph+4=O5Z"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="cB^l(2(DclQr]^!rujbV"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="display_show_image" id="!_WF9ZjQM_)dZkX{|4+f"><value name="data"><shadow type="pins_builtinimg" id="TDWG7xA^Wh[g@8pZ;e*C"><field name="PIN">onboard_matrix.HEART</field></shadow></value><next><block type="controls_delay_new" id="9k$/J=$,yeyUsAVAa3QC"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="m|mmBq${^)-y*edS/M?Y"><field name="NUM">0.5</field></shadow></value><next><block type="display_show_image" id="@^Xqs`{3MC$.*H}?(`UL"><value name="data"><shadow type="pins_builtinimg" id="h?WGh#Q.sVF..(-@d)=5"><field name="PIN">onboard_matrix.HEART_SMALL</field></shadow></value><next><block type="controls_delay_new" id="v3se]T)+yU3}r#ZjnHSK"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="9p@tZU)P_/)~r}I$xtY;"><field name="NUM">0.5</field></shadow></value></block></next></block></next></block></next></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="]hp2cy)Q+?K?;:Uxd+Eh" x="-2775" y="-673"><mutation><arg name="x" varid="kujED6C|3`}2*o!`dvF;"></arg></mutation><field name="NAME">attachInterrupt_func</field><statement name="STACK"><block type="actuator_onboard_neopixel_rgb_all" id="z{e`QQ*tjC9.!CBz;2_@"><value name="RVALUE"><shadow type="math_number" id="T?+,/w1CHr]43{zttc22"><field name="NUM">50</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="]ivJYk!6_UoEx*e{:;kx"><field name="NUM">50</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="{c{8C]8@)Xh6E$.[}M/Q"><field name="NUM">50</field></shadow></value><next><block type="actuator_onboard_neopixel_write" id="RPgQmdoK{nrXunw^u49e"></block></next></block></statement></block><block type="procedures_defnoreturn" id="Z+twhP)XHQv3vq366w3H" x="-2769" y="-538"><mutation><arg name="x" varid="kujED6C|3`}2*o!`dvF;"></arg></mutation><field name="NAME">attachInterrupt_func2</field><statement name="STACK"><block type="actuator_onboard_neopixel_rgb_all" id="xXvShZZrH!H9q^Ot8E5Y"><value name="RVALUE"><shadow type="math_number" id=");xBdH(U_)fZ-(.#sC$j"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="3gIA{BuI,Z=EJSukLBCW"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="EO2K;xsgRIj60T#3nug."><field name="NUM">0</field></shadow></value><next><block type="actuator_onboard_neopixel_write" id="/HC@3Q.?y#[zfb`6!m!1"></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKaW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CmltcG9ydCB0aW1lCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfcmdiCgpkZWYgYXR0YWNoSW50ZXJydXB0X2Z1bmMoeCk6CiAgICBvbmJvYXJkX3JnYi5maWxsKCg1MCwgNTAsIDUwKSkKICAgIG9uYm9hcmRfcmdiLndyaXRlKCkKCmRlZiBhdHRhY2hJbnRlcnJ1cHRfZnVuYzIoeCk6CiAgICBvbmJvYXJkX3JnYi5maWxsKCgwLCAwLCAwKSkKICAgIG9uYm9hcmRfcmdiLndyaXRlKCkKCgoKZmVpeWkuYnV0dG9uX2EuaXJxKGhhbmRsZXIgPSBhdHRhY2hJbnRlcnJ1cHRfZnVuYywgdHJpZ2dlciA9IG1hY2hpbmUuUGluLklSUV9SSVNJTkcpCmZlaXlpLmJ1dHRvbl9iLmlycShoYW5kbGVyID0gYXR0YWNoSW50ZXJydXB0X2Z1bmMyLCB0cmlnZ2VyID0gbWFjaGluZS5QaW4uSVJRX1JJU0lORykKd2hpbGUgVHJ1ZToKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LkhFQVJUKQogICAgdGltZS5zbGVlcCgwLjUpCiAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhvbmJvYXJkX21hdHJpeC5IRUFSVF9TTUFMTCkKICAgIHRpbWUuc2xlZXAoMC41KQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><variables><variable id="kujED6C|3`}2*o!`dvF;">x</variable></variables><block type="variables_set" id="Y(Bu,j#gc}u:nq}bF~D8" x="-2776" y="-1041"><field name="VAR">是否亮灯</field><value name="VALUE"><block type="logic_boolean" id="dBMc)y#ZTKBD[x+dl^kK"><field name="BOOL">FALSE</field></block></value><next><block type="sensor_mixgo_button_attachInterrupt" id="NaCVQ]+xNJtiOHOb!MIT"><field name="mode">machine.Pin.IRQ_RISING</field><value name="btn"><shadow type="pins_button" id="yow}:VeCiVS8O/g=-u9Z"><field name="PIN">button_a</field></shadow></value><value name="DO"><shadow type="factory_block_return" id="T,P:L{h2Frxs+s#M[|9)"><field name="VALUE">attachInterrupt_func</field></shadow></value><next><block type="controls_whileUntil" id=")K4n.v5oWsl=C*awg8h8"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="00W@X=G*FK?K=t?BVmu?"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="display_show_image" id="{_{o0Y3Vv9OA]?]A8Hp1"><value name="data"><shadow type="pins_builtinimg" id="RWaFV;2ON^.J?KJ}:sj!"><field name="PIN">onboard_matrix.HEART</field></shadow></value><next><block type="controls_delay_new" id="RKw3tXFGc5_r!n2lBas."><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="/=(38{T]YIeM9NUtS-3|"><field name="NUM">0.5</field></shadow></value><next><block type="display_show_image" id="5eLrgrQ_1rN}o-cb}*)g"><value name="data"><shadow type="pins_builtinimg" id="PBh3qy{{NWt=z,yG1@.l"><field name="PIN">onboard_matrix.HEART_SMALL</field></shadow></value><next><block type="controls_delay_new" id="]R)Ti/sh3h8*|=9ptqNj"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="Arogy4I;:AD5`=.O}##?"><field name="NUM">0.5</field></shadow></value></block></next></block></next></block></next></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="SGObzI$hP6L,$!GotVbn" x="-2775" y="-673"><mutation><arg name="x" varid="kujED6C|3`}2*o!`dvF;"></arg></mutation><field name="NAME">attachInterrupt_func</field><statement name="STACK"><block type="variables_global" id=")dy;~|qjR:{:]z!zEvBF"><value name="VAR"><block type="variables_get" id="lVv;fw,V72?L_muiI]/D"><field name="VAR">是否亮灯</field></block></value><next><block type="variables_set" id="qf$^RP[8WQqXa`MpAWmp"><field name="VAR">是否亮灯</field><value name="VALUE"><block type="logic_negate" id="F[2jHnwFz26/Dej.Q@q5"><value name="BOOL"><block type="variables_get" id="EekExlrvvkJLo_-1i(XE"><field name="VAR">是否亮灯</field></block></value></block></value><next><block type="controls_if" id=";`0bV_*23e6ePoG6EJs`"><mutation else="1"></mutation><value name="IF0"><block type="variables_get" id=":b`)|/]*/(4F3]S[1PW2"><field name="VAR">是否亮灯</field></block></value><statement name="DO0"><block type="actuator_onboard_neopixel_rgb_all" id="[fsg)uk[:X8Cb5+WbHj)"><value name="RVALUE"><shadow type="math_number" id="$nf`kRD^!0V0)?*{0JAg"><field name="NUM">50</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="`9@jPtr|~(q2hj3JypYV"><field name="NUM">50</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="6b_m?J~4AGF33J=:ay{4"><field name="NUM">50</field></shadow></value></block></statement><statement name="ELSE"><block type="actuator_onboard_neopixel_rgb_all" id="0f))9Ho(`8QemvlRVbfJ"><value name="RVALUE"><shadow type="math_number" id="f[MsB;RWGU(!x/#6.vFk"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="{0|=4IOF?p7`JpSRcTf."><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="2=X37);ehs`v!sVNGj;_"><field name="NUM">0</field></shadow></value></block></statement><next><block type="actuator_onboard_neopixel_write" id="2!l+0s!=dJ3~du@1~Yx-"></block></next></block></next></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKaW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CmltcG9ydCB0aW1lCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfcmdiCgpkZWYgYXR0YWNoSW50ZXJydXB0X2Z1bmMoeCk6CiAgICBnbG9iYWwgX0U2Xzk4X0FGX0U1XzkwX0E2X0U0X0JBX0FFX0U3XzgxX0FGCiAgICBfRTZfOThfQUZfRTVfOTBfQTZfRTRfQkFfQUVfRTdfODFfQUYgPSBub3QgX0U2Xzk4X0FGX0U1XzkwX0E2X0U0X0JBX0FFX0U3XzgxX0FGCiAgICBpZiBfRTZfOThfQUZfRTVfOTBfQTZfRTRfQkFfQUVfRTdfODFfQUY6CiAgICAgICAgb25ib2FyZF9yZ2IuZmlsbCgoNTAsIDUwLCA1MCkpCiAgICBlbHNlOgogICAgICAgIG9uYm9hcmRfcmdiLmZpbGwoKDAsIDAsIDApKQogICAgb25ib2FyZF9yZ2Iud3JpdGUoKQoKCgpfRTZfOThfQUZfRTVfOTBfQTZfRTRfQkFfQUVfRTdfODFfQUYgPSBGYWxzZQpmZWl5aS5idXR0b25fYS5pcnEoaGFuZGxlciA9IGF0dGFjaEludGVycnVwdF9mdW5jLCB0cmlnZ2VyID0gbWFjaGluZS5QaW4uSVJRX1JJU0lORykKd2hpbGUgVHJ1ZToKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LkhFQVJUKQogICAgdGltZS5zbGVlcCgwLjUpCiAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhvbmJvYXJkX21hdHJpeC5IRUFSVF9TTUFMTCkKICAgIHRpbWUuc2xlZXAoMC41KQo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><variables><variable id="ok:ro0iEW(eJAtg/iAsj">tim</variable></variables><block type="variables_set" id="q+2j/:eH=jk4@3AIh$ny" x="-2817" y="-1029"><field name="VAR">开始</field><value name="VALUE"><block type="logic_boolean" id="@pXy]9QwkJ`0s3[u~9#E"><field name="BOOL">FALSE</field></block></value><next><block type="variables_set" id="A8#rpk_Ll5@cw#Yf3mX}"><field name="VAR">计时</field><value name="VALUE"><block type="math_number" id="CM#o9y=bB`{q]~I~Q~ya"><field name="NUM">0</field></block></value><next><block type="system_timer_init" id="CwfQJpZjG68wG#Snr[Y_"><value name="SUB"><shadow type="variables_get" id="18TdG#LLxnZu@/VscZIT"><field name="VAR">tim</field></shadow></value><next><block type="system_timer" id="ETD7+c;#kJ-b0]{W6r~c"><field name="mode">PERIODIC</field><value name="VAR"><shadow type="variables_get" id="!Cv_R6gj.ndU?=GzE]i~"><field name="VAR">tim</field></shadow></value><value name="period"><shadow type="math_number" id=",rws!u|/|zGLOq0)rm8C"><field name="NUM">100</field></shadow></value><value name="callback"><shadow type="factory_block_return" id="0cBI3#qlq`wn]DplXCzO"><field name="VALUE">tim_callback</field></shadow></value><next><block type="controls_whileUntil" id="$*v)y=E)`}.DJKZv*]Sr"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="60@*Y/^$hZ.w~O7Ofy6y"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="oe~jp`:cZdq7Se-)jyb8"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="8pK^,;N4ia_OyE4Q|0Ax"><value name="btn"><shadow type="pins_button" id="wCULj[rF=_-v*[kn(2mp"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="G3!O$rDDD/:Tw:tAYa3="><field name="VAR">开始</field><value name="VALUE"><block type="logic_negate" id="gU#o^11EtxZx9J;6![9."><value name="BOOL"><block type="variables_get" id="+Cd)i$v!lVwy-sgZRW[x"><field name="VAR">开始</field></block></value></block></value></block></statement></block></statement></block></next></block></next></block></next></block></next></block><block type="procedures_defnoreturn" id="Uyn$.w~d4UXh.0|N7:.T" x="-2822" y="-727"><mutation><arg name="tim" varid="ok:ro0iEW(eJAtg/iAsj"></arg></mutation><field name="NAME">tim_callback</field><statement name="STACK"><block type="variables_global" id=".N(v5@8^r$wf}4=E4BQ:"><value name="VAR"><block type="variables_get" id="W~`;UFId9HZK4NRII2RZ"><field name="VAR">计时</field></block></value><next><block type="variables_global" id="IWJIJldvMrTT}q+_l24#"><value name="VAR"><block type="variables_get" id="PIQucYcyQ/HFmXqf5;7P"><field name="VAR">开始</field></block></value><next><block type="controls_if" id="N?,R-[[wXqA2PTqqwQ_N"><value name="IF0"><block type="variables_get" id="coW4k6GmT#z//hRS.H`r"><field name="VAR">开始</field></block></value><statement name="DO0"><block type="math_selfcalcu" id="NW?}abQ(rQ:,Kh!(Dw)("><field name="OP">ADD</field><value name="A"><shadow type="variables_get" id="*o.+HqVp}qTAS5Fb)rZ."><field name="VAR">a</field></shadow><block type="variables_get" id="A3IkXeKjML!CH6_2Fy{`"><field name="VAR">计时</field></block></value><value name="B"><shadow type="math_number" id="~5s*La/.C6KlEZ{GRXJ/"><field name="NUM">1</field></shadow></value></block></statement><next><block type="display_show_image_or_string_delay" id="?pT,PDHBqMN:YA^Lh_JH"><field name="center">False</field><value name="data"><shadow type="text" id="x)Kl(zt`V|3:|3_N-(ce"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="Wyg@ns_oJ2Q7(GwT+_;+"><value name="VAR"><shadow type="variables_get" id="e7(.IBdVjZ=ZDW:[7.aZ"><field name="VAR">x</field></shadow><block type="variables_get" id="g+3F3cN16q#8,V_Wam/x"><field name="VAR">计时</field></block></value></block></value><value name="space"><shadow type="math_number" id="I)4X~x^DoU.S=XY!0#DG"><field name="NUM">0</field></shadow></value></block></next></block></next></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKaW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgpkZWYgdGltX2NhbGxiYWNrKHRpbSk6CiAgICBnbG9iYWwgX0U4X0FFX0ExX0U2Xzk3X0I2CiAgICBnbG9iYWwgX0U1X0JDXzgwX0U1X0E3XzhCCiAgICBpZiBfRTVfQkNfODBfRTVfQTdfOEI6CiAgICAgICAgX0U4X0FFX0ExX0U2Xzk3X0I2ICs9IDEKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKHN0cihfRThfQUVfQTFfRTZfOTdfQjYpLHNwYWNlID0gMCxjZW50ZXIgPSBGYWxzZSkKCgoKX0U1X0JDXzgwX0U1X0E3XzhCID0gRmFsc2UKX0U4X0FFX0ExX0U2Xzk3X0I2ID0gMAp0aW0gPSBtYWNoaW5lLlRpbWVyKDApCnRpbS5pbml0KHBlcmlvZCA9IDEwMCwgbW9kZSA9IG1hY2hpbmUuVGltZXIuUEVSSU9ESUMsIGNhbGxiYWNrID0gdGltX2NhbGxiYWNrKQp3aGlsZSBUcnVlOgogICAgaWYgZmVpeWkuYnV0dG9uX2Eud2FzX3ByZXNzZWQoKToKICAgICAgICBfRTVfQkNfODBfRTVfQTdfOEIgPSBub3QgX0U1X0JDXzgwX0U1X0E3XzhCCg==</code>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="Nbp0XM:9lL}C{us2]#j6" x="-2935" y="-1052"><field name="VAR">音乐</field><value name="VALUE"><block type="logic_boolean" id="+4[^PHH?/0ed41ZjG-im"><field name="BOOL">FALSE</field></block></value><next><block type="controls_thread" id=",}EGk;baE-,rczz{5rU/"><value name="callback"><shadow type="factory_block_return" id="|aXMKh1tw:cvRk[P*o,1"><field name="VALUE">testThread</field></shadow></value><value name="VAR"><block type="tuple_create_with_noreturn" id="-N,PM8bXr@sYve}k;AK2" inline="true"><mutation items="0"></mutation></block></value><next><block type="controls_whileUntil" id=")K4n.v5oWsl=C*awg8h8"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="00W@X=G*FK?K=t?BVmu?"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="Zx4{)p1jfU,(Sbi{wVgE"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="@ZIYSU89{[/+hR01p@^g"><value name="btn"><shadow type="pins_button" id="u{50rd#Fe]oXw={UkSHY"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="_s[pouh$pG1su^?RF:`H"><field name="VAR">音乐</field><value name="VALUE"><block type="logic_negate" id="#3MT]=q$I]h_z{QBys_1"><value name="BOOL"><block type="variables_get" id="}Bb{HPR{^?j1ggS({kk:"><field name="VAR">音乐</field></block></value></block></value></block></statement><next><block type="display_show_image" id="=*2Y032Xw#w(IKLWNH*/"><value name="data"><shadow type="pins_builtinimg" id="ro5`?}wIk:zC{VL^{]Ew"><field name="PIN">onboard_matrix.HEART</field></shadow></value><next><block type="controls_delay_new" id=".t70kIQDx]elHBj6QoBA"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="rET1O/yF31]XhHR/W+iO"><field name="NUM">0.1</field></shadow></value><next><block type="display_show_image" id="l=NM$C8hrVP(8QK;u]nv"><value name="data"><shadow type="pins_builtinimg" id="p{}v`Jc,_,_[l`}GL.ws"><field name="PIN">onboard_matrix.HEART_SMALL</field></shadow></value><next><block type="controls_delay_new" id="j=C.jj$SVjcXlq7^:v|f"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="{y{5;[HCj6=I]fG7R+5f"><field name="NUM">0.1</field></shadow></value></block></next></block></next></block></next></block></next></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="?VH!q?GP`!!0,:X0($df" inline="false" x="-2926" y="-608"><field name="NAME">testThread</field><statement name="STACK"><block type="variables_global" id="(!#E)-G1UE+,cGcxz7Nw"><value name="VAR"><block type="variables_get" id="V(nQduM8~#[xcuY6!FPD"><field name="VAR">音乐</field></block></value><next><block type="controls_whileUntil" id="wvuD5KboCcFOBCnaX,Ml"><field name="MODE">WHILE</field><value name="BOOL"><block type="logic_boolean" id=",fVl@nr9gW~mH6E:A`N*"><field name="BOOL">TRUE</field></block></value><statement name="DO"><block type="controls_if" id="em#:MM|E3RO{{Qp,diw5"><value name="IF0"><block type="variables_get" id="p,F.a7k^5mW[bV{8$Y;1"><field name="VAR">音乐</field></block></value><statement name="DO0"><block type="esp32_onboard_music_play_list" id="?829eKk{M;s3::P]Hz-4"><value name="LIST"><shadow type="pins_playlist" id="rGn|#`HhaKTnV$.@4:8]"><field name="PIN">onboard_music.DADADADUM</field></shadow></value></block></statement></block></statement></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IF90aHJlYWQKaW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CmltcG9ydCB0aW1lCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbXVzaWMKCmRlZiB0ZXN0VGhyZWFkKCk6CiAgICBnbG9iYWwgX0U5XzlGX0IzX0U0X0I5XzkwCiAgICB3aGlsZSBUcnVlOgogICAgICAgIGlmIF9FOV85Rl9CM19FNF9COV85MDoKICAgICAgICAgICAgb25ib2FyZF9tdXNpYy5wbGF5KG9uYm9hcmRfbXVzaWMuREFEQURBRFVNKQoKCgpfRTlfOUZfQjNfRTRfQjlfOTAgPSBGYWxzZQpfdGhyZWFkLnN0YXJ0X25ld190aHJlYWQodGVzdFRocmVhZCwgKCkpCndoaWxlIFRydWU6CiAgICBpZiBmZWl5aS5idXR0b25fYS53YXNfcHJlc3NlZCgpOgogICAgICAgIF9FOV85Rl9CM19FNF9COV85MCA9IG5vdCBfRTlfOUZfQjNfRTRfQjlfOTAKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LkhFQVJUKQogICAgdGltZS5zbGVlcCgwLjEpCiAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhvbmJvYXJkX21hdHJpeC5IRUFSVF9TTUFMTCkKICAgIHRpbWUuc2xlZXAoMC4xKQo=</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="P.8~DOvdVm-]^PD+aL@@" x="-3394" y="-997"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="!#7`#W_+bBv)rH[JBoP("><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="system_print" id="M}fVQKX*g02PreKXVwyU"><value name="VAR"><shadow type="text" id="!(Z{G[5W7ybxzTfwVUVM"><field name="TEXT">Mixly</field></shadow><block type="rfid_readid" id=":T{p8/Qhd-B*W5w;mN$o"></block></value><next><block type="controls_delay_new" id="H=lc]4Q~}Cn+[~Y$oVRQ"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="68GQmC)oD6=KXh`UvS$?"><field name="NUM">1</field></shadow></value></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9yZmlkCmltcG9ydCB0aW1lCgoKd2hpbGUgVHJ1ZToKICAgIHByaW50KG9uYm9hcmRfcmZpZC5yZWFkX2NhcmQoMCwgeD0iaWQiKSkKICAgIHRpbWUuc2xlZXAoMSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="Nw?_~IRfUFAiY7OJVm/7" x="-3403" y="-1132"><field name="VAR">id</field><value name="VALUE"><block type="math_number" id="AQiCp-IlHuv$)^o}e,5z"><field name="NUM">0</field></block></value><next><block type="controls_whileUntil" id="1Rnz]_lI8Uld*q(.#Nf7"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="QA#_y3@fu+lYr`FtGWnn"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="variables_set" id="ju=/uSe9Wl~U}wv]=Cv#"><field name="VAR">id</field><value name="VALUE"><block type="rfid_readid" id="KGDjCSu.I$2H;1h1g#xE"></block></value><next><block type="controls_if" id="b.kYa;w7)yS8r-AUgf8("><value name="IF0"><block type="logic_compare" id="56,pS[h}bR234M;LF50t"><field name="OP">NEQ</field><value name="A"><block type="number_to_text" id="YSTff8ydL*e(yLF-b08I"><value name="VAR"><shadow type="variables_get" id="a{t^hI`bIKp]EQ9UJAJL"><field name="VAR">x</field></shadow><block type="variables_get" id="6c)FA[62v{ChSaf;W:=:"><field name="VAR">id</field></block></value></block></value><value name="B"><block type="text" id="a}I8u$;+!9Knw}p{+brV"><field name="TEXT">None</field></block></value></block></value><statement name="DO0"><block type="esp32_onboard_music_pitch_with_time" id="[Uq]g]~]EXL;9.WLVurx"><value name="pitch"><shadow type="pins_tone_notes" id="]ioOLRxmaq~v5oxi^Q}f"><field name="PIN">659</field></shadow></value><value name="time"><shadow type="math_number" id="*6t7=W4TpDYARb~ZBt,_"><field name="NUM">100</field></shadow></value><next><block type="system_print" id="Ehx$-WMVy[-2QOk:Z,o)"><value name="VAR"><shadow type="text" id="#K9O!+6h.}@2A{w7:rMo"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="YEj0ekru^)EqDh]:A7)J"><field name="VAR">id</field></block></value><next><block type="display_scroll_string" id=":Rr26)/WzRc/?@X~[iV`"><value name="data"><shadow type="text" id="}JxWmAx^zGZ[klHDJ-ZQ"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="HOMBG/1weKlD_-cNh#we"><value name="VAR"><shadow type="variables_get" id="W|#FOsO3RG1J__R0voDb"><field name="VAR">x</field></shadow><block type="variables_get" id="9TRu=XBX-W^MS*[lb,-F"><field name="VAR">id</field></block></value></block></value></block></next></block></next></block></statement></block></next></block></statement></block></next></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9yZmlkCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbXVzaWMKaW1wb3J0IG1hY2hpbmUKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKCgppZDIgPSAwCndoaWxlIFRydWU6CiAgICBpZDIgPSBvbmJvYXJkX3JmaWQucmVhZF9jYXJkKDAsIHg9ImlkIikKICAgIGlmIHN0cihpZDIpICE9ICdOb25lJzoKICAgICAgICBvbmJvYXJkX211c2ljLnBpdGNoX3RpbWUoNjU5LCAxMDApCiAgICAgICAgcHJpbnQoaWQyKQogICAgICAgIG9uYm9hcmRfbWF0cml4LnNjcm9sbChzdHIoaWQyKSkK</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><variables><variable id="*5WT[`,Lbe5En3jd}uUk">data</variable></variables><block type="communicate_bluetooth_central_init" id="Tz=!s~W@p[:#xWAN;c(t" x="-871" y="-463"><value name="VAR"><shadow type="variables_get" id="+zU`14#G6Oy]|NGVvCaO"><field name="VAR">ble_c</field></shadow></value><next><block type="communicate_bluetooth_recv" id="h7VEtf{nmH655W2~MQZ-"><value name="VAR"><shadow type="variables_get" id="4{.83N$F#iy3I#?_PfG#"><field name="VAR">ble_c</field></shadow></value><value name="METHOD"><shadow type="factory_block_return" id="3?=f+#jgBMj=qJ_$o~zw"><field name="VALUE">ble_method</field></shadow></value><next><block type="controls_whileUntil" id="zXtfB3UX^tgU8d|J6H!K"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="q9p7IL96DIIH=MgBL!mq"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="a#rtd4_I$HefHSJouDxo"><mutation else="1"></mutation><value name="IF0"><block type="communicate_bluetooth_is_connected" id=";e}D5!TMrR;iZ1@9rxc."><value name="VAR"><shadow type="variables_get" id="RF:Un[36)z@Dp1uYeIr["><field name="VAR">ble_c</field></shadow></value></block></value><statement name="DO0"><block type="controls_if" id="vF9wV]c88soH08=E`lLu"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="~wT]-LHJsqh*(3*rAjhU"><value name="btn"><shadow type="pins_button" id="YeMPv`Tb1@m-=jA7+#k_"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="EeHZ=;S|W:quik+s;z92"><value name="VAR"><shadow type="variables_get" id="Xwv1`pwAZfMOYdzz?20N"><field name="VAR">ble_c</field></shadow></value><value name="data"><shadow type="text" id="##DNT66T|oF!una/4Vl="><field name="TEXT">test</field></shadow></value></block></statement><next><block type="display_show_image_or_string_delay" id="9PMc6hFXQ@$;],80+.Jw"><field name="center">True</field><value name="data"><shadow type="text" id="7+|K=D!t~x-[Wa^S:Btf"><field name="TEXT">OK</field></shadow></value><value name="space"><shadow type="math_number" id="$gMU+`,/mwVb`Lw^FaYL"><field name="NUM">0</field></shadow></value></block></next></block></statement><statement name="ELSE"><block type="display_show_image_or_string_delay" id="h3sH;({:BiNlGROk=[}G"><field name="center">True</field><value name="data"><shadow type="text" id="!jsC}mJwMj8A0ga|`(~x"><field name="TEXT">==</field></shadow></value><value name="space"><shadow type="math_number" id="H0VQ8Hn}45FN=LM1$Q.T"><field name="NUM">0</field></shadow></value><next><block type="controls_try_finally" id="(6eH9.1;-h+|9REHX-Np"><mutation elseif="1"></mutation><statement name="try"><block type="communicate_bluetooth_connect" id="jOxO,J4!mrrI,@=i?Fjo"><field name="mode">name</field><value name="VAR"><shadow type="variables_get" id="DvvY?Ej}@0UR-@0Ms;?n"><field name="VAR">ble_c</field></shadow></value><value name="data"><shadow type="text" id="5^*;=4=i9WhrT[iAo@D4"><field name="TEXT">Mixly_Slave</field></shadow></value></block></statement><value name="IF1"><shadow type="factory_block_return" id="{f*gu))7Ccl4HP!O3ak*"><field name="VALUE">Exception as e</field></shadow></value></block></next></block></statement></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="O6RS],CE{B0)w4;|O=]l" x="-860" y="72"><mutation><arg name="data" varid="*5WT[`,Lbe5En3jd}uUk"></arg></mutation><field name="NAME">ble_method</field><statement name="STACK"><block type="system_print" id="h2JI:Qn|v@1Fv`uX(|[_"><value name="VAR"><shadow type="text" id="hzEG6@8FnR|p_]!kXm~Z"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="=[:Fn(HMlVVwu:8H}G`~"><field name="VAR">data</field></block></value></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGJsZV9jZW50cmFsCmltcG9ydCBmZWl5aQpmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX21hdHJpeAppbXBvcnQgbWFjaGluZQoKZGVmIGJsZV9tZXRob2QoZGF0YSk6CiAgICBwcmludChkYXRhKQoKCgpibGVfYyA9IGJsZV9jZW50cmFsLkJMRVNpbXBsZUNlbnRyYWwoKQpibGVfYy5yZWN2KGJsZV9tZXRob2QpCndoaWxlIFRydWU6CiAgICBpZiBibGVfYy5pc19jb25uZWN0ZWQoKToKICAgICAgICBpZiBmZWl5aS5idXR0b25fYS53YXNfcHJlc3NlZCgpOgogICAgICAgICAgICBibGVfYy5zZW5kKCd0ZXN0JykKICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93cygnT0snLHNwYWNlID0gMCxjZW50ZXIgPSBUcnVlKQogICAgZWxzZToKICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93cygnPT0nLHNwYWNlID0gMCxjZW50ZXIgPSBUcnVlKQogICAgICAgIHRyeToKICAgICAgICAgICAgYmxlX2MuY29ubmVjdChuYW1lPSdNaXhseV9TbGF2ZScpCiAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOgogICAgICAgICAgICBwYXNzCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><variables><variable id="d$Hz)_vvA0^=g9`rK.n2">data</variable></variables><block type="communicate_bluetooth_peripheral_init" id="?#UT]=GxPx^nmLgY?]8I" x="-1213" y="-853"><value name="VAR"><shadow type="variables_get" id="lZF,kT8Y2M=lL-W2yGqb"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="y,d();(9y3NCy!pC7hir"><field name="TEXT">Mixly_Slave</field></shadow></value><next><block type="communicate_bluetooth_recv" id="xQ*ZXj]3+IsK|eq!f)HB"><value name="VAR"><shadow type="variables_get" id="miF6sMusbS-TWF_h)=wR"><field name="VAR">ble_x</field></shadow></value><value name="METHOD"><shadow type="factory_block_return" id="LK_5ahOU(g,FeN/690/f"><field name="VALUE">ble_method</field></shadow></value><next><block type="controls_whileUntil" id="XlQ=2}I*8~4?~7G4;Ld_"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id=")g;kZQa3.unz6^7i6:.8"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="k3UEI2t2$_Rxb$U_OZaZ"><mutation else="1"></mutation><value name="IF0"><block type="communicate_bluetooth_is_connected" id="{BeBGl~Z$bOT}v^{s$^o"><value name="VAR"><shadow type="variables_get" id="PvC#eKF1btpfQ{?(Eqm8"><field name="VAR">ble_x</field></shadow></value></block></value><statement name="DO0"><block type="display_show_image_or_string_delay" id="p^)4Is7)=;RmZ^K0vWyw"><field name="center">True</field><value name="data"><shadow type="text" id="UT=i;YWn^6Y~t.k)v}FS"><field name="TEXT">OK</field></shadow></value><value name="space"><shadow type="math_number" id="o~_g:FRoO=.:qjKn?B1G"><field name="NUM">0</field></shadow></value><next><block type="controls_if" id=")JG6p})1HtAXIywLPf28"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="!$Q77B`(rOBq9=3jAE$2"><value name="btn"><shadow type="pins_button" id="W}![W*m(U47?BAKq@Uj/"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="ud~e5m*6(UjA;2/1P*l,"><value name="VAR"><shadow type="variables_get" id="Ls*]fI-|l_:=*CxtNe(x"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="GqG{Ozv08RH+#n}v3G[["><field name="TEXT">A按键按下</field></shadow></value></block></statement><next><block type="controls_if" id="Wc,k]A2!}p]@!E:#7vd-"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="!o2nXDJ*G.=vfcZRl`Hq"><value name="btn"><shadow type="pins_button" id="7;2+^YD0{(ncJkQT.Mr#"><field name="PIN">button_b</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="C8YCgVXEYu|w_=8I;eUw"><value name="VAR"><shadow type="variables_get" id="a7d.87J6Fa|m#AzlI(]~"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="ujl}UwG}+/Dg0_1Rz+89"><field name="TEXT">B按键按下</field></shadow></value></block></statement></block></next></block></next></block></statement><statement name="ELSE"><block type="display_show_image_or_string_delay" id="TS8D[v,h5B.#yKrqDP~m"><field name="center">True</field><value name="data"><shadow type="text" id="qA2xoPRdfpW*XAWw=+^f"><field name="TEXT">==</field></shadow></value><value name="space"><shadow type="math_number" id="~/(x+)xZ!B])IT0kd[9R"><field name="NUM">0</field></shadow></value></block></statement></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="Fevu?3a#fM,SzORqlpc7" x="-1208" y="-319"><mutation><arg name="data" varid="d$Hz)_vvA0^=g9`rK.n2"></arg></mutation><field name="NAME">ble_method</field><statement name="STACK"><block type="system_print" id="|ipi{PbFxmdWz4mUQ#9}"><value name="VAR"><shadow type="text" id="@g3gieM{E^BuhoPoddoB"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="qDx@C]d@N4:aV!4`S(4c"><field name="VAR">data</field></block></value></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGJsZV9wZXJpcGhlcmFsCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CmltcG9ydCBmZWl5aQppbXBvcnQgbWFjaGluZQoKZGVmIGJsZV9tZXRob2QoZGF0YSk6CiAgICBwcmludChkYXRhKQoKCgpibGVfeCA9IGJsZV9wZXJpcGhlcmFsLkJMRVNpbXBsZVBlcmlwaGVyYWwoJ01peGx5X1NsYXZlJykKYmxlX3gucmVjdihibGVfbWV0aG9kKQp3aGlsZSBUcnVlOgogICAgaWYgYmxlX3guaXNfY29ubmVjdGVkKCk6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3MoJ09LJyxzcGFjZSA9IDAsY2VudGVyID0gVHJ1ZSkKICAgICAgICBpZiBmZWl5aS5idXR0b25fYS53YXNfcHJlc3NlZCgpOgogICAgICAgICAgICBibGVfeC5zZW5kKCdB5oyJ6ZSu5oyJ5LiLJykKICAgICAgICBpZiBmZWl5aS5idXR0b25fYi53YXNfcHJlc3NlZCgpOgogICAgICAgICAgICBibGVfeC5zZW5kKCdC5oyJ6ZSu5oyJ5LiLJykKICAgIGVsc2U6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3MoJz09JyxzcGFjZSA9IDAsY2VudGVyID0gVHJ1ZSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="espnow_radio_channel" id="4umZ.d91,zoZ[:/(|M4I" x="-912" y="-519"><value name="CHNL"><shadow type="espnow_channel" id="}nFANy9UM?/LXto@^{VE"><field name="PIN">1</field></shadow></value><next><block type="espnow_radio_on_off" id=";kOwjmDwpq=b@D7!I7s7"><field name="on_off">True</field><next><block type="controls_whileUntil" id="/fL3hVwGr~yxV0^Kw:XU"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="gFc/!.)::Iy-1cSt;{vI"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="LSLC!R~.q^[zWM[])[1X"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="c4^trSB:v=_}49F)1R*r"><value name="btn"><shadow type="pins_button" id="l;hiCn6y_dZo?mWa4b7!"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="espnow_radio_send" id=",{]z$h?1l$SvV80jrTZW"><value name="send"><shadow type="text" id="9fkSV[S{)z(ysYA5LDEy"><field name="TEXT">LEFT</field></shadow></value></block></statement><next><block type="controls_if" id="Ngbd6k#s$TT|Nkyb*FGR"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="#R#OWFYgd]LTbyn3rwFq"><value name="btn"><shadow type="pins_button" id="hTAyY=vh;|5y^kzp#@a!"><field name="PIN">button_b</field></shadow></value></block></value><statement name="DO0"><block type="espnow_radio_send" id="@sc(V*]gE(qVjNt?`^[s"><value name="send"><shadow type="text" id="Y,hCEH|L[ty8y9gr2_`7"><field name="TEXT">RIGHT</field></shadow></value></block></statement></block></next></block></statement></block></next></block></next></block><block type="espnow_radio_recv_new" id="7ZVr^21)DFJ8#;3Q*3{i" x="-885" y="-157"><statement name="DO"><block type="system_print" id="]7(73F!Z.XL|pd6q,Zmu"><value name="VAR"><block type="espnow_radio_recv_msg" id="MJ/8N}^-,3sfW+-uK.A|"></block></value></block></statement></block><block type="espnow_radio_recv_certain_msg_new" id="t,`~G8K!h=i;[g*1~e-t" x="-892" y="-35"><field name="msg">LEFT</field><statement name="DO"><block type="display_show_image" id="nnz|AO5X5wC.kJqFMPC)"><value name="data"><shadow type="pins_builtinimg" id="?JmbCwP/2H]*^FA8OewS"><field name="PIN">onboard_matrix.LEFT_ARROW</field></shadow></value></block></statement></block><block type="espnow_radio_recv_certain_msg_new" id=";CPAo)[5j--p})/Hb[=K" x="-902" y="76"><field name="msg">RIGHT</field><statement name="DO"><block type="display_show_image" id="B}uV8)uNI0rb+~@s_8im"><value name="data"><shadow type="pins_builtinimg" id="MF(NG)/k~N{IdOdUAfNs"><field name="PIN">onboard_matrix.RIGHT_ARROW</field></shadow></value></block></statement></block></xml><config>{}</config><code>aW1wb3J0IHJhZGlvCkVTUE5vd19yYWRpbz1yYWRpby5FU1BOb3coKQppbXBvcnQgZmVpeWkKaGFuZGxlX2xpc3Q9W10KaW1wb3J0IG1hY2hpbmUKZGVmIEVTUE5vd19yYWRpb19yZWN2KG1hYyxFU1BOb3dfcmFkaW9fbXNnKToKICAgIHByaW50KEVTUE5vd19yYWRpb19tc2cpCgppZiBub3QgRVNQTm93X3JhZGlvX3JlY3YgaW4gaGFuZGxlX2xpc3Q6CiAgICBoYW5kbGVfbGlzdC5hcHBlbmQoRVNQTm93X3JhZGlvX3JlY3YpCkVTUE5vd19yYWRpby5yZWN2X2NiKGhhbmRsZV9saXN0KQoKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKZGVmIEVTUE5vd19yYWRpb19yZWN2X19MRUZUKG1hYyxFU1BOb3dfcmFkaW9fbXNnKToKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LkxFRlRfQVJST1cpCgppZiBub3QgRVNQTm93X3JhZGlvX3JlY3ZfX0xFRlQgaW4gaGFuZGxlX2xpc3Q6CiAgICBoYW5kbGVfbGlzdC5hcHBlbmQoRVNQTm93X3JhZGlvX3JlY3ZfX0xFRlQpCkVTUE5vd19yYWRpby5yZWN2X2NiKGhhbmRsZV9saXN0KQoKZGVmIEVTUE5vd19yYWRpb19yZWN2X19SSUdIVChtYWMsRVNQTm93X3JhZGlvX21zZyk6CiAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhvbmJvYXJkX21hdHJpeC5SSUdIVF9BUlJPVykKCmlmIG5vdCBFU1BOb3dfcmFkaW9fcmVjdl9fUklHSFQgaW4gaGFuZGxlX2xpc3Q6CiAgICBoYW5kbGVfbGlzdC5hcHBlbmQoRVNQTm93X3JhZGlvX3JlY3ZfX1JJR0hUKQpFU1BOb3dfcmFkaW8ucmVjdl9jYihoYW5kbGVfbGlzdCkKCgoKRVNQTm93X3JhZGlvLnNldF9jaGFubmVsKGNoYW5uZWw9MSkKRVNQTm93X3JhZGlvLmFjdGl2ZShUcnVlKQp3aGlsZSBUcnVlOgogICAgaWYgZmVpeWkuYnV0dG9uX2Eud2FzX3ByZXNzZWQoKToKICAgICAgICBFU1BOb3dfcmFkaW8uc2VuZCgiZmZmZmZmZmZmZmZmIiwnTEVGVCcpCiAgICBpZiBmZWl5aS5idXR0b25fYi53YXNfcHJlc3NlZCgpOgogICAgICAgIEVTUE5vd19yYWRpby5zZW5kKCJmZmZmZmZmZmZmZmYiLCdSSUdIVCcpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="*RFjwgFV*wFQ_rafKV32" x="-557" y="-442"><field name="VAR">lastmsgtime</field><value name="VALUE"><block type="controls_millis" id="XkPqM~;vLRCIn8f#9A1d"><field name="Time">ms</field></block></value><next><block type="espnow_radio_channel" id="bsx#U@#*fkrOqli#edZF"><value name="CHNL"><shadow type="espnow_channel" id="{a@i)sreC`ZS#BKGHGzA"><field name="PIN">1</field></shadow></value><next><block type="espnow_radio_on_off" id="42pi)_)3eF,W01]5OUD{"><field name="on_off">True</field><next><block type="controls_whileUntil" id="A93owY5qE7yo.b_SzY!Z"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="5SC)pG:bSy|YTZpo).M$"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_delay_new" id="F7Tr$QtO=Jr9,_!CY:Rc"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="7VOOS{!hh)o~k-:li!Xz"><field name="NUM">2</field></shadow></value><next><block type="espnow_radio_send" id="BrgMJ6HS(EOj=2KOFZRr"><value name="send"><shadow type="text" id="Jm0`](.$kw{IQGs7_HVK"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="JlU]CUx{Yy6*lD2LYQl}"><value name="VAR"><shadow type="variables_get" id=".u`s6R@k@ZmqWB#bkQ3Y"><field name="VAR">x</field></shadow><block type="controls_millis" id="4$1ul4?^ns/W7?]-GLu7"><field name="Time">ms</field></block></value></block></value><next><block type="controls_if" id="TeNEE)V]`HscC{[#QScv"><value name="IF0"><block type="logic_compare" id="(IQ5TKMubSIUts.QX.F,"><field name="OP">GT</field><value name="A"><block type="math_arithmetic" id="Ckg9).^RDe{]~}=D^mwQ"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="O9UTZix!EnEBeh@c-/=("><field name="NUM">1</field></shadow><block type="controls_millis" id="D@.;a=p*Q:Dg#7Ao|krl"><field name="Time">ms</field></block></value><value name="B"><shadow type="math_number" id="EwH4fg3yt.{4v5[O64|B"><field name="NUM">1</field></shadow><block type="variables_get" id="Vx,*?r$:TZ@A^+5XrJVm"><field name="VAR">lastmsgtime</field></block></value></block></value><value name="B"><block type="math_number" id="6Dkgr:O(;qK==n3={IyI"><field name="NUM">10000</field></block></value></block></value><statement name="DO0"><block type="display_show_image" id="7Nbv^gE)jdar[:wZ^gHd"><value name="data"><shadow type="pins_builtinimg" id="IYwHL`.CRN#.*rNHReFH"><field name="PIN">onboard_matrix.NO</field></shadow></value><next><block type="esp32_onboard_music_play_list" id="iDQtJDTc7m,rbrg!6?ET"><value name="LIST"><shadow type="pins_playlist" id="^gAzR|4j~4a(~OsC8kBW"><field name="PIN">onboard_music.RINGTONE</field></shadow></value></block></next></block></statement></block></next></block></next></block></statement></block></next></block></next></block></next></block><block type="espnow_radio_recv_new" id="(![;x$oj}yic@3u^^rtQ" x="-573" y="-10"><statement name="DO"><block type="variables_global" id="SX7)~NNM}dZc4PkK8bZm"><value name="VAR"><block type="variables_get" id="c(i-~mIyjXwdi],vWRko"><field name="VAR">lastmsgtime</field></block></value><next><block type="display_show_image" id="5)GlHge`uu_l*T$Qtm,t"><value name="data"><shadow type="pins_builtinimg" id="nwr3NjfXu^|e+7hHElyy"><field name="PIN">onboard_matrix.YES</field></shadow></value><next><block type="variables_set" id="7?OUfLXLi~P`s5-b+^kO"><field name="VAR">lastmsgtime</field><value name="VALUE"><block type="controls_millis" id="g*X`/mL7B69XMag}][Y}"><field name="Time">ms</field></block></value></block></next></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IHRpbWUKaW1wb3J0IHJhZGlvCkVTUE5vd19yYWRpbz1yYWRpby5FU1BOb3coKQpmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX21hdHJpeApmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX211c2ljCmhhbmRsZV9saXN0PVtdCmRlZiBFU1BOb3dfcmFkaW9fcmVjdihtYWMsRVNQTm93X3JhZGlvX21zZyk6CiAgICBnbG9iYWwgbGFzdG1zZ3RpbWUKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKG9uYm9hcmRfbWF0cml4LllFUykKICAgIGxhc3Rtc2d0aW1lID0gdGltZS50aWNrc19tcygpCgppZiBub3QgRVNQTm93X3JhZGlvX3JlY3YgaW4gaGFuZGxlX2xpc3Q6CiAgICBoYW5kbGVfbGlzdC5hcHBlbmQoRVNQTm93X3JhZGlvX3JlY3YpCkVTUE5vd19yYWRpby5yZWN2X2NiKGhhbmRsZV9saXN0KQoKCgpsYXN0bXNndGltZSA9IHRpbWUudGlja3NfbXMoKQpFU1BOb3dfcmFkaW8uc2V0X2NoYW5uZWwoY2hhbm5lbD0xKQpFU1BOb3dfcmFkaW8uYWN0aXZlKFRydWUpCndoaWxlIFRydWU6CiAgICB0aW1lLnNsZWVwKDIpCiAgICBFU1BOb3dfcmFkaW8uc2VuZCgiZmZmZmZmZmZmZmZmIixzdHIodGltZS50aWNrc19tcygpKSkKICAgIGlmIHRpbWUudGlja3NfbXMoKSAtIGxhc3Rtc2d0aW1lID4gMTAwMDA6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3Mob25ib2FyZF9tYXRyaXguTk8pCiAgICAgICAgb25ib2FyZF9tdXNpYy5wbGF5KG9uYm9hcmRfbXVzaWMuUklOR1RPTkUpCg==</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="iot_wifi_connect" id="oK?|UMRdwVa{y0Xaj:|=" x="-1317" y="-391"><value name="WIFINAME"><shadow type="text" id="r-NQnY7006OnznZ6aW(d"><field name="TEXT">fuhua3</field></shadow></value><value name="PASSWORD"><shadow type="text" id="uuXul6:I7.w0O(+i;|B$"><field name="TEXT">1234567890</field></shadow></value><next><block type="display_show_image_or_string_delay" id="X]iW`AbZyDU7YHbk{ePE"><field name="center">True</field><value name="data"><shadow type="text" id="8k)O|meYH`(8@r|J.`Jb"><field name="TEXT">WO</field></shadow></value><value name="space"><shadow type="math_number" id="o$S)026JZ#gVzI]zDG2N"><field name="NUM">0</field></shadow></value><next><block type="IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE" id="T*{VqOkgr@4HOl/-]bCv"><value name="SERVER"><shadow type="text" id="wy]A4!]0^CuP5tdqkL/y"><field name="TEXT">mixio.mixly.cn</field></shadow></value><value name="KEY"><shadow type="iot_mixly_key" id="XBS,KM0[toUz-tPW]x@p"><field name="VISITOR_ID">31MOTCLJ</field></shadow></value><next><block type="display_show_image_or_string_delay" id="W_XH;lW3AwS.V`a/i^]`"><field name="center">True</field><value name="data"><shadow type="text" id="Z5+8:oZ#JpGgN9_)/[a,"><field name="TEXT">MO</field></shadow></value><value name="space"><shadow type="math_number" id="Pk)S`3Yn@p_#ymI,Db]0"><field name="NUM">0</field></shadow></value><next><block type="controls_whileUntil" id="zXtfB3UX^tgU8d|J6H!K"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="q9p7IL96DIIH=MgBL!mq"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_delay_new" id="|m=*b_~rk=}K.q,kz9f@"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="2dyJGQ)D3y)TqUC*M+Qs"><field name="NUM">5</field></shadow></value><next><block type="IOT_MIXIO_PUBLISH" id="y7F!lgMem7s1E#P^414n"><value name="TOPIC"><shadow type="text" id="?yB8$cGM)qBrKArPo9=#"><field name="TEXT">光照</field></shadow></value><value name="MSG"><shadow type="text" id="TGLFl*|MG)x=dmuU5oD/"><field name="TEXT">msg</field></shadow><block type="sensor_LTR308" id="[y|eQXuXImVRxCAh|$pc"></block></value><next><block type="display_scroll_string" id="(]tp]7Ag#NhzdKpjRXRt"><value name="data"><shadow type="text" id="SMh@E~lZ0?(3N?DI!bcg"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="x`S9^JisJQeqCE!3Vj1H"><value name="VAR"><shadow type="variables_get" id="5k`h2YZl)=1N+_q=)ZnV"><field name="VAR">x</field></shadow><block type="sensor_LTR308" id="~OfP?6r`_}X[^#CFT-zN"></block></value></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></xml><config>{}</config><code>aW1wb3J0IG1peGlvdApmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX21hdHJpeAppbXBvcnQgbWFjaGluZQpmcm9tIHViaW5hc2NpaSBpbXBvcnQgaGV4bGlmeQppbXBvcnQgdGltZQpmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX2FscwoKCm1peGlvdC53bGFuX2Nvbm5lY3QoJ2Z1aHVhMycsJzEyMzQ1Njc4OTAnKQpvbmJvYXJkX21hdHJpeC5zaG93cygnV08nLHNwYWNlID0gMCxjZW50ZXIgPSBUcnVlKQpNUVRUX1VTUl9QUkogPSAiTWl4SU8vMzFNT1RDTEovZGVmYXVsdC8iCm1xdHRfY2xpZW50ID0gbWl4aW90LmluaXRfTVFUVF9jbGllbnQoJ21peGlvLm1peGx5LmNuJywgIk1peElPX3B1YmxpYyIsICJNaXhJT19wdWJsaWMiLCBNUVRUX1VTUl9QUkopCm9uYm9hcmRfbWF0cml4LnNob3dzKCdNTycsc3BhY2UgPSAwLGNlbnRlciA9IFRydWUpCndoaWxlIFRydWU6CiAgICB0aW1lLnNsZWVwKDUpCiAgICBtcXR0X2NsaWVudC5wdWJsaXNoKE1RVFRfVVNSX1BSSiArICflhYnnhacnLCBvbmJvYXJkX2Fscy5hbHNfdmlzKCkpCiAgICBvbmJvYXJkX21hdHJpeC5zY3JvbGwoc3RyKG9uYm9hcmRfYWxzLmFsc192aXMoKSkpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="iot_wifi_connect" id="oK?|UMRdwVa{y0Xaj:|=" x="-1378" y="-423"><value name="WIFINAME"><shadow type="text" id="r-NQnY7006OnznZ6aW(d"><field name="TEXT">fuhua3</field></shadow></value><value name="PASSWORD"><shadow type="text" id="uuXul6:I7.w0O(+i;|B$"><field name="TEXT">1234567890</field></shadow></value><next><block type="display_show_image_or_string_delay" id="X]iW`AbZyDU7YHbk{ePE"><field name="center">True</field><value name="data"><shadow type="text" id="8k)O|meYH`(8@r|J.`Jb"><field name="TEXT">WO</field></shadow></value><value name="space"><shadow type="math_number" id="o$S)026JZ#gVzI]zDG2N"><field name="NUM">0</field></shadow></value><next><block type="IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE" id="T*{VqOkgr@4HOl/-]bCv"><value name="SERVER"><shadow type="text" id="wy]A4!]0^CuP5tdqkL/y"><field name="TEXT">mixio.mixly.cn</field></shadow></value><value name="KEY"><shadow type="iot_mixly_key" id="XBS,KM0[toUz-tPW]x@p"><field name="VISITOR_ID">31MOTCLJ</field></shadow></value><next><block type="display_show_image_or_string_delay" id="W_XH;lW3AwS.V`a/i^]`"><field name="center">True</field><value name="data"><shadow type="text" id="Z5+8:oZ#JpGgN9_)/[a,"><field name="TEXT">MO</field></shadow></value><value name="space"><shadow type="math_number" id="Pk)S`3Yn@p_#ymI,Db]0"><field name="NUM">0</field></shadow></value><next><block type="controls_whileUntil" id="zXtfB3UX^tgU8d|J6H!K"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="q9p7IL96DIIH=MgBL!mq"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_delay_new" id="|m=*b_~rk=}K.q,kz9f@"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="2dyJGQ)D3y)TqUC*M+Qs"><field name="NUM">5</field></shadow></value><next><block type="IOT_MIXIO_PUBLISH" id="y7F!lgMem7s1E#P^414n"><value name="TOPIC"><shadow type="text" id="?yB8$cGM)qBrKArPo9=#"><field name="TEXT">环境</field></shadow></value><value name="MSG"><shadow type="text" id="TGLFl*|MG)x=dmuU5oD/"><field name="TEXT">msg</field></shadow><block type="IOT_FORMAT_STRING" id="zV6U.}FL1:)p_/3pagnt"><value name="VAR"><block type="dicts_create_with_noreturn" id="UY,XK,[A+XRpsMQYjTtR" inline="false"><mutation items="3"></mutation><field name="KEY0">"光照"</field><field name="KEY1">"声音"</field><field name="KEY2">"震动"</field><value name="ADD0"><block type="sensor_LTR308" id="[y|eQXuXImVRxCAh|$pc"></block></value><value name="ADD1"><block type="sensor_sound" id="^-e8^CGi`5TenjEqo1Jz"></block></value><value name="ADD2"><block type="sensor_get_acceleration" id="O2QzV1lbGaFn6#~Le_@D"><field name="key">strength</field></block></value></block></value></block></value></block></next></block></statement></block></next></block></next></block></next></block></next></block></xml><config>{}</config><code>aW1wb3J0IG1peGlvdApmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX21hdHJpeAppbXBvcnQgbWFjaGluZQpmcm9tIHViaW5hc2NpaSBpbXBvcnQgaGV4bGlmeQppbXBvcnQgdGltZQppbXBvcnQgbWl4cHkKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9hbHMKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9zb3VuZApmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX2FjYwoKCm1peGlvdC53bGFuX2Nvbm5lY3QoJ2Z1aHVhMycsJzEyMzQ1Njc4OTAnKQpvbmJvYXJkX21hdHJpeC5zaG93cygnV08nLHNwYWNlID0gMCxjZW50ZXIgPSBUcnVlKQpNUVRUX1VTUl9QUkogPSAiTWl4SU8vMzFNT1RDTEovZGVmYXVsdC8iCm1xdHRfY2xpZW50ID0gbWl4aW90LmluaXRfTVFUVF9jbGllbnQoJ21peGlvLm1peGx5LmNuJywgIk1peElPX3B1YmxpYyIsICJNaXhJT19wdWJsaWMiLCBNUVRUX1VTUl9QUkopCm9uYm9hcmRfbWF0cml4LnNob3dzKCdNTycsc3BhY2UgPSAwLGNlbnRlciA9IFRydWUpCndoaWxlIFRydWU6CiAgICB0aW1lLnNsZWVwKDUpCiAgICBtcXR0X2NsaWVudC5wdWJsaXNoKE1RVFRfVVNSX1BSSiArICfnjq/looMnLCBtaXhweS5mb3JtYXRfc3RyKHsi5YWJ54WnIjpvbmJvYXJkX2Fscy5hbHNfdmlzKCksICLlo7Dpn7MiOm9uYm9hcmRfc291bmQucmVhZCgpLCAi6ZyH5YqoIjpvbmJvYXJkX2FjYy5zdHJlbmd0aCgpfSkpCg==</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><variables><variable id="x@Yfw8DrgkM3CEl{odMY">client</variable><variable id="Q.[d]Bc~)FuhqVb/l{Uh">topic</variable><variable id="0.A^[Eto)4wE7Tef?SZQ">msg</variable></variables><block type="iot_wifi_connect" id="oK?|UMRdwVa{y0Xaj:|=" x="-2026" y="-593"><value name="WIFINAME"><shadow type="text" id="r-NQnY7006OnznZ6aW(d"><field name="TEXT">fuhua3</field></shadow></value><value name="PASSWORD"><shadow type="text" id="uuXul6:I7.w0O(+i;|B$"><field name="TEXT">1234567890</field></shadow></value><next><block type="display_show_image_or_string_delay" id="X]iW`AbZyDU7YHbk{ePE"><field name="center">False</field><value name="data"><shadow type="text" id="8k)O|meYH`(8@r|J.`Jb"><field name="TEXT">WO</field></shadow></value><value name="space"><shadow type="math_number" id="o$S)026JZ#gVzI]zDG2N"><field name="NUM">0</field></shadow></value><next><block type="IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE" id="T*{VqOkgr@4HOl/-]bCv"><value name="SERVER"><shadow type="text" id="wy]A4!]0^CuP5tdqkL/y"><field name="TEXT">mixio.mixly.cn</field></shadow></value><value name="KEY"><shadow type="iot_mixly_key" id="XBS,KM0[toUz-tPW]x@p"><field name="VISITOR_ID">31MOTCLJ</field></shadow></value><next><block type="display_show_image_or_string_delay" id="W_XH;lW3AwS.V`a/i^]`"><field name="center">False</field><value name="data"><shadow type="text" id="Z5+8:oZ#JpGgN9_)/[a,"><field name="TEXT">MO</field></shadow></value><value name="space"><shadow type="math_number" id="Pk)S`3Yn@p_#ymI,Db]0"><field name="NUM">0</field></shadow></value><next><block type="IOT_MIXIO_SUBSCRIBE" id="]}*+tx?tJ`=M}Rv;E=W?"><value name="TOPIC"><shadow type="text" id="xMFmb@Avb^*/m9fd+=XQ"><field name="TEXT">亮屏</field></shadow></value><value name="METHOD"><shadow type="factory_block_return" id="3a!K(zPrUOx@}#jg-~Qs"><field name="VALUE">method</field></shadow></value><next><block type="controls_whileUntil" id="zXtfB3UX^tgU8d|J6H!K"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="q9p7IL96DIIH=MgBL!mq"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="iot_mixio_check" id="HIlfG?zxcJTi1I?=kcoe"></block></statement></block></next></block></next></block></next></block></next></block></next></block><block type="procedures_defnoreturn" id="w`bvdn1W-.PHM|Jl8}9D" x="-2020" y="-282"><mutation><arg name="client" varid="x@Yfw8DrgkM3CEl{odMY"></arg><arg name="topic" varid="Q.[d]Bc~)FuhqVb/l{Uh"></arg><arg name="msg" varid="0.A^[Eto)4wE7Tef?SZQ"></arg></mutation><field name="NAME">method</field><statement name="STACK"><block type="controls_if" id="rsUZ*pwcELxOa5(|NGB_"><value name="IF0"><block type="logic_compare" id="U6.bG}mYYK.i^eRM43^H"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="B$E)[I*9P2b;Vf$WK7z|"><field name="VAR">msg</field></block></value><value name="B"><block type="text" id="zx//S!Ci;/[/FTRL$WrZ"><field name="TEXT">1</field></block></value></block></value><statement name="DO0"><block type="display_show_image" id="1cn+vAU^71n.N.k1$R!@"><value name="data"><shadow type="pins_builtinimg" id="]WLp-,u23IqJTdq+8IlX"><field name="PIN">onboard_matrix.HEART</field></shadow></value></block></statement><next><block type="controls_if" id="W52onU?[0yYHytnP0MUn"><value name="IF0"><block type="logic_compare" id="S7csQDi(SC}V1F6CbXIA"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="5eXub|iJo[[kXb)nC`X4"><field name="VAR">msg</field></block></value><value name="B"><block type="text" id="U]}e6I]29m$R+1pBUAcy"><field name="TEXT">0</field></block></value></block></value><statement name="DO0"><block type="display_clear" id="^!NBSe90jF]gZq$5p;Pw"></block></statement></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1peGlvdApmcm9tIGZlaXlpIGltcG9ydCBvbmJvYXJkX21hdHJpeAppbXBvcnQgbWFjaGluZQpmcm9tIHViaW5hc2NpaSBpbXBvcnQgaGV4bGlmeQoKZGVmIG1ldGhvZChjbGllbnQsIHRvcGljLCBtc2cpOgogICAgaWYgbXNnID09ICcxJzoKICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93cyhvbmJvYXJkX21hdHJpeC5IRUFSVCkKICAgIGlmIG1zZyA9PSAnMCc6CiAgICAgICAgb25ib2FyZF9tYXRyaXguZmlsbCgwKQogICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3coKQoKCgptaXhpb3Qud2xhbl9jb25uZWN0KCdmdWh1YTMnLCcxMjM0NTY3ODkwJykKb25ib2FyZF9tYXRyaXguc2hvd3MoJ1dPJyxzcGFjZSA9IDAsY2VudGVyID0gRmFsc2UpCk1RVFRfVVNSX1BSSiA9ICJNaXhJTy8zMU1PVENMSi9kZWZhdWx0LyIKbXF0dF9jbGllbnQgPSBtaXhpb3QuaW5pdF9NUVRUX2NsaWVudCgnbWl4aW8ubWl4bHkuY24nLCAiTWl4SU9fcHVibGljIiwgIk1peElPX3B1YmxpYyIsIE1RVFRfVVNSX1BSSikKb25ib2FyZF9tYXRyaXguc2hvd3MoJ01PJyxzcGFjZSA9IDAsY2VudGVyID0gRmFsc2UpCm1xdHRfY2xpZW50LnNldF9jYWxsYmFjaygn5Lqu5bGPJyxtZXRob2QsIE1RVFRfVVNSX1BSSikKbXF0dF9jbGllbnQuc3Vic2NyaWJlKE1RVFRfVVNSX1BSSiArICfkuq7lsY8nKQp3aGlsZSBUcnVlOgogICAgbXF0dF9jbGllbnQuY2hlY2tfbXNnKCkK</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="variables_set" id="_j?QydpHRzkQ?7p]Al8M" x="-2139" y="-747"><field name="VAR">本机用户</field><value name="VALUE"><block type="text" id="U^IJ6noPu=*{LbF;txZE"><field name="TEXT">米思齐</field></block></value><next><block type="iot_wifi_connect" id="{0x/y^5+NyqePOxVQD09"><value name="WIFINAME"><shadow type="text" id="E3[rDXhW,noh2|3.ngeF"><field name="TEXT">fuhua3</field></shadow></value><value name="PASSWORD"><shadow type="text" id="jdzI{kez(W-/=nXbBvMA"><field name="TEXT">1234567890</field></shadow></value><next><block type="IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE" id="h)LIP~.!@`4ZS#dXUo-}"><value name="SERVER"><shadow type="text" id="lMJ.(kqsVh?.J{~u`ngA"><field name="TEXT">mixio.mixly.cn</field></shadow></value><value name="KEY"><shadow type="factory_block_return" id="usjMKY=zfa^!fo-9g:?`"><field name="VALUE">7b6443</field></shadow></value><next><block type="controls_whileUntil" id="U!]89RKHwC;NpmNnt$-O"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="lt3QCnF0AoT33LNs9FvP"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="display_show_image_or_string_delay" id="Y5FYK5Ue0^|8M8U^3TKQ"><field name="center">False</field><value name="data"><shadow type="text" id="~VR1n?L[7su``hAK!]rs"><field name="TEXT">GO</field></shadow></value><value name="space"><shadow type="math_number" id="CetM1IqXOFBY0oL+wCB+"><field name="NUM">0</field></shadow></value><next><block type="controls_if" id="OnW4*1):N,t,wn(i}JDe"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="w(en$~K@XF|#+3q#LQp9"><value name="btn"><shadow type="pins_button" id=",Yo(j=145c*$Qv9{8/Cy"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="display_clear" id="s?p(;_kB5kkMWD3kR-ft"><next><block type="IOT_MIXIO_PUBLISH" id="*6cGf6HkZ_H]nik^~d;d"><value name="TOPIC"><shadow type="text" id="=R2FWxt|a{ri;1*Lx$+!"><field name="TEXT">姓名</field></shadow></value><value name="MSG"><shadow type="text" id="B|e!oDm.wCFOv}(?3)8a"><field name="TEXT">msg</field></shadow><block type="variables_get" id="RA-IE-.go0mm!aX@YUON"><field name="VAR">本机用户</field></block></value><next><block type="display_scroll_string" id="]`aPz?pdX*k|XQa_D7)V"><value name="data"><shadow type="text" id="_V7:3gw)vH8C!d]}9ar-"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id=";2E#b^,wS}sTbq]N,/|1"><field name="VAR">本机用户</field></block></value><next><block type="display_show_image_or_string_delay" id="1:s$LTDn7+fEqv5Y2cE?"><field name="center">False</field><value name="data"><shadow type="text" id="dB}+;=9?Cj(Z-pq3OZeu"><field name="TEXT">OK</field></shadow></value><value name="space"><shadow type="math_number" id="Gz}(h7$5s(dC|^P.HqD]"><field name="NUM">0</field></shadow></value><next><block type="controls_delay_new" id="T[FYn0x)*E2`4QB*:1Vq"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="|0guM8CQD#mhTiXKS]|F"><field name="NUM">1</field></shadow></value><next><block type="display_show_image_or_string_delay" id="$#[jiz{20=Uhof1@G`bx"><field name="center">False</field><value name="data"><shadow type="text" id="lKqI`CSj6Y)nSp/=NNj0"><field name="TEXT">GO</field></shadow></value><value name="space"><shadow type="math_number" id="Q@XDL!qj9#!KGNWu$;tS"><field name="NUM">0</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></statement></block></next></block></next></block></next></block></xml><config>{}</config><code>aW1wb3J0IG1peGlvdAppbXBvcnQgbWFjaGluZQppbXBvcnQgdXJlcXVlc3RzCmZyb20gdWJpbmFzY2lpIGltcG9ydCBoZXhsaWZ5CmZyb20gbWl4cHkgaW1wb3J0IGFuYWx5c2Vfc2hhcmVrZXkKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKaW1wb3J0IGZlaXlpCmltcG9ydCB0aW1lCgoKX0U2XzlDX0FDX0U2XzlDX0JBX0U3Xzk0X0E4X0U2Xzg4X0I3ID0gJ+exs+aAnem9kCcKbWl4aW90LndsYW5fY29ubmVjdCgnZnVodWEzJywnMTIzNDU2Nzg5MCcpCnNrID0gYW5hbHlzZV9zaGFyZWtleSgnaHR0cDovL21peGlvLm1peGx5LmNuL21peGlvLXBocC9zaGFyZWtleS5waHA/c2s9N2I2NDQzJykKTVFUVF9VU1JfUFJKID0gc2tbMF0rJy8nK3NrWzFdKycvJwptcXR0X2NsaWVudCA9IG1peGlvdC5pbml0X01RVFRfY2xpZW50KCdtaXhpby5taXhseS5jbicsIHNrWzBdLCBza1syXSwgTVFUVF9VU1JfUFJKKQp3aGlsZSBUcnVlOgogICAgb25ib2FyZF9tYXRyaXguc2hvd3MoJ0dPJyxzcGFjZSA9IDAsY2VudGVyID0gRmFsc2UpCiAgICBpZiBmZWl5aS5idXR0b25fYS53YXNfcHJlc3NlZCgpOgogICAgICAgIG9uYm9hcmRfbWF0cml4LmZpbGwoMCkKICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93KCkKICAgICAgICBtcXR0X2NsaWVudC5wdWJsaXNoKE1RVFRfVVNSX1BSSiArICflp5PlkI0nLCBfRTZfOUNfQUNfRTZfOUNfQkFfRTdfOTRfQThfRTZfODhfQjcpCiAgICAgICAgb25ib2FyZF9tYXRyaXguc2Nyb2xsKF9FNl85Q19BQ19FNl85Q19CQV9FN185NF9BOF9FNl84OF9CNykKICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93cygnT0snLHNwYWNlID0gMCxjZW50ZXIgPSBGYWxzZSkKICAgICAgICB0aW1lLnNsZWVwKDEpCiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3MoJ0dPJyxzcGFjZSA9IDAsY2VudGVyID0gRmFsc2UpCg==</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="system_print" id="_1Sk*F*xyv}!=qrLf9+-" x="-1455" y="-727"><value name="VAR"><shadow type="text" id="#Ih;KaEl;pl.RmrHlTHI"><field name="TEXT">Mixly</field></shadow><block type="storage_list_all_files" id="(7OZqL.(z:}jOXD^O#xA"></block></value><next><block type="system_print" id="jHfM/z76NPyZL?oTh]Hr"><value name="VAR"><shadow type="text" id="x4T@Q6s]zp,=TNcsQt8W"><field name="TEXT">Mixly</field></shadow><block type="storage_get_current_dir" id="k8O.~U$i}pit!9!kG-3e"></block></value><next><block type="variables_set" id="oXOl!9HD8YK-B2V!@?,g"><field name="VAR">s</field><value name="VALUE"><block type="storage_list_all_files" id="A{/=lkqiz`$?y@,hAf9U"></block></value><next><block type="controls_forEach" id="@ZZjQ!m9rbe@|o(hjEg_"><value name="LIST"><shadow type="list_many_input" id=")SEM;L.F-m/oPEafi-va"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="axPnwr|3qu8r~02/w9C:"><value name="FROM"><shadow type="math_number" id="aWbdo3#AP4F?C5@bSg#s"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id=")[8/1l9=Nh8SWna.aD#9"><field name="NUM">5</field></shadow><block type="list_trig" id="R!dZ3G*E!B.31tl7vebM"><field name="OP">LEN</field><value name="data"><shadow type="variables_get" id="S@~(:]rMt=mX,QCp{Kqb"><field name="VAR">s</field></shadow></value></block></value><value name="STEP"><shadow type="math_number" id="6OPgJcaTG.=0@lKeUFW8"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="24LQ*@LM[J9coe(!kq_p"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="system_print" id="Yc|si_t.}Z1LHNiB_WZc"><value name="VAR"><shadow type="text" id="1C4O?7t]N:;Y{mH}wd`t"><field name="TEXT">Mixly</field></shadow><block type="lists_get_index" id="UbtA9aNd}ffS[l+@-YfP"><value name="LIST"><shadow type="variables_get" id="DD[/`oBBnHT~|Y1V-0rO"><field name="VAR">s</field></shadow></value><value name="AT"><shadow type="math_number" id="s~gzJp.5m7TOK/m`/r@x"><field name="NUM">0</field></shadow><block type="variables_get" id="$8.n1Yor3of+IBE8)x_]"><field name="VAR">i</field></block></value></block></value></block></statement></block></next></block></next></block></next></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKaW1wb3J0IG9zCmltcG9ydCBtYXRoCgoKcHJpbnQob3MubGlzdGRpcigpKQpwcmludChvcy5nZXRjd2QoKSkKcyA9IG9zLmxpc3RkaXIoKQpmb3IgaSBpbiByYW5nZSgwLCBsZW4ocyksIDEpOgogICAgcHJpbnQoc1tpXSkK</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="system_print" id="FcB,{!,.LuD2q|x.o:bm" x="-1372" y="-566"><value name="VAR"><shadow type="text" id="Zo`:!(W+ov?q2dI`nVSg"><field name="TEXT">Mixly</field></shadow><block type="storage_list_all_files" id="nIi.k0_ZaAv61Ih)Ly2D"></block></value><next><block type="system_print" id="@MLP]Xs)gPHJv)gc.HI!"><value name="VAR"><shadow type="text" id="qb00|A.WFw1GXRHH$6od"><field name="TEXT">Mixly</field></shadow><block type="storage_get_current_dir" id="G6/~!(nm=lw.(/CeW~5j"></block></value><next><block type="variables_set" id="Azs`m.[x3$t4+6sc_AA5"><field name="VAR">s</field><value name="VALUE"><block type="storage_list_all_files" id="xKWprJ/^xdOQ:X?Gho?V"></block></value><next><block type="controls_forEach" id="UHf2mqxJWdR{HK$A*Cl="><value name="LIST"><shadow type="list_many_input" id="eDx*$pdJA|Vq74~g#;Wp"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="L7`j0Fn[i_{6H*b@UVnp"><value name="FROM"><shadow type="math_number" id="]XE)D/qzL_:+Rci{tD##"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="frEJ]+V-Y$wf!`Lc)GGx"><field name="NUM">5</field></shadow><block type="list_trig" id="I=(niO!`I9Q#`itPaUMn"><field name="OP">LEN</field><value name="data"><shadow type="variables_get" id="{f}MVwQxBx{w?c6m4A-#"><field name="VAR">s</field></shadow></value></block></value><value name="STEP"><shadow type="math_number" id="UqPwK_SGM#H7{Q/gPz}6"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id=")rRcW`[zdQU+KFjbp.lf"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="display_scroll_string" id="h*T_ohVKAkeBb0fbd)3Z"><value name="data"><shadow type="text" id="pK2|z,z+jAI{Ensf:@!A"><field name="TEXT">Mixly</field></shadow><block type="lists_get_index" id="$#$9HfhT/*ZxVDG~Sw9+"><value name="LIST"><shadow type="variables_get" id="o6G1{=wlz+.nC|vW!Mig"><field name="VAR">s</field></shadow></value><value name="AT"><shadow type="math_number" id="iz7_jcxlBS6KygJ!6-}Z"><field name="NUM">0</field></shadow><block type="variables_get" id=":5-iC|Y68_Xk([Hb,sgv"><field name="VAR">i</field></block></value></block></value></block></statement></block></next></block></next></block></next></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKaW1wb3J0IG9zCmltcG9ydCBtYXRoCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgoKcHJpbnQob3MubGlzdGRpcigpKQpwcmludChvcy5nZXRjd2QoKSkKcyA9IG9zLmxpc3RkaXIoKQpmb3IgaSBpbiByYW5nZSgwLCBsZW4ocyksIDEpOgogICAgb25ib2FyZF9tYXRyaXguc2Nyb2xsKHNbaV0pCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="storage_fileopen" id="$r8w{Tv*KHB4E:::+xTE" x="-1749" y="-505"><field name="MODE">w</field><value name="FILENAME"><shadow type="text" id="@s8i)GpHltHhvu0^gx0e"><field name="TEXT">test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="KNl`I-9ePg:htyfEna|B"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id="Amsgo8.x.z9b;F]*p-#C"><value name="LIST"><shadow type="list_many_input" id="tF#T`0jUfGxj@ena)zUj"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="eu#)Rw|E@2z`r/^LUjAw"><value name="FROM"><shadow type="math_number" id="U,JjLVfSa,OI|=Z;YI?."><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="@|(M388^n7QR~X(Lb~;1"><field name="NUM">100</field></shadow></value><value name="STEP"><shadow type="math_number" id="[:8U?kc{=wNw78AB$aql"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="sI_P0}`wN!@cnz#HI8RS"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="storage_file_write" id="9j]Ir)q5!-kYJc$-d)[7"><value name="data"><shadow type="text" id="0Jh_@2/i`Nplk:Iw*WLO"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="dc+#r5ngC?=yFF`pwSU,"><value name="VAR"><shadow type="variables_get" id="^=o?PtH#Ur`2cDwIe|Xj"><field name="VAR">x</field></shadow><block type="variables_get" id="^[fF_/a[d#Iz/(AODA13"><field name="VAR">i</field></block></value></block></value><value name="FILE"><shadow type="variables_get" id=":aJlEhaG/J0f:MZb+-sx"><field name="VAR">f</field></shadow></value><next><block type="storage_file_write" id="qZA.Xrf(z*:-_X8zj79d"><value name="data"><shadow type="text" id="XQ;J6cZhZGX-7#`sMZ-x"><field name="TEXT">Mixly</field></shadow><block type="ascii_to_char" id="y1y,g/bhF=yZOzUE@#0c"><value name="VAR"><shadow type="math_number" id="|v+WYU!hPo9^t)J;Rzdg"><field name="NUM">13</field></shadow></value></block></value><value name="FILE"><shadow type="variables_get" id="baV(L7d!WX-+@N^56je_"><field name="VAR">f</field></shadow></value></block></next></block></statement><next><block type="storage_close_file" id="xFGGsHak:B31J#D-29`q"><value name="FILE"><shadow type="variables_get" id="_$S!f)6X}qdUCS]=I|!R"><field name="VAR">f</field></shadow></value><next><block type="storage_fileopen" id="mz8Wn!v/QfN~4vZ?P`tJ"><field name="MODE">r</field><value name="FILENAME"><shadow type="text" id="AJ{xl?E|cqDR-/UrwQ!C"><field name="TEXT">test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="qM(-Ow,Z!^h`.qDt~{Zu"><field name="VAR">f</field></shadow></value><next><block type="variables_set" id="n$b2f[BLog8KbiKx^8Yu"><field name="VAR">s</field><value name="VALUE"><block type="storage_get_contents_without_para" id="+AD[X?yfc?)m5ur{$-_2"><field name="MODE">readline</field><value name="FILE"><shadow type="variables_get" id=".Y0,jeYDaHX4e2hZ95rN"><field name="VAR">f</field></shadow></value></block></value><next><block type="controls_whileUntil" id="#.b6{mDqY-7`C?[gb^Hq"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="aC^Q!668}j+dK9/MdXQX"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="uM*N}*_4Ex5Sw(5u;F/2"><field name="VAR">s</field></block></value><statement name="DO"><block type="system_print_inline" id="0=#zLh(doq7WQL:CyY*2"><value name="VAR"><shadow type="text" id=":sG+?MjsNI:x@Zd0Ie*j"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="t;a|TGU_BL}VCuW*~Uu!"><field name="VAR">s</field></block></value><next><block type="variables_set" id="[u49goXEvvit.tkcy:Z-"><field name="VAR">s</field><value name="VALUE"><block type="storage_get_contents_without_para" id="Du/0@qIR[8Nib=(S?~)B"><field name="MODE">readline</field><value name="FILE"><shadow type="variables_get" id="hIJzdn,}flM@N7dl-RXb"><field name="VAR">f</field></shadow></value></block></value></block></next></block></statement><next><block type="storage_close_file" id="tT.ls!Dp:JuL|@9FfrR@"><value name="FILE"><shadow type="variables_get" id="d[gKd1h6HNrtj,/PEVJM"><field name="VAR">f</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></xml><config>{}</config><code>aW1wb3J0IG1hY2hpbmUKCgpmID0gb3BlbigndGVzdC50eHQnLCAndycpCmZvciBpIGluIHJhbmdlKDAsIDEwMCwgMSk6CiAgICBmLndyaXRlKHN0cihpKSkKICAgIGYud3JpdGUoY2hyKDEzKSkKZi5jbG9zZSgpCmYgPSBvcGVuKCd0ZXN0LnR4dCcsICdyJykKcyA9IGYucmVhZGxpbmUoKQp3aGlsZSBzOgogICAgcHJpbnQocyxlbmQgPSIiKQogICAgcyA9IGYucmVhZGxpbmUoKQpmLmNsb3NlKCkK</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="C.B*An/=r!_!*/gKbt!y" x="-1793" y="-680"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="|{fnF3fdgDf]fobF,24K"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="bitbot_move" id="2aAZoykY9VjS$5?Mn(g*"><field name="VAR">F</field><value name="speed"><shadow type="math_number" id="KEENw^^YM79}c(lYOzXm"><field name="NUM">100</field></shadow></value><next><block type="controls_delay_new" id="p:6VygmMo7#@;I4sa!SK"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="iz3Fa*4-VSu5BO#1JMGI"><field name="NUM">1</field></shadow></value><next><block type="bitbot_move" id="rN(2mR-9Yy!nfb2z:?hV"><field name="VAR">L</field><value name="speed"><shadow type="math_number" id="(!y,YY;G44!nM3S)YbRq"><field name="NUM">100</field></shadow></value><next><block type="controls_delay_new" id="7tuJ/fSPgTp=/bH$=4`w"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="w5Gd@$DC_mlveV49b[WE"><field name="NUM">0.5</field></shadow></value></block></next></block></next></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9ib3Q1MQppbXBvcnQgdGltZQoKCndoaWxlIFRydWU6CiAgICBvbmJvYXJkX2JvdDUxLm1vdmUoIkYiLDEwMCkKICAgIHRpbWUuc2xlZXAoMSkKICAgIG9uYm9hcmRfYm90NTEubW92ZSgiTCIsMTAwKQogICAgdGltZS5zbGVlcCgwLjUpCg==</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="bitbot_motor" id="i.*SIRj@iT4OCb[NE^|o" x="-1191" y="-326"><field name="wheel">0</field><field name="direction">CW</field><value name="speed"><shadow type="math_number" id=".oIeLhN8k.v1.ey~Uu5|"><field name="NUM">100</field></shadow></value><next><block type="bitbot_motor" id=",*q?,brVR3+3WrxZgTs-"><field name="wheel">1</field><field name="direction">CCW</field><value name="speed"><shadow type="math_number" id="?AjB=eOK6,xQyb*e}x32"><field name="NUM">60</field></shadow></value><next><block type="controls_whileUntil" id="PN8$Z[Iqr~*7^RC^L;=("><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="(c=oK!*/}*Ne9LL~Z4*N"><field name="BOOL">TRUE</field></shadow></value></block></next></block></next></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9ib3Q1MQoKCm9uYm9hcmRfYm90NTEubW90b3IoMCwiQ1ciLDEwMCkKb25ib2FyZF9ib3Q1MS5tb3RvcigxLCJDQ1ciLDYwKQp3aGlsZSBUcnVlOgogICAgcGFzcwo=</code>
|
||||
@@ -0,0 +1 @@
|
||||
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="x/t^a#D@NJf|z_}`Ku1k" x="-1776" y="-415"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="Zu5k0g$2Co.5t(,]|~qt"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="bitbot_move" id="di.|+SYswv.{=FyX{I*F"><field name="VAR">F</field><value name="speed"><shadow type="math_number" id="qu08JP2ae_c#ke9~Ek#U"><field name="NUM">100</field></shadow></value><next><block type="controls_if" id="euYN_E`w?p?K(5@jHS]J"><value name="IF0"><block type="logic_compare" id="FF4(o2t=}Y*ipzk2nM3["><field name="OP">LT</field><value name="A"><block type="robot_infrared_extern_get_value" id="cC6q*G0])i^/45-ygW50"><field name="mode">0</field></block></value><value name="B"><block type="math_number" id="vBdN-T*BM^?b)-:i~Wut"><field name="NUM">50</field></block></value></block></value><statement name="DO0"><block type="bitbot_move" id="iZMRDwLcJ=;~(/nZLWvR"><field name="VAR">B</field><value name="speed"><shadow type="math_number" id="B4wysFUEIxt-)fP;lT[c"><field name="NUM">100</field></shadow></value><next><block type="controls_delay_new" id="kYh5}.2](Rgi{uxmrrQy"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id=".^DCB!edUqk4#~A.=xFC"><field name="NUM">1</field></shadow></value><next><block type="bitbot_move" id="LRN.s8EpO@T+5#y:2MRx"><field name="VAR">R</field><value name="speed"><shadow type="math_number" id="Am/WY2y[`lpz(B4lkl4p"><field name="NUM">100</field></shadow></value><next><block type="controls_delay_new" id="*uA,lqEWurhC|wVSj[C{"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="|z8Oc]$;s9G,h54NGIa!"><field name="NUM">0.5</field></shadow></value></block></next></block></next></block></next></block></statement><next><block type="controls_if" id=";CV.e(:dxSkb,Y,;xi9-"><value name="IF0"><block type="logic_compare" id="obSasm0Z_7wyAu0WMm4F"><field name="OP">LT</field><value name="A"><block type="robot_infrared_extern_get_value" id="(M0Gr|l+Wfp@olWlgb?R"><field name="mode">1</field></block></value><value name="B"><block type="math_number" id="ltl*n963WooE0?cRjGrz"><field name="NUM">50</field></block></value></block></value><statement name="DO0"><block type="bitbot_move" id=";S.14*c1^]o$M,m-8tkH"><field name="VAR">B</field><value name="speed"><shadow type="math_number" id="S@?wko[lM{~nytM0*fzp"><field name="NUM">100</field></shadow></value><next><block type="controls_delay_new" id="n|J;YTt1=!`bf[=b*CUR"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="iV^VEZz`[Fi9DTZ^8j(2"><field name="NUM">1</field></shadow></value><next><block type="bitbot_move" id="ltR*=Fr0ZA)sL0:xdfxU"><field name="VAR">L</field><value name="speed"><shadow type="math_number" id="JOBS!~96vd]oB9#`s!k@"><field name="NUM">100</field></shadow></value><next><block type="controls_delay_new" id="IeY0Sb|u?@j4mn:d3z34"><field name="Time">s</field><value name="DELAY_TIME"><shadow type="math_number" id="IB/0^,KuaP7|wrC@GI#G"><field name="NUM">0.5</field></shadow></value></block></next></block></next></block></next></block></statement></block></next></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9ib3Q1MQppbXBvcnQgdGltZQoKCndoaWxlIFRydWU6CiAgICBvbmJvYXJkX2JvdDUxLm1vdmUoIkYiLDEwMCkKICAgIGlmIG9uYm9hcmRfYm90NTEucmVhZF9wcygwKSA8IDUwOgogICAgICAgIG9uYm9hcmRfYm90NTEubW92ZSgiQiIsMTAwKQogICAgICAgIHRpbWUuc2xlZXAoMSkKICAgICAgICBvbmJvYXJkX2JvdDUxLm1vdmUoIlIiLDEwMCkKICAgICAgICB0aW1lLnNsZWVwKDAuNSkKICAgIGlmIG9uYm9hcmRfYm90NTEucmVhZF9wcygxKSA8IDUwOgogICAgICAgIG9uYm9hcmRfYm90NTEubW92ZSgiQiIsMTAwKQogICAgICAgIHRpbWUuc2xlZXAoMSkKICAgICAgICBvbmJvYXJkX2JvdDUxLm1vdmUoIkwiLDEwMCkKICAgICAgICB0aW1lLnNsZWVwKDAuNSkK</code>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user