Skip to content

Instantly share code, notes, and snippets.

View santolucito's full-sized avatar

Mark Santolucito santolucito

View GitHub Profile
@santolucito
santolucito / xmas.ino
Created April 14, 2022 14:12
xmas lights
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the NeoPixels?
@santolucito
santolucito / main.tex
Created June 13, 2022 13:35
latex simple gantt chart example for grants
\documentclass[tikz, margin=5mm]{standalone}
\usepackage{pgfgantt}
\title{Gantt Charts with the pgfgantt Package}
\begin{document}
\begin{ganttchart}[
vgrid={*{11}{gray, dotted}, *1{black, dashed}},
bar label node/.append style={
align=left,
text width=width("Aim 2. Software verificationx")}
@santolucito
santolucito / test.py
Created November 1, 2022 02:28
blender example
import bpy
import random
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
from math import sin, pi
bpy.ops.object.empty_add()
cameraPath = bpy.context.active_object
cameraPath.keyframe_insert("location", frame=1)
@santolucito
santolucito / machine.js
Created September 24, 2023 22:35
Generated by XState Viz: https://xstate.js.org/viz
const musicMachine = Machine(
{
id: 'music',
initial: '0',
states: {
0 : {
on: {
t11:
{description: 'not((inCave passage)) and not((inMarket passage)) and not((inTown passage))',
@santolucito
santolucito / blender_minimal.py
Last active November 28, 2023 18:57
Minimal Blender bpy script for COMS1002
import bpy
#delete all objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
#delete all materials
for m in bpy.data.materials:
bpy.data.materials.remove(m)
#create a new material
@santolucito
santolucito / main.py
Created November 28, 2023 19:06
blender bpy example with keyframes
import bpy
#delete all objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
#delete all materials
for m in bpy.data.materials:
bpy.data.materials.remove(m)
#create a new material
import bpy
import random
#delete all objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
#delete all materials
for m in bpy.data.materials:
bpy.data.materials.remove(m)
@santolucito
santolucito / main.py
Created December 1, 2023 11:33
Flippy donut in blender
# https://youtu.be/9nT23gPfEb8
import bpy
import math
#delete all objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
#delete all materials
for m in bpy.data.materials:
@santolucito
santolucito / ChargeLevelTTGO.ino
Created February 12, 2024 07:46
ESP32 TTGO T1 power demo
//this code will show you the battery charge left on the screen
//and dim the screen (to conserve power)
//and go to sleep when you press the left builtin button
//to wake it up again, just hit the reset button on the side
//download as zip and add to libraries folder in Arduino folder https://github.com/pangodream/18650CL
#include <Pangodream_18650_CL.h>
#define ADC_PIN 34