Skip to content

Instantly share code, notes, and snippets.

View sdaitzman's full-sized avatar
👩‍💻

Sam Daitzman sdaitzman

👩‍💻
View GitHub Profile
@sdaitzman
sdaitzman / PIDClass.cpp
Created November 7, 2019 12:48
A PID class (with methods) implemented for Principles of Engineering, Olin College of Engineering.
class PID_Controller {
public:
// initialize variables used in the loop
float previousError = 0;
float error = 0;
float integral = 0;
float derivative = 0;
float output = 0;
@sdaitzman
sdaitzman / draw.py
Created October 12, 2021 12:17 — forked from korakot/draw.py
Drawing on Google Colab
from IPython.display import HTML, Image
from google.colab.output import eval_js
from base64 import b64decode
canvas_html = """
<canvas width=%d height=%d></canvas>
<button>Finish</button>
<script>
var canvas = document.querySelector('canvas')
var ctx = canvas.getContext('2d')