This file contains hidden or 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 | |
# | |
# Change this to specify a different handbrake preset. You can list them by running: "HandBrakeCLI --preset-list" | |
# | |
#set -ux | |
set +e | |
PRESET="Amazon Fire 720p30" # tweaked to work on my folks old LG smart tv. | |
if [ -z "$1" ] ; then | |
TRANSCODEDIR="." | |
else |
This file contains hidden or 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
from influxdb import InfluxDBClient | |
import serial | |
import uuid | |
import random | |
import time | |
import datetime | |
import s2cell | |
dbframe = 0 |
This file contains hidden or 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 | |
sudo dd bs=4M if=cosmicpi17dist.img of=/dev/sda status=progress | |
sudo dd bs=4M if=cosmicpi17dist.img of=/dev/sdb status=progress | |
sudo dd bs=4M if=cosmicpi17dist.img of=/dev/sdc status=progress | |
sudo dd bs=4M if=cosmicpi17dist.img of=/dev/sdd status=progress | |
sudo dd bs=4M if=cosmicpi17dist.img of=/dev/sde status=progress | |
sudo sync |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# Original code found at: | |
# https://gist.github.com/DenisFromHR/cc863375a6e19dce359d | |
""" | |
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic | |
Made available under GNU GENERAL PUBLIC LICENSE | |
# Modified Python I2C library for Raspberry Pi | |
# as found on http://www.recantha.co.uk/blog/?p=4849 |
This file contains hidden or 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 | |
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/e33e00c6780ad0215d3932b810a10e46/raw | sh | |
echo "In case of any issues please consult cosmicpi.org for help, or contact us via Facebook " | |
echo "--- Expand the file system ---" | |
sudo resize2fs /dev/mmcblk0p2 | |
echo "--- Update OS ---" | |
sudo apt -y update |
This file contains hidden or 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
/* | |
GPS test routine, based on serial passthrough from the Arduino standard examples | |
which was originally written by by Erik Nyquist, kudos! | |
it wasn't working using 'serial' so I changed it to a non-reserved name and BINGO. :) | |
*/ | |
HardwareSerial GPS(PA10,PB6); | |
void setup() { | |
Serial.begin(9600); | |
GPS.begin(9600); |
This file contains hidden or 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
/* | |
Cosmic Pi V1.6 Calibration script | |
Run this to set the EEPROM values in your Cosmic Pi, before flashing the operational software | |
Notes to user: If you set the thresholds/HV wrong and it goes crazy with interrupts, just re-flash and the values will | |
be reset before the interrupt is attached. Problem solved. | |
We write the values in the EEPROM at two places, one will be used for user manipulation, the other will remain there | |
for a 'hard reset' | |
This won't work unless you've got the Cosmic Pi board type and STM32 core for Arduino installed. |
This file contains hidden or 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
//drive the dac channels | |
//set values into eeprom | |
#include <EEPROM.h> | |
//ref point for HV is 0xAD | |
//eeprom writing table | |
/* | |
*EEPROM Status - byte 00 | |
*channel 0 high byte - 01 |
This file contains hidden or 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
//drive the dac channels | |
/* | |
Crude code to get the Cosmic Pi up and running, spits out events (coincidence on both channels, after setting the HV to about 28V | |
and the DAC to 22F (whatever that is). | |
Makes the light blink (it's not very bright) and prints the event number. | |
Rate on the test unit seems reasonable, we'll test this against a proper setup over the next few weeks | |
To be re-written using interrupts for production code. | |
*/ |
This file contains hidden or 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 socket | |
import fcntl | |
import struct | |
import psutil | |
import os | |
import sys | |
import time | |
home_dir = os.path.expanduser("~") | |
sys.path.append(home_dir) | |
import I2C_LCD_Driver |