This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Minimal self container OpenGL Example | |
// | |
// Compile with: | |
// xcrun gcc -o test -framework Foundation -framework OpenGL -framework CoreGraphics -framework AppKit main.m | |
// | |
#import <Foundation/Foundation.h> | |
#import <CoreGraphics/CoreGraphics.h> | |
#import <OpenGL/OpenGL.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Minimal self container OpenGL Example | |
// | |
// Compile with: | |
// xcrun gcc -o test -framework Foundation -framework OpenGL -framework CoreGraphics -framework AppKit main.m | |
// | |
#import <Foundation/Foundation.h> | |
#import <CoreGraphics/CoreGraphics.h> | |
#import <OpenGL/OpenGL.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. ROTOZOOM. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
01 DUMMY PIC 9(1) BINARY VALUE 0. | |
01 FRAME PIC 9(10) VALUE 0. | |
01 WS-CNT PIC 9(3) VALUE 0. | |
01 WS-CNT2 PIC 9(3) VALUE 0. | |
01 TMP PIC 9(3) VALUE 0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <EEPROM.h> | |
#include <Adafruit_DotStar.h> | |
#include <SPI.h> | |
#include "TimerThree.h" | |
// R0 = 4x12 leds | |
// R1 = 4x11 leds | |
// R2 = 4x10 leds | |
// R3 = 4x9 leds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <dht11.h> | |
#include <MQ135.h> | |
// #include <Adafruit_NeoPixel.h> | |
// #include "FastLED.h" | |
#define DHT11_PIN 4 | |
dht11 DHT; | |
MQ135 MQ(A0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module tube(height, radius, wall, center = false) { | |
difference() { | |
cylinder(h=height, r=radius, center=center); | |
translate([0,0,-1]) cylinder(h=height + 2, r=radius- wall, center=center); | |
} | |
} | |
for(k=[0: 20.5: 300]) { | |
P = k / 300.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MPU-6050 Short Example Sketch | |
// By Arduino User JohnChi | |
// August 17, 2014 | |
// Public Domain | |
#include<Wire.h> | |
const int MPU_addr=0x68; // I2C address of the MPU-6050 | |
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ; | |
float avg_y; | |
float cur_y; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MPU-6050 Short Example Sketch | |
// By Arduino User JohnChi | |
// August 17, 2014 | |
// Public Domain | |
#include<Wire.h> | |
#include <PID_v1.h> | |
const int MPU_addr=0x68; // I2C address of the MPU-6050 | |
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Phoenix configuration, updated 2023-01-13 | |
// | |
// Use Cmd-Option-Command + Arrow keys to move/size windows, Cmd-Option-Command + Space for fullscreen | |
// | |
// Show debug logs: log stream --process Phoenix | |
// | |
var FULL = "full"; | |
var FIRST = "0-1/3"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Git logic stolen from https://github.com/twolfson/sexy-bash-prompt/blob/master/.bash_prompt | |
# Blocky fonts from https://github.com/powerline/fonts | |
# Colors from http://misc.flogisoft.com/bash/tip_colors_and_formatting | |
# http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html | |
# magentas 236 24 247 | |
# grn 34 | |
# red 161 |