This file contains 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
//Data model: Property List | |
<plist version="1.0"> | |
<array> //array of mountain ranges | |
<dict> //mountain range object | |
<key>totalNumber</key> //total # mountains in that range | |
<integer>6</integer> | |
<key>range</key> //name of mountain range | |
<string>Front Range</string> | |
<key>mountains</key> //array of mountain objects | |
<array> |
This file contains 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 <SPI.h> | |
#include <MFRC522.h> | |
#define SS_PIN 53 //SDA Pin | |
#define RST_PIN 5 | |
MFRC522 mfrc522(SS_PIN, RST_PIN); // Instance of the mfrc522 class | |
#include <FastLED.h> //FastLED library | |
#define FIRST_STRIP_NUM_LEDS 5 //ONLY FOR FIRST LED STRIP | |
#define SECOND_STRIP_NUM_LEDS 10 //ONLY FOR FIRST LED STRIP |
This file contains 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 <Adafruit_NeoPixel.h> | |
#define PIN 6 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800); | |
// Desert - Gold / brown | |
uint32_t desert = strip.gamma32(strip.Color(255, 183, 0)); | |
// Underwater - Deep blues / dark | |
uint32_t water = strip.gamma32(strip.Color(0, 32, 194)); | |
// Rainforest - Deep greens / dark | |
uint32_t forest = strip.gamma32(strip.Color(0, 179, 116)); |
This file contains 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 <SPI.h> | |
#include <MFRC522.h> | |
#define SS_PIN 53 | |
#define RST_PIN 5 | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 22 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(5, PIN, NEO_GRB + NEO_KHZ800); | |
MFRC522 mfrc522(SS_PIN, RST_PIN); // Instance of the class |
This file contains 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
// Each pre-defined idea will be stored in an object that has a title, an image, | |
// a description, an address, a category, and various booleans for season compatibility | |
// and whether or not the activity costs money. | |
// Example: | |
public class Idea{ | |
private String title; //name of activity | |
private String imageName; //name of image for activity | |
private String description; //short description | |
private String address; //address of activity location |
This file contains 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
// Each pre-defined idea will be stored in an object that has a title, an image, | |
// a description, an address, a category, and various booleans for season compatibility | |
// and whether or not the activity costs money. | |
// Example: | |
struct Idea{ | |
var title : String = "" //name of activity | |
var imageName : String = "" //name of image for activity | |
var description : String = "" //short description | |
var address : String = "" //address of activity location |
This file contains 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 <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
//pin that the strip is connected to | |
#define PIN 5 | |
//first argument is # pixels - change to how many you haveAdafruit_NeoPixel strip = Adafruit_NeoPixel(10, PIN, NEO_GRB + NEO_KHZ800); |
This file contains 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
//Declare pin functions on Redboard | |
#define stp 2 | |
#define dir 3 | |
#define MS1 4 | |
#define MS2 5 | |
#define EN 6 | |
//Declare variables for functions | |
char user_input; | |
int x; |
This file contains 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
const int switchPin = 2; // switch input | |
const int motor1Pin = 3; // H-bridge leg 1 (pin 2, 1A) | |
const int motor2Pin = 5; // H-bridge leg 2 (pin 7, 2A) | |
const int enablePin = 9; // H-bridge enable pin | |
void setup() { | |
// set the switch as an input: | |
pinMode(switchPin, INPUT); | |
// set all the other pins you're using as outputs: |
This file contains 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 <Servo.h> | |
//make instance of servo object | |
Servo mike; | |
void setup() { | |
// put your setup code here, to run once: | |
//attach servo motor |
NewerOlder