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 "FastLED.h" | |
const uint8_t BRIGHTNESS = 255; | |
// matrix size | |
const uint8_t WIDTH = 16; | |
const uint8_t HEIGHT = 16; | |
const uint16_t NUM_ | |
= WIDTH * HEIGHT; | |
// parameters and buffer for the noise 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
#!/usr/bin/python | |
import RPi.GPIO as GPIO | |
import os | |
import signal | |
import time | |
# Basic configuration | |
c_FAN = 26 # gpio pin the fan is connected to | |
c_FAN_TACHO = 19 # gpio pin the fan tachometer is connected to | |
c_MIN_TEMPERATURE = 45 # temperature in degrees c when fan should turn on |
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 <avr/sleep.h> | |
#include <avr/wdt.h> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
// Function Prototype for wdt_init (place it in init3 section, before main executes to prevent perma-resetting) | |
void wdt_init(void) __attribute__((naked)) __attribute__((section(".init3"))); | |
void wdt_init(void) | |
{ |
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
#!/bin/bash | |
c_FAN=26 # gpio pin the fan is connected to | |
c_MIN_TEMPERATURE=45 # temperature in degrees c when fan should turn on | |
c_TEMPERATURE_OFFSET=2 # temperarute offset in degrees c when fan should turn off | |
c_HARDDRIVE="sda" # name of your harddrive | |
temperature_offset=$(( $c_MIN_TEMPERATURE - $c_TEMPERATURE_OFFSET )) | |
fan_state=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
#!/bin/bash | |
RED='\033[0;31m' | |
GREEN='\033[1;32m' | |
BLUE='\033[1;34m' | |
NC='\033[0m' # No Color | |
echo -e "${BLUE}System update${NC}" | |
sudo apt-get update #2>&1 >/dev/null | |
echo -e "${BLUE}System upgrade${NC}" | |
sudo apt-get upgrade -y #2>&1 >/dev/null |