MicroBit clock based on DS3231
README.md@10:df37742f32d6, 2016-08-14 (annotated)
- Committer:
- daw9000
- Date:
- Sun Aug 14 11:45:28 2016 +0000
- Revision:
- 10:df37742f32d6
- Parent:
- 2:2f72859d7247
#1;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
daw9000 | 10:df37742f32d6 | 1 | ##MicroBit-rtc_ds3231 |
daw9000 | 10:df37742f32d6 | 2 | ##Clock |
daw9000 | 10:df37742f32d6 | 3 | |
daw9000 | 10:df37742f32d6 | 4 | Copyright David Wright 2016. DAW9000. |
daw9000 | 10:df37742f32d6 | 5 | Feel free to copy, ammend , or do what you will but a shout out would be nice :) |
daw9000 | 0:1072edc2281c | 6 | |
daw9000 | 10:df37742f32d6 | 7 | |
daw9000 | 10:df37742f32d6 | 8 | This program uses the Maxim Integrated DS3231 library to create a BBC MicroBit |
daw9000 | 10:df37742f32d6 | 9 | Clock. Requires a DS3231 Real Time clock connected to pin 19 and 20. |
daw9000 | 10:df37742f32d6 | 10 | |
daw9000 | 10:df37742f32d6 | 11 | Recommended that an edge connector is used for DS3231 connection. |
daw9000 | 0:1072edc2281c | 12 | |
daw9000 | 10:df37742f32d6 | 13 | Program will display :- |
daw9000 | 10:df37742f32d6 | 14 | Date then Time then Temp (from DS3231 not MicroBit as it seems for |
daw9000 | 10:df37742f32d6 | 15 | accurate as to ambient temp.) |
daw9000 | 10:df37742f32d6 | 16 | Pressing Button B and keeping it pressed between rotations ie at the end |
daw9000 | 10:df37742f32d6 | 17 | of each display cycle will change mode cyclically. |
daw9000 | 10:df37742f32d6 | 18 | 1. Date, Time, Temp |
daw9000 | 10:df37742f32d6 | 19 | 2. Date only. |
daw9000 | 10:df37742f32d6 | 20 | 3. Time only. |
daw9000 | 10:df37742f32d6 | 21 | 4. Temp only. |
daw9000 | 10:df37742f32d6 | 22 | I am sure better things can be done here! Improvements welcome. |
daw9000 | 10:df37742f32d6 | 23 | |
daw9000 | 10:df37742f32d6 | 24 | Pressing Buttons A and B together and keeping pressed as above will take |
daw9000 | 10:df37742f32d6 | 25 | you into clock setting mode. |
daw9000 | 10:df37742f32d6 | 26 | Clock is set :- |
daw9000 | 10:df37742f32d6 | 27 | Year, Month, Day, Hour, Minute, Second, Day of Week (1 to 7 eg Sun=7 but you can |
daw9000 | 10:df37742f32d6 | 28 | make any day the start of week ie Sun=1). |
daw9000 | 10:df37742f32d6 | 29 | Setting is done after DATE and again after TIME. So if only setting date |
daw9000 | 10:df37742f32d6 | 30 | you can abort after the msg "Date Set". |
daw9000 | 10:df37742f32d6 | 31 | |
daw9000 | 10:df37742f32d6 | 32 | If in setting mode abort changes by powering off at any time. |
daw9000 | 10:df37742f32d6 | 33 | |
daw9000 | 10:df37742f32d6 | 34 | This again can be improved .... not the easiest to set date and time with |
daw9000 | 10:df37742f32d6 | 35 | no keypad and limited screen! |
daw9000 | 10:df37742f32d6 | 36 | |
daw9000 | 10:df37742f32d6 | 37 | DS3231 has 2 alarms, so alarm clock feature with speaker/music attached to |
daw9000 | 10:df37742f32d6 | 38 | MicroBit is a good future mod. |
daw9000 | 10:df37742f32d6 | 39 | |
daw9000 | 10:df37742f32d6 | 40 | |
daw9000 | 2:2f72859d7247 | 41 | |
daw9000 | 2:2f72859d7247 | 42 | developed by daw9000. no copywrite, free for whatever... |
daw9000 | 0:1072edc2281c | 43 | |
daw9000 | 0:1072edc2281c | 44 | ## Overview |
daw9000 | 0:1072edc2281c | 45 | |
daw9000 | 0:1072edc2281c | 46 | The micro:bit runtime provides an easy to use environment for programming the BBC micro:bit in the C/C++ language, written by Lancaster University. It contains device drivers for all the hardware capabilities of the micro:bit, and also a suite of runtime mechanisms to make programming the micro:bit easier and more flexible. These range from control of the LED matrix display to peer-to-peer radio communication and secure Bluetooth Low Energy services. The micro:bit runtime is proudly built on the ARM mbed and Nordic nrf51 platforms. |
daw9000 | 0:1072edc2281c | 47 | |
daw9000 | 0:1072edc2281c | 48 | In addition to supporting development in C/C++, the runtime is also designed specifically to support higher level languages provided by our partners that target the micro:bit. It is currently used as a support library for all the languages on the BBC www.microbit.co.uk website, including Microsoft Block, Microsoft TouchDevelop, Code Kingdoms JavaScript and Micropython languages. |
daw9000 | 0:1072edc2281c | 49 | |
daw9000 | 0:1072edc2281c | 50 | ## Links |
daw9000 | 0:1072edc2281c | 51 | |
daw9000 | 0:1072edc2281c | 52 | [micro:bit runtime docs](http://lancaster-university.github.io/microbit-docs/) | [microbit-dal](https://github.com/lancaster-university/microbit-dal) | [uBit](https://github.com/lancaster-university/microbit) |
daw9000 | 0:1072edc2281c | 53 | |
daw9000 | 0:1072edc2281c | 54 | ## Build Environments |
daw9000 | 0:1072edc2281c | 55 | |
daw9000 | 0:1072edc2281c | 56 | | Build Environment | Documentation | |
daw9000 | 0:1072edc2281c | 57 | | ------------- |-------------| |
daw9000 | 0:1072edc2281c | 58 | | ARM mbed online | http://lancaster-university.github.io/microbit-docs/online-toolchains/#mbed | |
daw9000 | 0:1072edc2281c | 59 | | yotta | http://lancaster-university.github.io/microbit-docs/offline-toolchains/#yotta | |
daw9000 | 0:1072edc2281c | 60 | |
daw9000 | 0:1072edc2281c | 61 | ## BBC Community Guidelines |
daw9000 | 0:1072edc2281c | 62 | |
daw9000 | 0:1072edc2281c | 63 | [BBC Community Guidelines](https://www.microbit.co.uk/help#sect_cg) |