Skip to content

Instantly share code, notes, and snippets.

View sabas1080's full-sized avatar
🐈
Working

Sabas sabas1080

🐈
Working
View GitHub Profile
@jcmvbkbc
jcmvbkbc / gist:316e6da728021c8ff670a24e674a35e6
Last active November 21, 2023 18:39
esp32s3 linux rebuild scripts
Latest versions of these scripts are available in git repository https://github.com/jcmvbkbc/esp32-linux-build
@HalfdanJ
HalfdanJ / screenshot-websocket.js
Created October 1, 2019 22:44
A websocket server sending screenshot as base64 encoded blob
// Requires ws and screenshot-desktop
const WebSocket = require('ws');
const screenshot = require('screenshot-desktop')
const wss = new WebSocket.Server({ port: 8889 });
wss.on('connection', function connection(ws) {
ws.on('message', function incoming(message) {
console.log('received: %s', message);
// Copyright 2017-2018 Pavitra, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package com.pavitra;
import android.content.Context;
import android.util.Log;
import com.physicaloid.lib.*;
@sticilface
sticilface / PROGMEM.md
Last active July 23, 2023 11:38
PROGMEM

Guide to PROGMEM on ESP8266 and Arduino IDE

Intro

On low memory devices like the arduino and esp8266 you do not want strings to be stored in RAM. This occurs by default on these systems. Declare a string const char * xyz = "this is a string" and it will use up RAM.

The solution on these devices is to allow strings to be stored in read only memory, in Arduino this is the PROGMEM macro. Most of my experience is with the ESP8266 which is a 32bit micros controller. This device stores PROGMEM data in flash. The macro PROGMEM on ESP8266 is simply

#define PROGMEM   ICACHE_RODATA_ATTR
from microbit import spi, sleep, pin16
import array
import gc
class LoRa(object):
"""
Radio - LoRa. Single channel.
"""
def __init__(self, Frequency=434.450, Mode=1):
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int suma(int);
int mult(int);
void genera(int, int, int);
int x,y,z,a,li,ls;
@iddar
iddar / ESP8266-links.md
Last active August 29, 2015 14:12
Enlaces relacionados con el modulo ESP8266 (Related links with ESP8266)
@mikedotalmond
mikedotalmond / HC_SR04_UltrasoundDistanceSensor.ino
Last active July 6, 2017 14:01
Example sketch for working with the HC-SR04 Ultrasound distance sensor. Uses https://github.com/mikedotalmond/arduino-pulseInWithoutDelay
/**
* @author Mike Almond - @mikedotalmond
*
* Example sketch for working with the HC-SR04 Ultrasound distance sensor
* http://users.ece.utexas.edu/~valvano/Datasheets/HCSR04b.pdf
*
* Uses a hardware interrupt to monitor the echo pin and measure the pulse length (without pausing code execution like you would when using Arduino::pulseIn())
* https://github.com/mikedotalmond/arduino-pulseInWithoutDelay
* PulseInZero uses interrupt 0 ( pin 2 on arduino uno)
* PulseInOne uses interrupt 1 ( pin 3 on an arduino uno)