How to use the inky.InkyPHAT.BLACK function in inky

To help you get started, we’ve selected a few inky examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github evilsocket / pwnagotchi / sdcard / rootfs / root / pwnagotchi / scripts / main.py View on Github external
parser.add_argument('--clear', dest="do_clear", action="store_true", default=False,
                    help="Clear the ePaper display and exit.")

args = parser.parse_args()

if args.do_clear:
    print("clearing the display ...")
    with open(args.config, 'rt') as fp:
        config = yaml.safe_load(fp)
        cleardisplay = config['ui']['display']['type']
        if cleardisplay in ('inkyphat', 'inky'):
            print("inky display")
            from inky import InkyPHAT

            epd = InkyPHAT(config['ui']['display']['color'])
            epd.set_border(InkyPHAT.BLACK)
            self._render_cb = self._inky_render
        elif cleardisplay in ('papirus', 'papi'):
            print("papirus display")
            from pwnagotchi.ui.papirus.epd import EPD

            os.environ['EPD_SIZE'] = '2.0'
            epd = EPD()
            epd.clear()
        elif cleardisplay in ('waveshare_1', 'ws_1', 'waveshare1', 'ws1'):
            print("waveshare v1 display")
            from pwnagotchi.ui.waveshare.v1.epd2in13 import EPD

            epd = EPD()
            epd.init(epd.lut_full_update)
            epd.Clear(0xFF)
        elif cleardisplay in ('waveshare_2', 'ws_2', 'waveshare2', 'ws2'):
github evilsocket / pwnagotchi / pwnagotchi / ui / hw / inky.py View on Github external
def initialize(self):
        logging.info("initializing inky display")

        if self.config['color'] == 'fastAndFurious':
            logging.info("Initializing Inky in 2-color FAST MODE")
            logging.info("THIS MAY BE POTENTIALLY DANGEROUS. NO WARRANTY IS PROVIDED")
            logging.info("USE THIS DISPLAY IN THIS MODE AT YOUR OWN RISK")

            from pwnagotchi.ui.hw.libs.inkyphat.inkyphatfast import InkyPHATFast
            self._display = InkyPHATFast('black')
            self._display.set_border(InkyPHATFast.BLACK)
        else:
            from inky import InkyPHAT
            self._display = InkyPHAT(self.config['color'])
            self._display.set_border(InkyPHAT.BLACK)

inky

Inky pHAT Driver

MIT
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis

Similar packages