This file contains hidden or 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
| import framebuf | |
| import uio | |
| class FBConsole(uio.IOBase): | |
| def __init__(self, fb, bgcolor=0, fgcolor=-1, width=-1, height=-1, readobj=None): | |
| self.readobj = readobj | |
| self.fb = fb | |
| if width > 0: | |
| self.width=width | |
| else: |
This file contains hidden or 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
| from ST7735 import TFT | |
| from machine import SPI,Pin | |
| import time | |
| spi = SPI(2, baudrate=20000000, polarity=0, phase=0, sck=Pin(14), mosi=Pin(13), miso=Pin(12)) | |
| tft=TFT(spi,16,17,18) | |
| tft.initb2() | |
| tft.rgb(True) | |
| tft.setvscroll(17, 17) | |
| tft.fill(TFT.BLACK) | |
| tft.fillrect((0, 0), (128, 16), TFT.PURPLE) |
This file contains hidden or 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
| from ST7735 import TFT | |
| from machine import SPI,Pin | |
| spi = SPI(2, baudrate=20000000, polarity=0, phase=0, sck=Pin(14), mosi=Pin(13), miso=Pin(12)) | |
| tft=TFT(spi,16,17,18) | |
| tft.initb2() | |
| tft.rgb(True) |
This file contains hidden or 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
| tft.setvscroll(1, 1) | |
| from ST7735fb import TFTfb | |
| from petme128 import petme128 | |
| fb = TFTfb(tft, petme128) |
This file contains hidden or 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
| from fbconsole import FBConsole | |
| scr = FBConsole(fb, TFT.BLACK, TFT.WHITE) | |
| import os | |
| os.dupterm(scr) |
This file contains hidden or 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
| from fpioa_manager import * | |
| from Maix import I2S, GPIO | |
| import audio | |
| # disable wifi | |
| fm.register(8, fm.fpioa.GPIO0) | |
| wifi_en=GPIO(GPIO.GPIO0,GPIO.OUT) | |
| wifi_en.value(0) | |
| # register i2s(i2s0) pin |
This file contains hidden or 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
| import video,time | |
| from Maix import GPIO | |
| fm.register(34, fm.fpioa.I2S0_OUT_D1) | |
| fm.register(35, fm.fpioa.I2S0_SCLK) | |
| fm.register(33, fm.fpioa.I2S0_WS) | |
| fm.register(8, fm.fpioa.GPIO0) | |
| wifi_en=GPIO(GPIO.GPIO0,GPIO.OUT) | |
| wifi_en.value(0) |
This file contains hidden or 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
| WIFI_SSID = "ssid" | |
| WIFI_PASSWD = "password" | |
| import network, time | |
| print("=== Configuring FPIOA") | |
| from fpioa_manager import fm, board_info | |
| from Maix import GPIO | |
| from machine import UART |
This file contains hidden or 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
| from Maix import GPIO | |
| fm.register(32, fm.fpioa.GPIO1) | |
| sp_en=GPIO(GPIO.GPIO1,GPIO.OUT) | |
| sp_en.value(1) |
This file contains hidden or 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
| import sensor, lcd, image | |
| import time | |
| sensor.reset() | |
| sensor.set_pixformat(sensor.RGB565) | |
| sensor.set_framesize(sensor.QVGA) | |
| sensor.set_hmirror(0) | |
| sensor.run(1) | |
| sensor.skip_frames() | |
| lcd.init(freq=15000000) |