Skip to content

Commit 535c705

Browse files
committed
Merge remote-tracking branch 'adafruit/master'
2 parents 1ecc0aa + 941f497 commit 535c705

73 files changed

Lines changed: 2935 additions & 217 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import board
2+
import displayio
3+
import adafruit_displayio_ssd1306
4+
import terminalio
5+
import adafruit_ds3231
6+
from adafruit_display_text import label
7+
8+
9+
font = terminalio.FONT
10+
11+
12+
displayio.release_displays()
13+
14+
i2c = board.I2C()
15+
display_bus = displayio.I2CDisplay(i2c, device_address=0x3c)
16+
oled = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32)
17+
18+
rtc = adafruit_ds3231.DS3231(i2c)
19+
20+
21+
# The first time you run this code, you must set the time!
22+
# You must set year, month, date, hour, minute, second and weekday.
23+
# struct_time order: year, month, day (date), hour, minute, second, weekday , yearday, isdst
24+
# yearday is not supported, isdst can be set but we don't do anything with it at this time
25+
26+
# UNCOMMENT THE FOLLOWING FOUR LINES THE FIRST TIME YOU RUN THE CODE TO SET THE TIME!
27+
# import time
28+
# set_time = time.struct_time((2019, 8, 16, 23, 59, 45, 4, -1, -1))
29+
# print("Setting time to:", set_time)
30+
# rtc.datetime = set_time
31+
32+
# Comment out the above four lines again after setting the time!
33+
34+
35+
while True:
36+
current = rtc.datetime
37+
38+
hour = current.tm_hour % 12
39+
if hour == 0:
40+
hour = 12
41+
42+
am_pm = "AM"
43+
if current.tm_hour / 12 >= 1:
44+
am_pm = "PM"
45+
46+
time_display = "{:d}:{:02d}:{:02d} {}".format(hour, current.tm_min, current.tm_sec, am_pm)
47+
date_display = "{:d}/{:d}/{:d}".format(current.tm_mon, current.tm_mday, current.tm_year)
48+
text_display = "CircuitPython Time"
49+
50+
clock = label.Label(font, text=time_display)
51+
date = label.Label(font, text=date_display)
52+
text = label.Label(font, text=text_display)
53+
54+
(_, _, width, _) = clock.bounding_box
55+
clock.x = oled.width // 2 - width // 2
56+
clock.y = 5
57+
58+
(_, _, width, _) = date.bounding_box
59+
date.x = oled.width // 2 - width // 2
60+
date.y = 15
61+
62+
(_, _, width, _) = text.bounding_box
63+
text.x = oled.width // 2 - width // 2
64+
text.y = 25
65+
66+
watch_group = displayio.Group()
67+
watch_group.append(clock)
68+
watch_group.append(date)
69+
watch_group.append(text)
70+
71+
oled.show(watch_group)

EInk_Autostereograms/README.md

