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 luma.core.interface.serial import i2c | |
from luma.core.render import canvas | |
from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106 | |
import time | |
serial = i2c(port=1, address=0x3C) | |
device = ssd1306(serial, rotate=0) | |
# Box and text rendered in portrait mode | |
with canvas(device) as draw: |
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 luma.core.interface.serial import i2c | |
from luma.core.render import canvas | |
from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106 | |
import time | |
serial = i2c(port=1, address=0x3C) | |
device = ssd1306(serial, rotate=0) | |
# Box and text rendered in portrait mode | |
with canvas(device) as draw: |
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 PIL import ImageFont, ImageDraw | |
from luma.core.interface.serial import i2c | |
from luma.core.render import canvas | |
from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106 | |
import time | |
serial = i2c(port=1, address=0x3C) | |
device = ssd1306(serial, rotate=0) | |
# Box and text rendered in portrait mode |
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 luma.core.interface.serial import i2c | |
from luma.core.render import canvas | |
from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106 | |
import time | |
from PIL import ImageFont, ImageDraw | |
serial = i2c(port=1, address=0x3C) | |
device = ssd1306(serial, rotate=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
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
GPIO_TRIGGER = 23 | |
GPIO_ECHO = 24 | |
GPIO.setup(GPIO_TRIGGER, GPIO.OUT) | |
GPIO.setup(GPIO_ECHO, GPIO.IN) |
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
import RPi.GPIO as GPIO | |
from luma.core.interface.serial import i2c | |
from luma.core.render import canvas | |
from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106 | |
import time | |
GPIO.setmode(GPIO.BCM) | |
GPIO_TRIGGER = 23 | |
GPIO_ECHO = 24 |
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
import RPi.GPIO as GPIO | |
import pyaudio | |
from numpy import linspace,sin,pi,int16 | |
from luma.core.interface.serial import i2c | |
from luma.core.render import canvas | |
from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106 | |
import time | |
RATE = 4400 | |
FREQ = 261.6 |
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 RPi import GPIO | |
from time import sleep | |
clk = 17 | |
dt = 18 | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(clk, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |
GPIO.setup(dt, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |
counter = 0 | |
clkLastState = GPIO.input(clk) |
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 RPi import GPIO | |
from time import sleep | |
clk = 17 | |
dt = 18 | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(clk, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |
GPIO.setup(dt, GPIO.IN, pull_up_down=GPIO.PUD_UP) |
OlderNewer