Skip to content

Instantly share code, notes, and snippets.

View MargenauMaker's full-sized avatar

MargenauMaker MargenauMaker

View GitHub Profile
/* Basic if else example for Lilymini
*written by B. Elliott Oct 15, 2019
*/
int switchState = 0;
void setup() {
pinMode (7, OUTPUT);
pinMode (5, OUTPUT);
pinMode (4, OUTPUT);
/* Baisc for loop for students to practice with
* Optimized for Lilymini
* written by B. Elliot Oct 15, 2019
*/
// Dim an LED using a PWM pin
int PWMpin = 3; // LED in series with 470 ohm resistor on pin 10
void setup() {
// no setup needed
/*Lilymini Arduinino button sequencing
* Overlying structure designed by Evan Weinberg Sept 29, 2019
* Design for Wearable Tech Wallet for AES Makerspace Fall 2019 project
* Internal code pieces by Kyle Margenau - AES Makerspace Teacher 2019
*/
boolean ButtonPressed = false;
boolean ButtonWasPressed = false;
int count = 0; //sets up loops
int short_wait = 200;
/* Create a sketch to make the lilymini blink an SOS then repeat.
* This version uses the "for" loop to shorten the code. The syntax for the "for" loop uses an initialization,
* condition and increment to manage how many times the loop is carried out. It also requires
* a brace "{" at the beginning and } at the end. The sketch below uses the blue on the RGB to
* denote when the larger loop completes.
*
*/
int A = 3;
int B = 4;
/*
* modified from sparkfun tutorial
* by Ringotron5000
* modified for LilyMini
* by K Margenau
* 16 Feb 2018
******************************************************************************/
// Create integer variables for the pins we'll be using
/*
Lilymini ProtoSnap Activity 2: Basic Color Mixing
SparkFun Electronics
https://www.sparkfun.com/products/14346
Modified 16 Feb 2018
by K Margenau
Create primary and secondary colors on the built-in RGB (Red/Green/Blue) LED
This code is released under the MIT License (http://opensource.org/licenses/MIT)
@MargenauMaker
MargenauMaker / light sensor rgb.txt
Last active February 17, 2018 10:04
Lilypad - light sensor with RGB
/*
LilyPad ProtoSnap Plus Activity 7: Sensing Light
SparkFun Electronics
modified by ringotron5000
Modified by K Margenau
for LilyMini
16 Feb 2018
darkness is low value, maybe 5
light is higher , maybe 190
/*
multi-line comments can go here in between
the symbols you see above and below
*/
int A = 3; // whenever A is used in the code it sends a signal through pin 3
int B = 4; // whenever B is used in the code it sends a signal through pin 4
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 13 as an output.