Skip to content

Instantly share code, notes, and snippets.

#include <SPI.h>
#include <SoftwareSerial.h>
// Choose two pins for SoftwareSerial
SoftwareSerial rSerial(10, 1); // RX, TX
// For SparkFun's tags, we will receive 16 bytes on every
// tag read, but throw four away. The 13th space will always
// be 0, since proper strings in Arduino end with 0
#include <SdFatConfig.h>
#include <sdios.h>
#include <FreeStack.h>
#include <MinimumSerial.h>
#include <SdFat.h>
#include <BlockDriver.h>
#include <SdFatUtil.h>
#include <SysCall.h>
#include <SPI.h>
@kmicheli
kmicheli / app.js
Last active September 25, 2018 04:40
console.log(process.argv[0], process.argv[1], process.argv[2], process.argv[3]);
if (process.argv.length < 4){
console.log('Please type in station ID and Observation ID');
process.exit();
}
const fs = require('fs')
const request = require('superagent')
var sourceWords = "inspired complicated wistful adventurous stern honest bubbly excited ambitious lost";
var words = sourceWords.split(" ");
var i = 0;
var r, g, b;
function setup() {
createCanvas(960,570);
noLoop();
}
#include <Adafruit_NeoPixel.h>
#include <SoftwareSerial.h>
#define reset 4 //reset button
#define CALIBRATIONTIME 20000
#define ballPixels 3 // Number of pixels in ballcount strand
#define ballPin 10 // Ball count NeoPixel LED strand is connected to this pin
Adafruit_NeoPixel ballStrip = Adafruit_NeoPixel(ballPixels, ballPin, NEO_GRB + NEO_KHZ800);
#include <Stepper.h>
const int stepsPerRevolution = 48; // the number of steps per revolution for the motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
void setup() {
// set the speed at 60 rpm:
myStepper.setSpeed(60);
const int button = 2; // switch input
const int motor1Pin = 3; // H-bridge leg 1 (pin 2, 1A)
const int motor2Pin = 4; // H-bridge leg 2 (pin 7, 2A)
const int enablePin = 9; // H-bridge enable pin
void setup() {
// set the switch as an input
pinMode(button, INPUT);
#include <Servo.h>
//creates an instance of the servo object to control a servo
Servo myServo;
void setup() {
//initialize serial communications
Serial.begin(9600);
//attaches the servo on pin 2 to the servo object
myServo.attach(3);
/*
This P5 sketch is a template for getting started with Serial Communication.
The SerialEvent callback is where incoming data is received
By Arielle Hein, adapted from ITP Phys Comp Serial Labs
Edited March 13 2018
*/
int pot1 = A0; //select the input pin for the potentiometer
int pot2 = A1;
int potVal1 = 0; //variable to store the value coming from the sensor
int potVal2 = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}