Skip to content

Instantly share code, notes, and snippets.

Avatar

Aaron Gough (He/Him) aarongough

View GitHub Profile
View pio_run_result.sh
Processing teensy41 (platform: teensy; platform_packages: toolchain-gccarmnoneeabi@1.100301.220327; board: teensy41; framework: arduino; upload_protocol: teensy-cli; extra_scripts: test/delay_after_upload.py; build_unflags: -std=gnu++11 -std=gnu++14; build_flags: -std=c++20)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
PLATFORM: Teensy (4.15.0) > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
- framework-arduinoteensy 1.156.0 (1.56)
- tool-teensy 1.155.0 (1.55)
View linear_coordinated_motion.html
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<script>
var canvas = document.createElement("canvas");
var context = this.canvas.getContext("2d");
context.fillStyle = "black";
View fixture_offset_compensator.txt
%
N0 O9002 (WORK OFFSET COMPENSATOR)
#IF H21 < 0 THEN GOTO :ERROR
#IF H21 = 0 THEN GOTO :ERROR
#PRINT "THIS PROGRAM UPDATES A FIXTURE OFFSET Z POSITION TO"
#PRINT "TAKE INTO ACCOUNT THE LENGTH OF THE REFERENCE TOOL (TOOL 21)."
#PRINT ""
#PRINT "ENTER THE NUMBER OF THE FIXTURE OFFSET TO UPDATE:"
#INPUT V10
#V1 = FZ(V10)
View haas_investigation.md

HAAS Acceleration Calculations

VF3

  • Y AXIS: Mits 900W Servo, 1500 Rated RPM, 3000 Max RPM, 5.39NM
  • Ballscrew: 40MM DIA 8MM Pitch
  • Max load: 3500 lb (1588 kg)
  • Max thrust: 2550 lbf (11343 N)
  • Advertised max feedrate: 1000 ipm
  • Calculated max feedrate (max rpm * pitch): 944 ipm
  • Max cceleration with rated load (+ 800lb saddle/table): 11343 / (1588 + 362) = 5.81 m/s2 (0.59 G)
View circle_anchors.yml
version: 2
jobs:
docker_config: &docker_config
- image: circleci/ruby:2.3.4
environment:
RAILS_ENV: test
- image: circleci/mysql:5.6
environment:
MYSQL_DATABASE: circle_test
MYSQL_HOST: 127.0.0.1
View circle_naive.yml
version: 2
jobs:
test_project_1:
docker:
- image: circleci/ruby:2.3.4
environment:
RAILS_ENV: test
- image: circleci/mysql:5.6
environment:
MYSQL_DATABASE: circle_test
@aarongough
aarongough / tachometer.c
Created Sep 10, 2013
A simple Tachometer written for the Arduino. Uses a 'photo interruptor' on pin 3 as the input. The photo interruptor used was: https://www.sparkfun.com/products/9299 In combination with this breakout board: https://www.sparkfun.com/products/9322
View tachometer.c
#include <SoftwareSerial.h>
#include <serLCD.h>
int lcdTxPin = 2;
int tachPin = 3;
volatile int pulseCount = 0;
volatile unsigned long samplePeriodStart = 0;
volatile unsigned long pulsePeriod = 0;
unsigned long rpm = 0;
View too_cheap_for_instagram.rb
class TooCheapForInstagram
def process(item)
return unless item.is_a?(Potion::StaticFile)
extensions = [".jpg", ".jpeg", ".gif", ".png"]
return unless extensions.include?(File.extname(item.output_path).downcase)
image = MiniMagick::Image.read(item.content)
image.sepia_tone("80%")
image.vignette("10")
item.content = image.to_blob
View _searchresults.html.erb
<% @searchresults.each do |movie| %>
Found: <%= movie.name %> | <%= movie.id %><br />
<% end %>
View edit.html.erb
content_for :js do
<!-- Output the base view-model code for our User resource. The view-model
will by default have client-side validations that mimic the server-side
model validations. It will also only expose interface methods for
attributes that are marked as accessible on the server-model
-->
<%= User.generate_view_model :update => :onchange %>
end
<!-- Now create the HTML elements that are bound to our view-model -->