This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2017 Limor Fried for Adafruit Industries | |
# | |
# SPDX-License-Identifier: MIT | |
"""CircuitPython I2C Device Address Scan""" | |
# If you run this and it seems to hang, try manually unlocking | |
# your I2C bus from the REPL with | |
# >>> import board | |
# >>> board.I2C().unlock() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ___ ___ _____ _________ ____ __. __ ___. .__ __ | |
# / | \ / _ \ \_ ___ \ | |/ _|_/ |_ _____ \_ |__ | | ____ _/ |_ | |
# / ~ \ / /_\ \ / \ \/ | < \ __\\__ \ | __ \ | | _/ __ \ \ __\ | |
# \ Y // | \\ \____| | \ | | / __ \_ | \_\ \| |__\ ___/ | | | |
# \___|_ / \____|__ / \______ /|____|__ \ |__| (____ / |___ /|____/ \___ > |__| | |
# \/ \/ \/ \/ \/ \/ \/ | |
# | |
# Thank you for agreeing to hack on this HACKtablet! | |
# I hope you enjoy exploring what you can achieve | |
# this touchscreen CircuitPython device. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD | |
* | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
#pragma once | |
#include <stdbool.h> | |
#include "esp_err.h" | |
#include "esp_lcd_types.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def _angled_rectangle(points, palette, stroke=1): | |
x1, y1 = points[0] | |
x2, y2 = points[1] | |
if ((x2-x1) == 0): | |
xdiff1 = round(stroke/2) | |
xdiff2 = -round(stroke-xdiff1) | |
ydiff1 = 0 | |
ydiff2 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams, written for Adafruit Industries | |
# | |
# SPDX-License-Identifier: Unlicense | |
""" | |
`adafruit_pyportal` | |
================================================================================ | |
CircuitPython driver for Adafruit PyPortal. | |
* Author(s): Limor Fried, Kevin J. Walters, Melissa LeBlanc-Williams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2020 Scott Shawcroft | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2021 Tim C, written for Adafruit Industries | |
# | |
# SPDX-License-Identifier: MIT | |
""" | |
""" | |
import gc | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /* | |
# Reference: | |
# "Fast Bitmap Rotation and Scaling" By Steven Mortimer, Dr Dobbs' Journal, July 01, 2001 | |
# http://www.drdobbs.com/architecture-and-design/fast-bitmap-rotation-and-scaling/184416337 | |
# See also http://www.efg2.com/Lab/ImageProcessing/RotateScanline.htm | |
# */ | |
# pylint: disable=invalid-name, too-many-branches, too-many-statements | |
# This function is provided in case the bitmaptools.rotozoom function is not available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2021 Tim C, written for Adafruit Industries | |
# | |
# SPDX-License-Identifier: MIT | |
""" | |
""" | |
import storage | |
import gc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2021 Tim C, written for Adafruit Industries | |
# | |
# SPDX-License-Identifier: MIT | |
""" | |
""" | |
import time | |
import board | |
import displayio | |
import terminalio |
NewerOlder