Skip to content

Instantly share code, notes, and snippets.

View deadprogram's full-sized avatar
💭
Upcoming availability for work.

Ron Evans deadprogram

💭
Upcoming availability for work.
View GitHub Profile
@deadprogram
deadprogram / go-uf2.go
Last active April 7, 2024 03:38
Converts a .BIN firmware file to a .UF2 file
// Converts firmware files from BIN to UF2 format before flashing.
//
// For more information about the UF2 firmware file format, please see:
// https://github.com/Microsoft/uf2
//
package main
import (
"fmt"
"io/ioutil"
@deadprogram
deadprogram / flash-esp8266.sh
Created January 30, 2019 07:56
Script to flash ESP8266 with updated version of the official AT command set firmware.
#!/bin/sh
SPToolDir="$HOME/.local/lib/python2.7/site-packages"
FirmwareDir="$HOME/ESP8266_NONOS_SDK"
cd "$SPToolDir"
port=/dev/ttyUSB0
if [ ! -c $port ]; then
port=/dev/ttyUSB0
fi
if [ ! -c $port ]; then
echo "No device appears to be plugged in. Stopping."
// This is a console to a ESP8266 running on the device UART1.
// Allows you to type AT commands from your computer via the microcontroller.
//
// In other words:
// Your computer <--> UART0 <--> MCU <--> UART1 <--> ESP8266
//
// More information on the Espressif AT command set at:
// https://github.com/espressif/ESP8266_AT/wiki
//
package main
@deadprogram
deadprogram / mdktest.c
Last active December 11, 2018 10:20
TinyGo with CGo including MDK
#include "nrf.h"
#include "mdktest.h"
int mdk_major_version()
{
return MDK_MAJOR_VERSION;
}
int mdk_minor_version()
{
// What it does:
//
// This example uses a deep neural network to perform background blurring somewhat like Microsoft Teams does.
// You can see the faces of meeting participants, but not the background, for privacy during videoconferences.
//
// It can be used with either the Caffe face tracking or Tensorflow object detection models that are
// included with OpenCV 4.0
//
// To perform blurring with the Caffe model:
//
// What it does:
//
// This example opens a video capture device, then streams MJPEG from it.
// Once running point your browser to the hostname/port you passed in the
// command line (for example http://localhost:8080) and you should see
// the live video stream.
//
// How to run:
//
// mjpeg-streamer [camera ID] [host:port]
// Connects to an MCP3008 ADC via SPI.
package main
import (
"errors"
"machine"
"time"
)
var (
// Automatically generated file. DO NOT EDIT.
// Generated by gen-device-svd.py from nrf52.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk
// +build nrf,nrf52
// nRF52832 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller
//
// Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// Automatically generated file. DO NOT EDIT.
// Generated by gen-device-svd.py from nrf52840.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk
// +build nrf,nrf52840
// nRF52840 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller
//
// Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@deadprogram
deadprogram / main.go
Created November 27, 2018 16:18 — forked from nikolaiianchuk/main.go
Fixed memory leaking
package main
import (
"fmt"
"io/ioutil"
"net/http"
"runtime"
"time"
"gocv.io/x/gocv"