Skip to content

Commit 0341426

Browse files
committed
update
1 parent 6ffd0be commit 0341426

File tree

3 files changed

+167
-3
lines changed

3 files changed

+167
-3
lines changed

blog/4.2-release.md

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
title: "发布 CodeLab Adapter 4.2"
3+
date: 2021-01-23
4+
tags: ["CodeLab"]
5+
Slug: adapter-4-2
6+
---
7+
8+
![](https://adapter.codelab.club/img/candy_4_2_bar.jpeg)
9+
10+
> 由于一种奇妙的牵强附会,恰恰就是我们今生的苦痛被说成了来世生活较好的道理。我们切不可把这种道理运用到其它方面。假若你向一个人买了十打鸡蛋,头一打全是臭的,你总不会推断下余九打一定其好无比 --《西方哲学史》
11+
12+
> 明天就像是盒子里的巧克力糖 --《一千零一個愿望》
13+
14+
可明日叵测。
15+
16+
改进如果不是在当下,则可能永远不会发生。
17+
18+
---
19+
20+
我们在过去总是想着把易用性放在体系成熟之后来做。
21+
22+
明日何其多。
23+
24+
4.2 版本专注当下,这个版本的大多数工作,都为了解决用户反馈的不爽之处。
25+
26+
<!--truncate-->
27+
28+
# 优化体验
29+
30+
开箱可用是我们追逐的目标。
31+
32+
Scratch 在这块所做的设计依然是我们学习的榜样,在 Scratch 中连接乐高的体验,让任何人都感到身心愉悦。
33+
34+
Adapter 正在往这个方向努力。
35+
36+
4.2 中,我们新增了 6 款设备支持 Scratch 风格的发现/连接机制,有了直观的连接机制,许多说明文档就不再需要,而且在意外发生时,用户能在界面上直观看到发生了什么,而不是猜测幕后发生了什么,这对排查问题以及减少新手恐惧都很重要。
37+
38+
这些插件中,有三个是旧插件:
39+
40+
- Cozmo
41+
- Robomaster
42+
- Tello
43+
44+
三个新插件:
45+
46+
## BrainCo
47+
48+
> Train Your Brain.
49+
50+
![](https://adapter.codelab.club/img/brainCo.jpeg)
51+
52+
<video width='50%' src="https://adapter.codelab.club/video/brainco_tello.mp4" controls="controls"></video>
53+
54+
BrainCo 目前在探索跟英荔的合作可能性,英荔是 CodeLab 的合作伙伴,从 4.2 版本开始,我们开始重点关注合作项的推进和落地,并在这个过程中,根据用户反馈改进软件体系。这是我们在方法论上做的调整: 服务具体用户,并从中获取改进建议。
55+
56+
## LEGO Mario
57+
58+
> 登登登等灯蹬
59+
60+
![](https://adapter.codelab.club/img/lego_mario_bar.png)
61+
62+
<video width='80%' src="https://adapter.codelab.club/video/legomario.MP4" controls="controls"></video>
63+
64+
我在小学的许多个暑假里,热衷于在马里奥游戏里找彩蛋,倒不急着通关。最喜欢的两个彩蛋,其一是 **3-1关** 快到终点时,在阶梯上踩那只会飞的鸭子,来获取夸张的奖励。以及在爬到树顶的时候,快速按`左-右-跳`,闪现到屏幕的另一侧。
65+
66+
有了 LEGO Mario,我们可以动手在桌面上建造关卡!
67+
68+
## Sphero RVR
69+
70+
> RVR is made for makers, hackers, coders – and you.
71+
72+
<video width='80%' src="https://adapter.codelab.club/video/rvr345345.mp4" controls="controls"></video>
73+
74+
Sphero RVR 拥有惊人的稳定性、精度和续航能力,Neverland 里这台 RVR 已经三天三夜没关机了,随时可以连上飞快跑起来。
75+
76+
由于 Adapter 4 内置了跨平台蓝牙驱动,我们轻松接入了 Sphero 全家桶。
77+
78+
![](https://adapter.codelab.club/img/sphero_all.png)
79+
80+
Sphero 在全球教育/玩具市场都很受欢迎。
81+
82+
---
83+
84+
为了让 Adapter Node 更好支持 Scratch 风格的发现/连接机制,构建了一个抽象类: AdapterThing。 我们目前将 AdapterThing 视为在 Adapter 里接入硬件设备的最佳实践,文档参考: [Adapter Thing](https://adapter.codelab.club/extension_guide/AdapterThing/)
85+
86+
# 新插件
87+
## Sugar
88+
89+
![](https://adapter.codelab.club/img/sugar_bar.jpeg)
90+
91+
构建 Sugar 插件的动机最初来自 @Lounsen 的想法: 接布尔量的 hat 积木。
92+
93+
Sugar 插件是个实验室,试图为 Scratch 提供 **** 的语法糖。
94+
95+
新的想法/需求,欢迎在[这个帖子](https://discuss.codelab.club/t/topic/169)下讨论
96+
97+
### 积木介绍
98+
99+
#### 接布尔量的 hat 积木
100+
101+
- [Demo](https://scratch-beta.codelab.club/?sb3url=https://adapter.codelab.club/sb3/Scratch-when-true.sb3)
102+
103+
除非情况发生变化,否则只触发 **一次** .
104+
105+
如果 **我的变量** 一直 **<** 50,只向前移动一次.
106+
107+
# 插件改进
108+
109+
## 支持 micro:bit v2
110+
111+
最近收到的用户邮件里,最多的提议是:
112+
113+
> 使 micro:bit v2 在 Adapter 里开箱可用。
114+
115+
4.2 已经完成了这项功能。micro:bit v1 和 v2 默认开箱可用。
116+
117+
此外,在 microbit radio 插件中,v1 和 v2 可以混着用。
118+
119+
# 重构
120+
121+
基于出色的 Dynaconf 重构了 settings 机制。
122+
123+
此前 Adapter 的配置机制十分复杂,而复杂通常是脆弱的同义词。
124+
125+
为了给用户更多自由以及遵循 unix 传统,我们从一开始就支持用户配置文件以及环境变量。
126+
127+
手动处理不同优先级的配置项带来了许多杂乱和复杂性,我之前很害怕进入 settings 代码所处的沼泽。
128+
129+
4.2版本通过引入 Dynaconf ,希望能彻底解决这个问题,使配置项变得简单、灵活、统一。
130+
131+
# 其他改进项
132+
133+
- 解决 WebUI 缩放时,页面失调问题
134+
- 支持云端更新配置(`global_settings.toml`)
135+
- 提供 node 版本服务(静态分析),允许 client 自动检测 node 版本
136+
- 统一所有 url 中的 adapter_token 参数(为将来灵活的安全机制打基础)
137+
- 为 microbit 固件刷入添加 ui 反馈
138+
- 使得 Python Kernel 插件可以向 scratch 传递 json(数据结构)
139+
- 修复 windows 下 dynaconf 引起的路径错误问题(与`python -m`启动方式有关)
140+
- 修复 BrainCo 在 windows 下的打包 bug
141+
- 修复 马里奥 在 windows10 下的发现问题
142+
- 支持马里奥掉线通知(UI 同步)
143+
144+
# 开始使用
145+
146+
[下载最新 Adapter](https://adapter.codelab.club/get_start/gs_install/?version=latest)
147+
148+
# 参考
149+
150+
- [CodeLab Adapter changelog](https://adapter.codelab.club/changelog/)

blog/tools.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ tags: ["CodeLab相关","Adapter"]
1313

1414
## CodeLab Scratch Desktop(离线版)
1515

16-
v3.7.5:
16+
v4.2.2:
1717

18-
- [Windows](https://scratch3-files.just4fun.site/CodeLab-Scratch-win-3-7-5.zip) (Windows7 及以上)
19-
- [MacOS](https://scratch3-files.just4fun.site/CodeLab-Scratch-mac-3-7-5.zip)
18+
- [Windows](https://scratch3-files.just4fun.site/CodeLab-Scratch-win-4-2-2.zip) (Windows7 及以上)
19+
- [MacOS](https://scratch3-files.just4fun.site/CodeLab-Scratch-mac-4-2-2.zip)
2020

2121
如果发现 CodeLab Scratch Desktop 与 MIT Scratch Desktop无法在一台电脑共存(会彼此替代),可以先安装CodeLab再安装MIT官方的,就可以同时存在了
2222

static/video_config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
}
2525
],
2626
"横版视频": [
27+
{
28+
"src": "https://adapter.codelab.club/video/8a9edf95b1d1da2fd2dcc11ef3427a.MP4",
29+
"title": "Hello Raspberry Pi Pico",
30+
"id": "3",
31+
"tags": [],
32+
"weight": ""
33+
},
2734
{
2835
"src": "https://adapter.codelab.club/video/6920462938283877706.MP4",
2936
"title": "microbit驾驶仪",
@@ -913,6 +920,13 @@
913920
}
914921
],
915922
"竖版视频": [
923+
{
924+
"src": "https://adapter.codelab.club/video/brainco_tello.mp4",
925+
"title": "原力觉醒",
926+
"id": "52",
927+
"tags": ["机器人"],
928+
"weight": ""
929+
},
916930
{
917931
"src": "https://codelab-adapter-docs.codelab.club/video/6919292049054139390.MP4",
918932
"title": "Neverland 2.0 原型--集体演奏",

0 commit comments

Comments
 (0)