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
//google login process variables | |
let signInButton, logoutButton, commentInput, saveCommentButton; | |
let userName = ""; | |
// Variables to manage button positions and sizes dynamically -- adapted from AJ's original buttons | |
let buttonX1, buttonX2, buttonX3, buttonY, buttonW, buttonH; | |
// Variables for dynamic layout in the favorite teams display -- adapted from Andy's original buttons |
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
let TutorialButton; | |
let PatternsButton; | |
let GalleryButton; | |
let img; | |
let tutorialLink; | |
function preload() { | |
img = loadImage('App_Idea.jpg'); | |
} |
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
var express = require ('express'); | |
const PORT = process.env.PORT || 3000; | |
var app = express(); | |
var server = app.listen(PORT, () => console.log(`Listening on ${PORT}`)); | |
app.use(express.static('public')); | |
console.log("my socket server is running"); |
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
import board | |
import pulseio | |
import time | |
pulses = pulseio.PulseIn(board.A0, maxlen=200, idle_state=True) | |
lightCounter = 0 | |
while True: |
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
import serial | |
uart = serial.Serial("/dev/serial0", baudrate=19200, timeout = 3000) | |
import firebase_admin | |
from firebase_admin import credentials | |
from firebase_admin import db | |
import adafruit_thermal_printer | |
ThermalPrinter = adafruit_thermal_printer.get_printer_class(2.69) |
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
import time | |
import analogio | |
import board | |
import neopixel | |
import math | |
dial_pin = board.A2 #pin 0 is Analog input 2 | |
dial = analogio.AnalogIn(dial_pin) |
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
import time | |
import board | |
import neopixel | |
pixel_pin = board.D2 | |
num_pixels = 16 | |
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.1, auto_write=False) | |
RED = (255, 0, 0) |
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
import time | |
import board | |
import neopixel | |
from digitalio import DigitalInOut, Direction, Pull | |
switch = DigitalInOut(board.D3) | |
switch.direction = Direction.INPUT | |
switch.pull = Pull.UP | |
pixel_pin = board.D2 |
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
import time | |
import board | |
import neopixel | |
from digitalio import DigitalInOut, Direction, Pull | |
switch = DigitalInOut(board.D3) | |
switch.direction = Direction.INPUT | |
switch.pull = Pull.UP | |
pixel_pin = board.D2 |
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
import time | |
import board | |
import neopixel | |
pixel_pin = board.D2 #the ring data is connected to this pin | |
num_pixels = 16 #number of leds pixels on the ring | |
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.3, auto_write=False) | |