Skip to content

Instantly share code, notes, and snippets.

View codelectron's full-sized avatar

codelectron

View GitHub Profile
#include "SD.h"
// https://github.com/espressif/arduino-esp32/blob/master/libraries/SPI/src/SPI.h
// https://wiki.wemos.cc/_media/products:d32:sch_d32_pro_v2.0.0.pdf
void setup() {
Serial.begin(115200);
SPI.begin(18, 19, 23, 4);
if(!SD.begin(4)){
Serial.println("Card Mount Failed");
return;
// Reference: This list was adapted from the table located here:
// http://www.phy.mtu.edu/~suits/notefreqs.html
const float note_C0 = 16.35; //C0
const float note_Db0 = 17.32; //C#0/Db0
const float note_D0 = 18.35; //D0
const float note_Eb0 = 19.45; //D#0/Eb0
const float note_E0 = 20.6; //E0
const float note_F0 = 21.83; //F0
const float note_Gb0 = 23.12; //F#0/Gb0
const float note_G0 = 24.5; //G0
#define BLYNK_PRINT Serial
#include "Wire.h"
#include "WEMOS_Motor.h"
#include <Arduino.h>
#include <U8g2lib.h>
#include "musical_notes.h"
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#! /usr/bin/python
from luma.core.interface.serial import spi
from luma.core.render import canvas
from luma.lcd.device import pcd8544, st7735, uc1701x
from PIL import ImageFont, ImageDraw
from RPi import GPIO
from luma.lcd.aux import backlight
#! /usr/bin/python
from luma.core.interface.serial import spi
from luma.core.render import canvas
from luma.lcd.device import pcd8544, st7735, uc1701x
from RPi import GPIO
from luma.lcd.aux import backlight
serial = spi(port=0, device=0, gpio_DC=23, gpio_RST=24)
#! /usr/bin/python
from luma.core.interface.serial import spi
from luma.core.render import canvas
from luma.lcd.device import pcd8544, st7735, uc1701x
from RPi import GPIO
from luma.lcd.aux import backlight
serial = spi(port=0, device=0, gpio_DC=23, gpio_RST=24)
#! /usr/bin/python
from luma.core.interface.serial import spi
from luma.core.render import canvas
from luma.lcd.device import pcd8544, st7735, uc1701x
from RPi import GPIO
from luma.lcd.aux import backlight
serial = spi(port=0, device=0, gpio_DC=23, gpio_RST=24)
#! /usr/bin/python
from luma.core.interface.serial import spi
from luma.core.render import canvas
from luma.lcd.device import pcd8544, st7735, uc1701x
from RPi import GPIO
from luma.lcd.aux import backlight
serial = spi(port=0, device=0, gpio_DC=23, gpio_RST=24)
from RPi import GPIO
from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106
from time import sleep
import socket
import sys_info
clk = 17
dt = 18