Skip to content

Instantly share code, notes, and snippets.

View sdcharle's full-sized avatar

Mr. Steve Charlesworth sdcharle

View GitHub Profile
@sdcharle
sdcharle / ServoPot.ino
Created September 14, 2021 02:16
ServoPot
// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>
#include <Servo.h>
Servo myservo; // create servo object to control a servo
int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
@sdcharle
sdcharle / Simple CA
Created August 2, 2020 23:55
Correspondence analysis simple example
# Ca fun
# from the qualtrics example https://www.qualtrics.com/eng/correspondence-analysis-what-is-it-and-how-can-i-use-it-to-measure-my-brand-part-1-of-2/
library(ca)
# this just re-creates their initial table
mydata <- data.frame(
Brand = c(rep('Butterbeer',3),
rep('Squishee', 3),
rep('Slurm', 3),
@sdcharle
sdcharle / boot.py
Last active June 23, 2021 08:55
My goofy ESP32 moisture sensor delay
"""
Fun thing that wakes up every x seconds and posts info to Adafruit IO from the moisture sensor
A transistor turns on/off the power to the sensor.
"""
import network
from umqtt.simple import MQTTClient
import machine

Keybase proof

I hereby claim:

  • I am sdcharle on github.
  • I am mistasteve (https://keybase.io/mistasteve) on keybase.
  • I have a public key ASAb_oOMlbuECKtvCqX_Rashu4yRUqTSvHLk3mwOgx9wCQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am sdcharle on github.
  • I am mistasteve (https://keybase.io/mistasteve) on keybase.
  • I have a public key ASAb_oOMlbuECKtvCqX_Rashu4yRUqTSvHLk3mwOgx9wCQo

To claim this, I am signing this object: