Merge branch 'boards'
This commit is contained in:
@@ -19,6 +19,8 @@ _IRQ_CENTRAL_DISCONNECT = const(2)
|
|||||||
_IRQ_GATTS_WRITE = const(3)
|
_IRQ_GATTS_WRITE = const(3)
|
||||||
_IRQ_MTU_EXCHANGED = const(21)
|
_IRQ_MTU_EXCHANGED = const(21)
|
||||||
_IRQ_CONNECTION_UPDATE = const(27)
|
_IRQ_CONNECTION_UPDATE = const(27)
|
||||||
|
_IRQ_GET_SECRET = const(29)
|
||||||
|
_IRQ_SET_SECRET = const(30)
|
||||||
_IRQ_PASSKEY_ACTION = const(31)
|
_IRQ_PASSKEY_ACTION = const(31)
|
||||||
_PASSKEY_ACTION_INPUT = const(2)
|
_PASSKEY_ACTION_INPUT = const(2)
|
||||||
_PASSKEY_ACTION_DISP = const(3)
|
_PASSKEY_ACTION_DISP = const(3)
|
||||||
@@ -66,6 +68,11 @@ class Keyboard:
|
|||||||
self.passkey = passkey
|
self.passkey = passkey
|
||||||
self.battery_level = battery_level
|
self.battery_level = battery_level
|
||||||
self.report = b'\x00'
|
self.report = b'\x00'
|
||||||
|
try:
|
||||||
|
import ble_hid_key
|
||||||
|
self.keys = ble_hid_key.keys
|
||||||
|
except:
|
||||||
|
self.keys = {}
|
||||||
|
|
||||||
handles = self._ble.gatts_register_services((_DIS, _BAS, _HIDS))
|
handles = self._ble.gatts_register_services((_DIS, _BAS, _HIDS))
|
||||||
self._service_characteristics(handles)
|
self._service_characteristics(handles)
|
||||||
@@ -107,9 +114,43 @@ class Keyboard:
|
|||||||
elif event == _IRQ_GATTS_WRITE:
|
elif event == _IRQ_GATTS_WRITE:
|
||||||
conn_handle, attr_handle = data
|
conn_handle, attr_handle = data
|
||||||
self.report = self._ble.gatts_read(attr_handle)
|
self.report = self._ble.gatts_read(attr_handle)
|
||||||
|
elif event == _IRQ_SET_SECRET:
|
||||||
|
sec_type, key, value = data
|
||||||
|
key = sec_type, bytes(key)
|
||||||
|
value = bytes(value) if value else None
|
||||||
|
#print("Set secret: ", key, value)
|
||||||
|
if value is None:
|
||||||
|
if key in self.keys:
|
||||||
|
del self.keys[key]
|
||||||
|
self.key_secrets(self.keys)
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
self.keys[key] = value
|
||||||
|
self.key_secrets(self.keys)
|
||||||
|
return True
|
||||||
|
elif event == _IRQ_GET_SECRET:
|
||||||
|
sec_type, index, key = data
|
||||||
|
#print("Get secret: ", sec_type, index, bytes(key) if key else None)
|
||||||
|
if key is None:
|
||||||
|
i = 0
|
||||||
|
for (t, _key), value in self.keys.items():
|
||||||
|
if t == sec_type:
|
||||||
|
if i == index:
|
||||||
|
return value
|
||||||
|
i += 1
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
key = sec_type, bytes(key)
|
||||||
|
return self.keys.get(key, None)
|
||||||
#else:
|
#else:
|
||||||
#print("Unhandled IRQ event: ", event, data)
|
#print("Unhandled IRQ event: ", event, data)
|
||||||
|
|
||||||
|
def key_secrets(self, keys={}):
|
||||||
|
with open("ble_hid_key.py", "w+") as s_f:
|
||||||
|
s_f.write("keys=" + str(keys) + "\n")
|
||||||
|
|
||||||
def _service_characteristics(self, handles):
|
def _service_characteristics(self, handles):
|
||||||
(h_mod, h_ser, h_fwr, h_hwr, h_swr, h_man, h_pnp) = handles[0]
|
(h_mod, h_ser, h_fwr, h_hwr, h_swr, h_man, h_pnp) = handles[0]
|
||||||
(self.h_bat, h_ccc, h_bfmt,) = handles[1]
|
(self.h_bat, h_ccc, h_bfmt,) = handles[1]
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ _IRQ_CENTRAL_CONNECT = const(1)
|
|||||||
_IRQ_CENTRAL_DISCONNECT = const(2)
|
_IRQ_CENTRAL_DISCONNECT = const(2)
|
||||||
_IRQ_MTU_EXCHANGED = const(21)
|
_IRQ_MTU_EXCHANGED = const(21)
|
||||||
_IRQ_CONNECTION_UPDATE = const(27)
|
_IRQ_CONNECTION_UPDATE = const(27)
|
||||||
|
_IRQ_GET_SECRET = const(29)
|
||||||
|
_IRQ_SET_SECRET = const(30)
|
||||||
_IRQ_PASSKEY_ACTION = const(31)
|
_IRQ_PASSKEY_ACTION = const(31)
|
||||||
_PASSKEY_ACTION_INPUT = const(2)
|
_PASSKEY_ACTION_INPUT = const(2)
|
||||||
_PASSKEY_ACTION_DISP = const(3)
|
_PASSKEY_ACTION_DISP = const(3)
|
||||||
@@ -60,6 +62,11 @@ class Mouse:
|
|||||||
self.conn_handle = None
|
self.conn_handle = None
|
||||||
self.passkey = passkey
|
self.passkey = passkey
|
||||||
self.battery_level = battery_level
|
self.battery_level = battery_level
|
||||||
|
try:
|
||||||
|
import ble_hid_key
|
||||||
|
self.keys = ble_hid_key.keys
|
||||||
|
except:
|
||||||
|
self.keys = {}
|
||||||
|
|
||||||
handles = self._ble.gatts_register_services((_DIS, _BAS, _HIDS))
|
handles = self._ble.gatts_register_services((_DIS, _BAS, _HIDS))
|
||||||
self._service_characteristics(handles)
|
self._service_characteristics(handles)
|
||||||
@@ -98,9 +105,43 @@ class Mouse:
|
|||||||
self._ble.gap_passkey(conn_handle, action, None)
|
self._ble.gap_passkey(conn_handle, action, None)
|
||||||
else:
|
else:
|
||||||
print("unknown action")
|
print("unknown action")
|
||||||
|
elif event == _IRQ_SET_SECRET:
|
||||||
|
sec_type, key, value = data
|
||||||
|
key = sec_type, bytes(key)
|
||||||
|
value = bytes(value) if value else None
|
||||||
|
#print("Set secret: ", key, value)
|
||||||
|
if value is None:
|
||||||
|
if key in self.keys:
|
||||||
|
del self.keys[key]
|
||||||
|
self.key_secrets(self.keys)
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
self.keys[key] = value
|
||||||
|
self.key_secrets(self.keys)
|
||||||
|
return True
|
||||||
|
elif event == _IRQ_GET_SECRET:
|
||||||
|
sec_type, index, key = data
|
||||||
|
#print("Get secret: ", sec_type, index, bytes(key) if key else None)
|
||||||
|
if key is None:
|
||||||
|
i = 0
|
||||||
|
for (t, _key), value in self.keys.items():
|
||||||
|
if t == sec_type:
|
||||||
|
if i == index:
|
||||||
|
return value
|
||||||
|
i += 1
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
key = sec_type, bytes(key)
|
||||||
|
return self.keys.get(key, None)
|
||||||
#else:
|
#else:
|
||||||
#print("Unhandled IRQ event: ", event, data)
|
#print("Unhandled IRQ event: ", event, data)
|
||||||
|
|
||||||
|
def key_secrets(self, keys={}):
|
||||||
|
with open("ble_hid_key.py", "w+") as s_f:
|
||||||
|
s_f.write("keys=" + str(keys) + "\n")
|
||||||
|
|
||||||
def _service_characteristics(self, handles):
|
def _service_characteristics(self, handles):
|
||||||
(h_mod, h_ser, h_fwr, h_hwr, h_swr, h_man, h_pnp) = handles[0]
|
(h_mod, h_ser, h_fwr, h_hwr, h_swr, h_man, h_pnp) = handles[0]
|
||||||
(self.h_bat, h_ccc, h_bfmt,) = handles[1]
|
(self.h_bat, h_ccc, h_bfmt,) = handles[1]
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ class LTR_381RGB:
|
|||||||
return round(self._als, 2), self._ir, self._color
|
return round(self._als, 2), self._ir, self._color
|
||||||
|
|
||||||
def color(self):
|
def color(self):
|
||||||
return self.getdata[2]
|
return self.getdata()[2]
|
||||||
|
|
||||||
def ir(self):
|
def ir(self):
|
||||||
return self.getdata[1]
|
return self.getdata()[1]
|
||||||
|
|
||||||
def als(self):
|
def als(self):
|
||||||
return self.getdata[0]
|
return self.getdata()[0]
|
||||||
|
|||||||
78
boards/default_src/micropython/origin/build/lib/ucs12071.py
Normal file
78
boards/default_src/micropython/origin/build/lib/ucs12071.py
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
"""
|
||||||
|
UCS12071
|
||||||
|
|
||||||
|
MicroPython library for the UCS12071 (Color sensor)
|
||||||
|
=======================================================
|
||||||
|
@dahanzimin From the Mixly Team
|
||||||
|
"""
|
||||||
|
import time
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
|
UCS_SYSM_CTRL = const(0x00)
|
||||||
|
UCS_INT_FLAG = const(0x02)
|
||||||
|
UCS_WAIT_TIME = const(0x03)
|
||||||
|
UCS_CLS_GAIN = const(0x04)
|
||||||
|
UCS_CLS_TIME = const(0x05)
|
||||||
|
UCS_CLS_DATA = const(0x1C)
|
||||||
|
|
||||||
|
_GAINS_X = (1, 4, 8, 32, 96, 192)
|
||||||
|
|
||||||
|
class UCS1207:
|
||||||
|
def __init__(self, i2c_bus, addr=0x38, gain=2):
|
||||||
|
self._device = i2c_bus
|
||||||
|
self._address = addr
|
||||||
|
self._gain = gain
|
||||||
|
self._color = [0, 0, 0]
|
||||||
|
self._ir = 0
|
||||||
|
self._als = 0
|
||||||
|
self._configure()
|
||||||
|
|
||||||
|
def _wreg(self, reg, val):
|
||||||
|
'''Write memory address'''
|
||||||
|
self._device.writeto_mem(self._address,reg,val.to_bytes(1, 'little'))
|
||||||
|
|
||||||
|
def _rreg(self, reg, nbytes=1):
|
||||||
|
'''Read memory address'''
|
||||||
|
return self._device.readfrom_mem(self._address, reg, nbytes)[0] if nbytes<=1 else self._device.readfrom_mem(self._address, reg, nbytes)[0:nbytes]
|
||||||
|
|
||||||
|
def _configure(self):
|
||||||
|
'''Configuration Register'''
|
||||||
|
#self._wreg(UCS_SYSM_CTRL, 0x80) #Software reset
|
||||||
|
self._wreg(UCS_SYSM_CTRL, 0x03) #CLS & IR Enable
|
||||||
|
self._wreg(UCS_CLS_GAIN, 1 << self._gain | 0x80) #CLS sensing gain
|
||||||
|
self._wreg(UCS_CLS_TIME, 0x03) #CLSCONV INT_TIME
|
||||||
|
self._wreg(UCS_WAIT_TIME, 0x00) #10ms per time unit
|
||||||
|
|
||||||
|
def status(self):
|
||||||
|
'''Data conversion status'''
|
||||||
|
return self._rreg(UCS_INT_FLAG) & 0x40
|
||||||
|
|
||||||
|
def getdata(self):
|
||||||
|
'''Processing data acquisition'''
|
||||||
|
if not self.status():
|
||||||
|
_buf = self._rreg(UCS_CLS_DATA, 10)
|
||||||
|
self._color[0] = _buf[0] | _buf[1] << 8
|
||||||
|
self._color[1] = _buf[2] | _buf[3] << 8
|
||||||
|
self._color[2] = _buf[4] | _buf[5] << 8
|
||||||
|
self._als = _buf[6] | _buf[7] << 8
|
||||||
|
self._ir = _buf[8] | _buf[9] << 8
|
||||||
|
return self._als, self._ir, self._color
|
||||||
|
|
||||||
|
def color(self):
|
||||||
|
w, _, (r, g, b) = self.getdata()
|
||||||
|
if w == 0:
|
||||||
|
return (0, 0, 0)
|
||||||
|
else:
|
||||||
|
red = int(pow((int((r / w) * 256) / 255), 2.5) * 255)
|
||||||
|
green = int(pow((int((g / w) * 256) / 255), 2.5) * 255)
|
||||||
|
blue = int(pow((int((b / w) * 256) / 255), 2.5) * 255)
|
||||||
|
return (min(red, 255), min(green, 255), min(blue, 255))
|
||||||
|
|
||||||
|
def color_raw(self):
|
||||||
|
return self.getdata()[2]
|
||||||
|
|
||||||
|
def ir(self):
|
||||||
|
return round(self.getdata()[1] / _GAINS_X[self._gain])
|
||||||
|
|
||||||
|
def als(self):
|
||||||
|
return round(self.getdata()[0] / _GAINS_X[self._gain])
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,16 +10,16 @@
|
|||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32:mixgo": {
|
"micropython:esp32:mixgo": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/MixGo-0x1000-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/Mixgo-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:mixgo_pe": {
|
"micropython:esp32:mixgo_pe": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/MixGo_PE-0x1000-V1.19.1.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/Mixgo_PE-v1.23.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:generic": {
|
"micropython:esp32:generic": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/Generic_ESP32-0x1000-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/Generic_ESP32-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:mpython": {
|
"micropython:esp32:mpython": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/mPython-0x1000-V1.19.1.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/mPython-v1.23.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"reset": [
|
"reset": [
|
||||||
{
|
{
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x1000",
|
"offset": "0x1000",
|
||||||
"path": "./build/MixGo-0x1000-V1.19.1-lib.bin"
|
"path": "./build/Mixgo_lib-v1.23.0.bin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"offset": "0X3A0000",
|
"offset": "0X3A0000",
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x1000",
|
"offset": "0x1000",
|
||||||
"path": "./build/MixGo_PE-0x1000-V1.19.1-lib.bin"
|
"path": "./build/Mixgo_PE_lib-v1.23.0.bin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"offset": "0x700000",
|
"offset": "0x700000",
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x1000",
|
"offset": "0x1000",
|
||||||
"path": "./build/Generic_ESP32-0x1000-V1.19.1-lib.bin"
|
"path": "./build/Generic_ESP32_lib-v1.23.0.bin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"offset": "0X3A0000",
|
"offset": "0X3A0000",
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x1000",
|
"offset": "0x1000",
|
||||||
"path": "./build/mPython-0x1000-V1.19.1-lib.bin"
|
"path": "./build/mPython_lib-v1.23.0.bin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"offset": "0x700000",
|
"offset": "0x700000",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,16 +10,16 @@
|
|||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32c3:mixgo_cc": {
|
"micropython:esp32c3:mixgo_cc": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/MixGo_CC-0x0-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Mixgo_CC-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32c3:mixgo_me": {
|
"micropython:esp32c3:mixgo_me": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/MixGo_ME-0x0-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Mixgo_ME-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32c3:mixgocar_c3": {
|
"micropython:esp32c3:mixgocar_c3": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/MixGo_Car-0x0-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Mixgo_Car-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32c3:generic": {
|
"micropython:esp32c3:generic": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Generic_C3_UART-0x0-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Generic_C3_UART-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x0000",
|
"offset": "0x0000",
|
||||||
"path": "./build/MixGo_CC-0x0-V1.19.1-lib.bin"
|
"path": "./build/Mixgo_CC_lib-v1.23.0.bin"
|
||||||
}, {
|
}, {
|
||||||
"offset": "0x3A0000",
|
"offset": "0x3A0000",
|
||||||
"path": "../micropython/build/HZK12.bin"
|
"path": "../micropython/build/HZK12.bin"
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x0000",
|
"offset": "0x0000",
|
||||||
"path": "./build/MixGo_ME-0x0-V1.19.1-lib.bin"
|
"path": "./build/Mixgo_ME_lib-v1.23.0.bin"
|
||||||
}, {
|
}, {
|
||||||
"offset": "0x3A0000",
|
"offset": "0x3A0000",
|
||||||
"path": "../micropython/build/HZK12.bin"
|
"path": "../micropython/build/HZK12.bin"
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x0000",
|
"offset": "0x0000",
|
||||||
"path": "./build/MixGo_Car-0x0-V1.19.1-lib.bin"
|
"path": "./build/Mixgo_Car_lib-v1.23.0.bin"
|
||||||
}, {
|
}, {
|
||||||
"offset": "0x3A0000",
|
"offset": "0x3A0000",
|
||||||
"path": "../micropython/build/HZK12.bin"
|
"path": "../micropython/build/HZK12.bin"
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x0000",
|
"offset": "0x0000",
|
||||||
"path": "./build/Generic_C3_UART-0x0-V1.19.1-lib.bin"
|
"path": "./build/Generic_C3_UART_lib-v1.23.0.bin"
|
||||||
}, {
|
}, {
|
||||||
"offset": "0x3A0000",
|
"offset": "0x3A0000",
|
||||||
"path": "../micropython/build/HZK12.bin"
|
"path": "../micropython/build/HZK12.bin"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,11 +8,11 @@
|
|||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32s2:mixgo_ce": {
|
"micropython:esp32s2:mixgo_ce": {
|
||||||
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/MixGo_CE-0x1000-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
|
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Mixgo_CE-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
|
||||||
"special": [
|
"special": [
|
||||||
{
|
{
|
||||||
"name": "Default",
|
"name": "Default",
|
||||||
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/MixGo_CE-0x1000-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Mixgo_CE-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ESP-AT-mode",
|
"name": "ESP-AT-mode",
|
||||||
@@ -21,11 +21,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"micropython:esp32s2:generic": {
|
"micropython:esp32s2:generic": {
|
||||||
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Generic_S2_0x1000-V1.19.1.bin\"",
|
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Generic_S2-v1.23.0.bin\"",
|
||||||
"special": [
|
"special": [
|
||||||
{
|
{
|
||||||
"name": "Default",
|
"name": "Default",
|
||||||
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Generic_S2_0x1000-V1.19.1.bin\""
|
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Generic_S2-v1.23.0.bin\""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ESP-AT-mode",
|
"name": "ESP-AT-mode",
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x1000",
|
"offset": "0x1000",
|
||||||
"path": "./build/MixGo_CE-0x1000-V1.19.1-lib.bin"
|
"path": "./build/Mixgo_CE_lib-v1.23.0.bin"
|
||||||
}, {
|
}, {
|
||||||
"offset": "0x3A0000",
|
"offset": "0x3A0000",
|
||||||
"path": "../micropython/build/HZK12.bin"
|
"path": "../micropython/build/HZK12.bin"
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x1000",
|
"offset": "0x1000",
|
||||||
"path": "./build/Generic_S2_0x1000-V1.19.1-lib.bin"
|
"path": "./build/Generic_S2_lib-v1.23.0.bin"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -16,7 +16,7 @@ rtc_clock=RTC()
|
|||||||
|
|
||||||
'''2RGB_WS2812'''
|
'''2RGB_WS2812'''
|
||||||
from ws2812 import NeoPixel
|
from ws2812 import NeoPixel
|
||||||
onboard_rgb = NeoPixel(Pin(12), 2, default=1)
|
onboard_rgb = NeoPixel(Pin(12), 2, default=1, timing=(450, 900, 850, 500))
|
||||||
|
|
||||||
'''1Buzzer-Music'''
|
'''1Buzzer-Music'''
|
||||||
from music import MIDI
|
from music import MIDI
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ except Exception as e:
|
|||||||
|
|
||||||
'''2RGB_WS2812''' #color_chase(),rainbow_cycle()方法移至类里
|
'''2RGB_WS2812''' #color_chase(),rainbow_cycle()方法移至类里
|
||||||
from ws2812 import NeoPixel
|
from ws2812 import NeoPixel
|
||||||
onboard_rgb = NeoPixel(Pin(12), 2, default=1)
|
onboard_rgb = NeoPixel(Pin(12), 2, default=1, timing=(450, 900, 850, 500))
|
||||||
|
|
||||||
'''3-Button'''
|
'''3-Button'''
|
||||||
class Button:
|
class Button:
|
||||||
|
|||||||
@@ -9,13 +9,13 @@
|
|||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32c3:feiyi": {
|
"micropython:esp32c3:feiyi": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Feiyi-0x0-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Mixgo_FeiYi-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:rm_e1": {
|
"micropython:esp32:rm_e1": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/RM_E1-0x1000-V1.19.1.bin\""
|
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/RM_E1-v1.23.0.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:mixbot": {
|
"micropython:esp32:mixbot": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/MixBot-0x1000-V1.19.1.bin\""
|
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/MixBot-v1.23.0.bin\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x0000",
|
"offset": "0x0000",
|
||||||
"path": "./build/Feiyi-0x0-V1.19.1-lib.bin"
|
"path": "./build/Mixgo_FeiYi_lib-v1.23.0.bin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"offset": "0X3A0000",
|
"offset": "0X3A0000",
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x1000",
|
"offset": "0x1000",
|
||||||
"path": "./build/RM_E1-0x1000-V1.19.1-Slib.bin"
|
"path": "./build/RM_E1_lib-v1.23.0.bin"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
"binFile": [
|
"binFile": [
|
||||||
{
|
{
|
||||||
"offset": "0x1000",
|
"offset": "0x1000",
|
||||||
"path": "./build/MixBot-0x1000-V1.19.1-lib.bin"
|
"path": "./build/MixBot_lib-v1.23.0.bin"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user