Skip to content

Commit

Permalink
Signed-off-by: hznupeter <[email protected]>
Browse files Browse the repository at this point in the history
  • Loading branch information
hznupeter committed Jun 6, 2017
1 parent 3548dd6 commit 425bbc6
Show file tree
Hide file tree
Showing 6 changed files with 282 additions and 76 deletions.
20 changes: 8 additions & 12 deletions 17maker/Maker17.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<!--
type="company"
block="block/maker17.js"
generator="generator/maker17.js"
media="media/maker17"
lib="Maker17"
hardware="hardware/arduino"
language="language/maker17"
examples="examples/maker17"
examples="examples/Maker17"
-->
<!--
Author :hznupeter
Date:2017-3-30
Date:2017-5-30
E-mail:[email protected]
-->
<script type="text/javascript" src="../../blocks/company/maker17.js"></script>
Expand Down Expand Up @@ -316,11 +317,7 @@ E-mail:[email protected]
</block>

<block type="MAX7219_DisplayChar" name="显示图案">
<value name="NUM">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
</value>

<value name="Chars">
<block type="LedArray"></block>
</value>
Expand Down Expand Up @@ -439,12 +436,12 @@ E-mail:[email protected]
<block type="maker17_oled_drawPixe" name="画点">
<value name="POS_X">
<shadow type="math_number">
<field name="NUM">32</field>
<field name="NUM">64</field>
</shadow>
</value>
<value name="POS_Y">
<shadow type="math_number">
<field name="NUM">64</field>
<field name="NUM">32</field>
</shadow>
</value>
</block>
Expand Down Expand Up @@ -726,9 +723,7 @@ E-mail:[email protected]
</block>

</category>
</category>

<!-- <category id="catMaker17TimeDS3231" name="DS3231时间模块" colour="40">
<category id="catMaker17TimeDS3231" name="DS3231时间模块" colour="40">
<block type="DS3231_get_time" name="获取时间">
</block>
<block type="DS3231_set_datetime" name="设置日期时间">
Expand Down Expand Up @@ -768,4 +763,5 @@ E-mail:[email protected]
</shadow>
</value>
</block>
</category>
</category>
16 changes: 8 additions & 8 deletions 17maker/PCtoLCD2002/PCtoLCD2002.INI
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Option]
TOP=120
LEFT=224
TOP=175
LEFT=91
点阵格式=0
取模方式=1
取模走向=1
Expand All @@ -17,13 +17,13 @@ LEFT=224
输出格式=1
段前缀=
段后缀=
注释前缀="
注释前缀=/*"
注释后缀=",
数据前缀=
数据后缀=H
行前缀=DB
行后缀=;
行尾缀=
数据前缀=0x
数据后缀=,
行前缀=
行后缀=,
行尾缀=*/
[Form]
TOP=-3
LEFT=-3
Expand Down
12 changes: 6 additions & 6 deletions 17maker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ website: http://wiki.17maker.org
--
使用方法
1.打开mixly 软件,点击导入库。
2.选中17maker中的maker17.xml文件,稍等片刻,提示导入成功。
2.选中17maker中的maker17.xml文件,稍等片刻,提示导入成功即可。

---
### Date:2017.6.5 Version:2.2
*OLED,DS1307输入数值支持用变量的形式。当输入的是数字是检测数字是否合法,当输入的是变量时直接调用变量。

---
### Date:2017.5.23 Version:2.1
*调整u8glib库结构,使之能与mixly0.995兼容。


---
### Date:2017.3.28 Version:2.0
*TM1637增加秒表功能。

---


### Date:2017.3.4 Version:1.9
*OLED模块中增加显示图像(汉字)模块。
*图像(汉字)显示的显示需要先取模,后显示。
Expand Down
55 changes: 52 additions & 3 deletions 17maker/block/maker17.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,7 @@ Blockly.Blocks.MAX7219_DisplayChar = {
init: function() {
this.appendDummyInput("").appendField(new Blockly.FieldImage("../../media/maker17/matrix44.png", 32, 32));
this.appendDummyInput().appendField(Blockly.MAKER17_MAX7219_DISPLAYCHAR);
// this.appendValueInput("NUM").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.MAKER17_MAX7219_DISPLAYCHAR_NUM);

this.appendValueInput("Chars").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT);

this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(Blockly.Blocks.maker17.HUE3);
Expand Down Expand Up @@ -975,7 +972,59 @@ Blockly.Blocks['math_trig1'] = {
}
};

////////////////////////////////
//时间-DS3231获取时间变量
var MAKER17_DS3231_TIME_TYPE = [
["年", "year"],
["月", "month"],
["日", "date"],
["时", "hour"],
["分", "minute"],
["秒", "second"],
["星期", "dayOfWeek"]
];

//时间-DS3231获取时间
Blockly.Blocks.DS3231_get_time = {
init: function() {
this.appendDummyInput("").appendField(new Blockly.FieldImage("../../media/maker17/RTC.png", 32, 32)).appendField(Blockly.MAKER17_DS3231_GET_TIME);
this.appendDummyInput("").appendTitle(new Blockly.FieldDropdown(MAKER17_DS3231_TIME_TYPE), "TIME_TYPE");
this.setInputsInline(true);
this.setColour(Blockly.Blocks.maker17.HUE3);
this.setTooltip(Blockly.MAKER17_IIC);
this.setHelpUrl('');
this.setOutput(true, Number);
}
};
//时间-DS3231设置日期时间
Blockly.Blocks.DS3231_set_datetime = {
init: function() {
this.appendDummyInput("").appendField(new Blockly.FieldImage("../../media/maker17/RTC.png", 32, 32)).appendField(Blockly.MAKER17_DS3231_SET_TIME);
this.setInputsInline(true);
this.appendValueInput("year").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput("").appendField(Blockly.MAKER17_YEAR);
this.appendValueInput("month").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput("").appendField(Blockly.MAKER17_MONTH);
this.appendValueInput("day").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput("").appendField(Blockly.MAKER17_DAY);
this.appendDummyInput("").appendField(Blockly.MAKER17_DAY_OF_WEEK);
this.appendValueInput("dayOfWeek").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput("").appendField(" ");
this.appendValueInput("hour").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput("").appendField(Blockly.MAKER17_HOUR);
this.appendValueInput("minute").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput("").appendField(Blockly.MAKER17_MINUTE);
this.appendValueInput("second").setCheck(Number).setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput("").appendField(Blockly.MAKER17_SECOND);
this.setOutput(false, Number);
this.setInputsInline(true);
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setColour(Blockly.Blocks.maker17.HUE3);
this.setTooltip(Blockly.MAKER17_IIC);
this.setHelpUrl('');
}
};

//显示-OLED-新建页面
Blockly.Blocks.maker17_page = {
Expand Down
Loading

0 comments on commit 425bbc6

Please sign in to comment.