Skip to content

Instantly share code, notes, and snippets.

View SaimShuja's full-sized avatar

Saim Shuja SaimShuja

View GitHub Profile
@SaimShuja
SaimShuja / Esp8266 custom AP
Created August 26, 2022 06:02
open custom AP on esp8266 with AP_name, optional password, optional channel number, and option to hide AP
/*open custom ap on esp8266 with AP_name, optional password, optional channel number, and option to hide AP. */
void CreateAP(String NetworkName, String NetworkPassword = emptyString, int channel=1, bool hidden = false)
{
Serial.println("[Name] " + NetworkName);
Serial.println("[Password] " + NetworkPassword);
Serial.println("[channel] " + String(channel));
Serial.println("[hidden] " + String(hidden? "Yes" : "No"));
WiFi.mode(WIFI_AP);
@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 / file
Created June 18, 2021 21:23
freedom_public
{"0.38421397113508227":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEPn4x89akN8bC6cPtrNvISlzwF1jUCGBn\r\nr44rGxD9fT/4xIfQHUS5kKK+dVmEO1Nx9ko9h8RwrMSzvm0BWAjymM3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCYM0O5P8AAAACiwn/AAAACZBOL3KU0kEh\r\n2/8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAA9OUBAP8qXuu67OrA\r\n1cXQ7P7M/IinSZ3RArrDl7tnnztmaKsGAP9UPv1FndVz2eEonPDvQKUQr3GY8oYM\r\nF/c/sB0CT+5xws7/AAAAVgQAAAAAEggqhkjOPQMBBwIDBC2ptam025pvRg+G0P6s\r\nBgUMwwQtJLNIfp+FR4GTFjvwlNhGPZQpbrgufQt+XeiDEqXwWWLzGLOuRyxM1U/D\r\nCYMDAQgHwv8AAABsBBgTCAAf/wAAAAWCYM0O5P8AAAAJkE4vcpTSQSHb/wAAAAKb\r\nDAAA7WkBAORcI5riPE2uFTtm5CRydOfSGnXGk7mzQstQ6yT1hPTRAPjhUrmVq0CE\r\n14FYN3yuyeonp0FmZXdBJr+Q2Aq4cK6o\r\n=u1eT\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"}
@SaimShuja
SaimShuja / arduino sip esp.ino
Created December 29, 2019 14:52
arduino Sip example
/* ====================================================================
Copyright (c) 2018 Juerge Liegner All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
@SaimShuja
SaimShuja / arduino sip esp.ino
Created December 29, 2019 14:52
arduino Sip example
/* ====================================================================
Copyright (c) 2018 Juerge Liegner All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
@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()
'''