Skip to content

Instantly share code, notes, and snippets.

View RobotGrrl's full-sized avatar
🤖
Robots!!!

RobotGrrl RobotGrrl

🤖
Robots!!!
View GitHub Profile
@ssudoku
ssudoku / gist:a6aa4666e87440a92657973e5a5564ed
Created August 30, 2017 06:41
overlaying content over a-frame
<div class=”vr-container”> <!-- container div -->
<a-scene class=”vr-background”> <!-- the a-frame embed code -->
<a-entity rotation="0 0 0"> <!-- rotation value sets the starting view point, play around! -->
<a-animation attribute="rotation"
dur="600000"
easing="linear"
fill="forwards"
to="0 360 0"
repeat="indefinite"></a-animation> <!-- remove if you don’t like the automatic movement -->
<a-sky src="your-image-link"></a-sky>
@lmccart
lmccart / gist:2273a047874939ad8ad1
Last active February 18, 2024 21:57
p5.js + p5.dom.js + clmtracker.js
<html>
<head>
<script src="clmtrackr.js"></script>
<script src="model_pca_20_svm.js"></script>
<script src="p5.js"></script>
<script src="p5.dom.js"></script>
<script>
var ctracker;
@RobotGrrl
RobotGrrl / gist:8583bae096ff95233d44
Created May 20, 2014 17:30
Numbers in an array to int
for(int i=0; i<valLen; i++) {
valResult += (val[(valLen-1)-i] - '0')*pow(10, i);
if(DEBUG) Serial << i << ": " << val[(valLen-1)-i] << " " << (val[(valLen-1)-i] - '0') << " " << pow(10, i) << "=" << (val[(valLen-1)-i] - '0')*pow(10, i) << endl;
}
/*
if(valLen > 3) {
valResult += (val[0] - '0')*1000;
valResult += (val[1] - '0')*100;
valResult += (val[2] - '0')*10;
@texhex
texhex / DatatypeSize.ino
Created October 25, 2012 17:17
Arduino Data types
// Arduino DatatypeSize v2 - Display information about data types used in Arduino
// Created by Michael 'TeX' Hex - http://www.texhex.info/
//
// Full list of all data types:
// http://arduino.cc/en/Reference/HomePage -> Section "Data Types"
//
// Additonal references:
// http://www.arduino.cc/playground/Code/DatatypePractices
// http://arduino.cc/en/Reference/VariableDeclaration
//
@RobotGrrl
RobotGrrl / processing-given-serialport
Created July 5, 2012 00:51
When connecting Processing to an Arduino (or whatever serial port)... this can come in handy in case the ports get scrambled! Arrg!
int port = 0;
for (int i=0; i<Serial.list().length; i++) {
println(Serial.list()[i]);
if (Serial.list()[i].equals("/dev/tty.usbserial-A900F5IY")) {
println("ding!");
port = i;
}
}
anonymous
anonymous / demokit.pde
Created May 17, 2011 02:20
Android Open Accessory Kit (ADK) Arduino Base Board and Android Demo Shield example.
#include <Wire.h>
#include <Servo.h>
#include <Max3421e.h>
#include <Usb.h>
#include <AndroidAccessory.h>
#include <CapSense.h>
#define LED3_RED 2