Skip to content

Instantly share code, notes, and snippets.

#include "Arduino.h"
#include "esp_camera.h"
#include "ESPAsyncWebServer.h"
typedef struct {
camera_fb_t * fb;
size_t index;
} camera_frame_t;
#define PART_BOUNDARY "123456789000000000000987654321"
@racerxdl
racerxdl / c2write.ino
Created April 13, 2017 03:08
EFM8 C2 Write Port to Arduino
/**
Based on https://github.com/jaromir-sukuba/efm8prog/
Use his SW to program EFM8 using arduino.
This needs some work though (but it works)
**/
#define C2D 2
#define C2CK 3
#define LED 13
#define INBUSY 0x02
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]){
FILE * fp;
char *buffer;
long flen;
char *fname;
@pwillard
pwillard / homeweather.ino
Created June 20, 2016 14:37
weather stuff
//==============================================================================
// W W EEEEE AAA TTTTT H H EEEEE RRRR III N N OOOOO
// W W E A A T H H E R R I NN N O O
// W W W EEEE AAAAA T HHHHH EEEE RRRR I N N N O O
// W W W E A A T H H E R R .. I N NN O O
// W W EEEEE A A T H H EEEEE R R .. III N N OOOOO
//==============================================================================
//==============================================================================
@geekman
geekman / jffs2.py
Created October 26, 2015 16:30
JFFS2 scripts
#!/usr/bin/env python
#
# tool to parse JFFS2 images
# and more importantly, guess the erase block size
#
# 2015.10.19 darell tan
#
from struct import unpack
from argparse import ArgumentParser
@bbx10
bbx10 / ESPWebSock.ino
Last active March 3, 2023 22:13
ESP8266 Web server with Web Socket to control an LED
/*
* ESP8266 Web server with Web Socket to control an LED.
*
* The web server keeps all clients' LED status up to date and any client may
* turn the LED on or off.
*
* For example, clientA connects and turns the LED on. This changes the word
* "LED" on the web page to the color red. When clientB connects, the word
* "LED" will be red since the server knows the LED is on. When clientB turns
* the LED off, the word LED changes color to black on clientA and clientB web
@klalle
klalle / nRF2401_Transmitter.c
Last active October 12, 2022 11:30
This is a simple code that waits for the USART interrupt, that receives the payload from the USART and then calls the send-function to broadcast the data to listening nRFs.
/*
* RF_Tranceiver.c
*
* Created: 2012-08-10 15:24:35
* Author: Kalle
* Atmega88
*/
#include <avr/io.h>
#include <stdio.h>
@jeje
jeje / RGB_LED_Strip_Mosfet.ino
Last active January 22, 2020 18:03
RGB LED Strip controlled by an Arduino with the help of MOSFETs
// HSV fade/bounce for Arduino - scruss.com - 2010/09/12
// Note that there's some legacy code left in here which seems to do nothing
// but should do no harm ...
// don't futz with these, illicit sums later
#define RED 9// pin for red LED
#define GREEN 10 // pin for green - never explicitly referenced
#define BLUE 11 // pin for blue - never explicitly referenced
#define SIZE 255
#define DELAY 20
@flakas
flakas / hc-sr04.ino
Created August 8, 2012 12:41
Modified Arduino Ping))) example to work with 4-Pin HC-SR04 Ultrasonic Sensor Distance Measuring Module
/* HC-SR04 Sensor
https://www.dealextreme.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696
This sketch reads a HC-SR04 ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.
The circuit:
@nezza
nezza / gist:2394361
Created April 15, 2012 19:07
Extractor for GoPro camera firmwares.
/* This tool extracts the sections of a supplied GoPro
* firmware image.
*
* It creates the following files in the current directory:
* bst.bin, bld.bin, pri.bin, rom.bin, dsp.bin
*
* It also shows the expected CRC32 checksum of the section and shows
* where it will be written on the device, you can use this address as
* ROM address and load address in IDA Pro.
*