Lines changed: 18 additions & 0 deletions
6.25 KB
Binary file not shown.
6.25 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
���o��������߿��������Ͽ���o������������������������������?��y����������������������>�����������_������������������������o���������g�������������������������������������������}����y���o��������_����^���������g�������������������������~����o�������������������������s������|����������������������������������������_��������������������mo����������������_�~������������������}��������������������}�����������������?������������7��������������������������������������Ӽ���|�m������}����x����}����������۾w?������?�������������������������������������������������������������������������������������������g�������������������w����������w���������������������������������������߿����o���������}������;����������w���������������������������_����������{�����������������������|�����������������_���������������������������������w���������������>�������������������_�����������w߿��~���]��w��������������=�W�������?���?�s������������������������_���������������_߿�߷�������������������G�������{��������������������}�����}����������������������������������_��������������������������������������������������������߿��������������_�����߻�������������������_�������������������������}������������������������������v������������������������������q����������s�����������������������������������������������������������߿����������������߽��Ͽ����{���������������������������������������������������ǿ����?���������������}�{�����������|�������}����{�����������w������������������������������������߿����ÿ{���?���������������������������;����������������������_y��z{���������������������������������������������������������������������������������[���������������������������������������������������������������۾���������������������������������������������?����N����������������������}�������������������������������������������������߿�v�������������������������w����������������������������������_������������������������������
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
��������������������������������������������3�����������������������3�����������������3���������������������??�������??����������������������������������?��?�����?��������?�������������?���������������3���?�������<����������������???�����?�?<?��������������?���?�������������<�����?������������?�?������������������?�������??���������������������������������������?�����<����������������������������������??������?���������������?����?���??������?���?���������������3���?�����������������������?�?�����?�����������?�?�?�����?��?������?�?������������������?����?���������������?���������������������������??�����������������������������������?���������������?����?���?���������������������?����������?���?���������<�������������������?��������������������������������?������?�����������?��?�������3���??������������������??���?�����������?�����?�����?������������������������������������������������������������������?��������������?�������������3?����������?�?����������0�?������������������<����?������������������������?���?�������?�����������?������������?��������������������?<��3������������?��?��??������??�������?�����������?�����������������������������?����������?��<?��?�����<��?�������������3���?������?�������������������������?������������������3����������???���?����������������������������0������?��?������������������?���������<�<������<���������?������?�������������?����������������������?����������?����������������??���������?������<����<����?��?���������������������������������?�������������������?���������������������������?�����?������������������������?���������?������������������������������?���������?�����������?�������������������<������?����������������?���3��������?�������?��������?��?����������?���������?����������������3�����������?������?���������?���������������������������������?����������<�����?��������������?�������������������?������?��������������������?��������������������������?����?��3?��?���??������������������?�����������������������������������������?�<�������������������?���������
2 KB
Binary file not shown.
2 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
�ף����_���׵��S��}������#{������������}����{u�����������������W���?������/���.��]o����wt������������|�������o��w��u�}���\7x���׻�_^����_��߯���?_����6�?������g���{�����������?�������ҿ������{��|���������5���2z�{��ώ�׮������������6��������w������������b������wϿ�����vw���!�ϧ�������������_[}����?�s�K��9��������������_Ϲl_���˗t������~�������?�w�����l��������v���^������_�� w-�/���{�����������?��{�'}��w[�~����{��ݯ����~������o���m�/�ޗ���[���]���v�o�_׾���W�=�?�Ow��9�����}��=�:��������m_�����~���{���o߷�����_��w�������?�������%�������շ����7q���[������������һ��?�����\�ٿ�ߟ���������������o���3��ԗ��������������������}���N�W�|����_�ߧ�}���������w��������ޙ���������O�������������������߾����������δ�����z�}���������mKz��Ǿ~������w���}���o������߿��������[3����}�/�����������������w���]�����{��
2+
��r��[�����}_ߟ��]�������}�{�ֻ�y}��������u�o�^����{}�������ϳ��7��^���~������������ߺ/���������>�����yo��uZ;�k��]���������{���������J�������Ǟ����޽�����'ۿ�}�����������w���ϯ���ߩ��V|t����/�e����������?���6����޿��,�������������oz��w������������������w���ٯ�����}��}��c�O�����������[���~oX]}�����~�|���_���������������������gv�����=������~���}�����]��o�����o�7���_�~����yw��������������7�o����7x��������=�������ݷ��~���(��������~�l�]<���~�V����t����������i��{�v��ۿ�����/��_�{����������n�i����l�{������/����߿�������o�o�ow���>�o�ß]~��������z�����^�>r�?��|�����w�����}������������������l����x�����}�~����������;������������������?���\��[�w������������u���z{���������}��f�{�����z��e~������j�����o������Q�����������o�w{���~��uw��ߵ��owu|���_�����u�������?��Q�����{����������~���=~~�~���>^{�n��d������}�����?O������'�����s^^��~�����}{�������w�������O�}�����?�����������������w����������������������wׯ��+�������￷<���>��d���6���_����7��}���_����w���}��w�����ߺ?=oW����������}^��s��z���������]���?������������������������;����;����c���~�������xϻ������������}�Oޟ�O�w�����������~/��������s�����o���}��i���
2 KB
Binary file not shown.

0 commit comments

Comments
 (0)