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
/** | |
* Title: gpio.c | |
* | |
* Author: Andrew Montag | |
* [email protected] | |
* sites.google.com/site/andrewmontag | |
* | |
* Licence: Boost Software Licence - Verison 1.0 | |
* http://www.boost.org/users/license.html | |
* |
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
//tft macros | |
#define LCD_CS A3 | |
#define LCD_CD A2 | |
#define LCD_WR A1 | |
#define LCD_RD A0 | |
#define LCD_RESET A4 | |
//touchscreen macros |
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
import pygame | |
pygame.init() | |
p1 = pygame.joystick.Joystick(0) | |
p1.init() | |
clock = pygame.time.Clock() | |
#logitech f350 in X mode | |
# -- location |axis| neg | pos| | |
# 0 -> left X | left | right |
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 <curl/curl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <errno.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
# generated by Slic3r 1.2.10-dev on Wed Nov 11 19:48:31 2015 | |
avoid_crossing_perimeters = 1 | |
bed_shape = -5x-5,300x-5,300x300,-5x300 | |
bed_temperature = 0 | |
before_layer_gcode = | |
bottom_solid_layers = 3 | |
bridge_acceleration = 0 | |
bridge_fan_speed = 100 | |
bridge_flow_ratio = 1 | |
bridge_speed = 60 |
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
#!/usr/bin/env python import cv2 | |
import numpy as np | |
import cv2 | |
import multiprocessing as mp | |
class Eye(object): | |
def __init__(self, n): | |
self.n = n | |
self.cap = cv2.VideoCapture(self.n) |
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
#ifndef POSES | |
#define POSES | |
#include <avr/pgmspace.h> | |
PROGMEM prog_uint16_t Center[] = {8, 512, 512, 512, 512, 512, 512, 512, 512}; | |
PROGMEM prog_uint16_t Home[] = {8, 512, 380, 644, 340, 684, 561, 512, 512}; | |
#endif |
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 <Wire.h> | |
#include <Adafruit_BMP085.h> | |
#include "MPU6050.h" | |
#include "HMC5883L.h" | |
#include <Adafruit_PWMServoDriver.h> | |
// called this way, it uses the default address 0x40 | |
Adafruit_PWMServoDriver pwm1 = Adafruit_PWMServoDriver(); | |
// you can also call it with a different address you want | |
Adafruit_PWMServoDriver pwm2 = Adafruit_PWMServoDriver(0x41); |
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
#!/usr/bin/env python | |
from io import StringIO | |
from Crypto.Cipher import Blowfish | |
import base64 | |
encoded_encryption_key = "e5HcOjmDQALG4ycjOsCHPrKWjKAMhXNC" | |
encrypted_key = base64.b64decode(encoded_encryption_key) | |
game_id ="2064739749" | |
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
-- print the key-value pairs | |
function get_g(gbls) | |
for key,value in pairs(gbls) | |
do w2f(key) | |
end | |
end | |
function w2f(inp) | |
local file = io.open("../addons/tests/globals_test.txt", "a+") | |
file:write(inp.. "\r\n") |