Skip to content

Instantly share code, notes, and snippets.

View SaimShuja's full-sized avatar

Saim Shuja SaimShuja

View GitHub Profile
@SaimShuja
SaimShuja / CH376S_UART_One.ino
Created August 11, 2022 09:11 — forked from K-ways/CH376S_UART_One.ino
CH376S USB Chip with UART Communication.
// This is the clear code for CH376S UART communication.
#include <SoftwareSerial.h>
byte USB_Byte; //used to store data coming from the USB stick
int LED = 13; //the LED is connected to digital pin 13
int timeOut = 2000; //TimeOut is 2 seconds. This is the amount of time you wish to wait for a response from the CH376S module.
SoftwareSerial USB(10, 11); // Digital pin 10 on Arduino (RX) connects to TXD on the CH376S module
// Digital pin 11 on Arduino (TX) connects to RXD on the CH376S module
@SaimShuja
SaimShuja / sh1107.py
Created July 10, 2019 03:02 — forked from pklazy/sh1107.py
micropython sh1107 driver (m5stick)
import framebuf
'''
from machine import Pin, SPI
vspi = SPI(2, baudrate=1000000, polarity=0, phase=0, bits=8, firstbit=SPI.MSB, sck=Pin(18), mosi=Pin(23))
import sh1107
oled = sh1107.SH1107(64, 128, vspi, Pin(27), Pin(33), Pin(14))
oled.text('hello', 0, 0, 1)
oled.show()
'''