Skip to content

Instantly share code, notes, and snippets.

@CarlosGS
CarlosGS / raspberry_fast_capture.py
Last active February 26, 2024 04:16
Fast reading from the raspberry camera with Python, Numpy, and OpenCV. See the comments for more details.
# Fast reading from the raspberry camera with Python, Numpy, and OpenCV
# Allows to process grayscale video up to 124 FPS (tested in Raspberry Zero Wifi with V2.1 camera)
#
# Made by @CarlosGS in May 2017
# Club de Robotica - Universidad Autonoma de Madrid
# http://crm.ii.uam.es/
# License: Public Domain, attribution appreciated
import cv2
import numpy as np
@nonsintetic
nonsintetic / ArduinoZeroTimer.ino
Last active April 1, 2024 11:52
SAMD21 Arduino Timer Example
/*
* This sketch illustrates how to set a timer on an SAMD21 based board in Arduino (Feather M0, Arduino Zero should work)
* It should generate a 1Hz square wave as it is (thanks richdrich for the suggestion)
* Some more info about Timer Counter works can be found in this article:
* http://www.lucadavidian.com/2017/08/08/arduino-m0-pro-il-sistema-di-clock/
* and in the datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/SAM_D21_DA1_Family_DataSheet_DS40001882F.pdf
*/
uint32_t sampleRate = 1000; //sample rate in milliseconds, determines how often TC5_Handler is called
@ugate
ugate / setup.sh
Last active November 28, 2022 17:53
NTC C.H.I.P. setup script
#!/bin/bash
LC_ALL=en_US.UTF-8
# configures/installs common CHIP features (including enabling disabled ones)
# run 'sudo chmod +x setup.sh && ./setup.sh' to run the installation
clear
res=
dtc=
rboot=
uname -a
cat << _EOF_
{
"id": "rostock-mini",
"version": 1,
"name": "Delta Rostock mini",
"author": "onitake",
"manufacturer": "Other",
"file_formats": "text/x-gcode",
"inherits": "fdmprinter.json",
"machine_settings": {
"machine_width": { "default": 160 },