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
void zprintf(const char *format, ...); | |
#define COLS 8 | |
#define ROWS (128 / 8) | |
void setup() { | |
Serial.begin(9600); | |
while (!Serial) | |
; |
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
from machine import Pin, I2C | |
import utime | |
import ure | |
class AE_AQM0802: | |
DEFAULT_ADDR = (0x7C >> 1) | |
def __init__( self, i2c ): | |
self.i2c = i2c |
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
from machine import Pin, ADC, Timer | |
import utime | |
import sys | |
from machine import I2C | |
from nxp_periph import PCA9955B, LED, PCA9629A | |
if "MicroPython v1.19" in sys.version: | |
TIMER_ID = 0 | |
else: |
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
#include <SPI.h> | |
SPISettings spi_setting(1000000, MSBFIRST, SPI_MODE0); | |
void setup() { | |
Serial.begin(9600); | |
while (!Serial) | |
; | |
SPI.begin(); |
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
from machine import Pin, ADC, Timer | |
import utime | |
from machine import I2C | |
from nxp_periph import PCA9956B, LED | |
class periodic_adc: | |
def __init__( self, pin_name, *, interval = 1, scaling = (2 ** 16) ): | |
self.timer_flag = False | |
self.adc = ADC( Pin( pin_name ) ) |
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
from machine import I2C, SPI, Pin, Timer | |
from utime import sleep, localtime | |
from struct import unpack | |
import os | |
class MPL3115A2S: | |
def __init__( self, i2c, addr = 0xC0 >> 1 ): | |
self.i2c = i2c | |
self.addr = addr | |
self.data_ready = True |
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
from machine import SPI, Pin | |
from utime import sleep, localtime | |
from struct import unpack | |
import os | |
class MPL115A1: | |
def __init__( self, spi, cs ): | |
self.spi = spi | |
self.cs = cs | |
self._get_coeff() |
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
from machine import Pin, I2C, Timer | |
from utime import sleep | |
import machine | |
ADR = 0x7A >>1 | |
class PTN5150A: | |
def __init__( self, i2c, address = ADR ): | |
self.__i2c = i2c | |
self.__addr = ADR |
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
from machine import Pin, I2C, Timer | |
from utime import sleep | |
import machine | |
ADR = 0x7A >>1 | |
class PTN5150A: | |
def __init__( self, i2c, address = ADR ): | |
self.__i2c = i2c | |
self.__addr = ADR |
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
<!-- | |
https://qiita.com/Haruka-Ogawa/items/59facd24f2a8bdb6d369 | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>ui prototype</title> |
NewerOlder