Skip to content

Commit 50ea096

Browse files
committed
add svg for simulator, rename main.ts to ds1307.ts
1 parent 9518afd commit 50ea096

File tree

5 files changed

+112
-11
lines changed

5 files changed

+112
-11
lines changed

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
11
# DS1307
22

3-
makecode DS1307 RTC package for micro:bit
3+
makecode DS1307 RTC extension for micro:bit.
44

55
Author: shaoziyang
66
Date: 2018.Mar
7-
8-
![](https://raw.githubusercontent.com/microbit-makecode-packages/DS1307/master/icon.png)
97

10-
![](https://raw.githubusercontent.com/microbit-makecode-packages/DS1307/master/ds1307.jpg)
8+
9+
![](ds1307.jpg)
1110

12-
## usage
11+
## Add extension
1312

14-
open your microbit makecode project, in Add Package, paste
13+
open your microbit makecode project, in Add extension, paste
1514

16-
https://github.com/microbit-makecode-packages/DS1307
15+
https://github.com/makecode-packages/DS1307
1716

1817
to search box then search.
1918

19+
20+
## Basic usage
21+
```
22+
input.onButtonPressed(Button.A, () => {
23+
DS1307.setSecond(0)
24+
})
25+
DS1307.start()
26+
basic.forever(() => {
27+
basic.showNumber(DS1307.getSecond() % 10)
28+
basic.pause(100)
29+
})
30+
```
31+
2032
## I2C Address
2133

2234
- 0x68
@@ -71,7 +83,7 @@ get year.
7183

7284
## Demo
7385

74-
![](https://raw.githubusercontent.com/microbit-makecode-packages/DS1307/master/demo.jpg)
86+
![](demo.jpg)
7587

7688
## License
7789

ds1307.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)