Skip to content

Instantly share code, notes, and snippets.

View sdrshnptl's full-sized avatar
🎯
Focusing

Sudarshan Patil sdrshnptl

🎯
Focusing
View GitHub Profile
@crcastle
crcastle / ESP8266 Code (RX node)
Created July 13, 2015 01:14
Resolution of issue with ESP8266 described in https://gist.github.com/crcastle/93ebe3b42f3ab021639b (see comments for detailed changes)
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define DEVICE_ID 2
#define CHANNEL 1 //MAX 127
// SPI pin configuration figured out from here:
// http://d.av.id.au/blog/esp8266-hardware-spi-hspi-general-info-and-pinout/
RF24 radio(2, 15); // Set up nRF24L01 radio on SPI bus plus pins 2 for CE and 15 for CSN
@projectweekend
projectweekend / read_serial.py
Last active October 4, 2023 02:22
Reading from a serial port in Python
import serial
# this port address is for the serial tx/rx pins on the GPIO header
SERIAL_PORT = '/dev/ttyAMA0'
# be sure to set this to the same rate used on the Arduino
SERIAL_RATE = 9600
def main():
#include "TimerOne.h"
const int PIN_1_K = 10;
const int PIN_2_K = 12;
const int PIN_3_K = 11;
int digits[10][8] = {
// 0 1 2 3 4 5 6 7
{ 1, 1, 0, 1, 0, 1, 1, 1 }, // 0
{ 0, 0, 0, 1, 0, 1, 0, 0 }, // 1
@powerexploit
powerexploit / wikipy.py
Created September 24, 2019 14:43
Wikipedia scraping with python
#!/usr/bin/python3
#Scraping wikipedia page according to your command line input
import sys
import requests
import bs4
RED = '\033[31m'
END = '\033[0m'
ascii_art = RED \
+ """