This Gist is there to help you creating a Sankey Diagram from your Google Spreadsheets.
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 matplotlib.pyplot as plt | |
signals = [ | |
("Output A/Input 1\n0x00/0x00", [9070, -4448, 620, -513, 613, -511, 615, -513, 614, -537, 590, -512, 614, -514, 613, -512, 615, -513, 613, -1633, 621, -1632, 620, -1633, 620, -1633, 620, -1633, 620, -1633, 620, -1632, 621, -1633, 620, -537, 590, -513, 614, -511, 615, -514, 612, -511, 616, -511, 616, -516, 611, -510, 616, -1633, 620, -1633, 620, -1633, 621, -1632, 620, -1633, 620, -1633, 620, -1632, 621, -1634, 619]), | |
("Output A/Input 2\n0x00/0x01", [9068, -4448, 620, -509, 618, -509, 617, -537, 589, -511, 616, -511, 615, -512, 613, -511, 616, -509, 618, -1633, 619, -1632, 621, -1632, 620, -1631, 622, -1632, 621, -1632, 620, -1633, 620, -1632, 620, -1632, 620, -510, 616, -514, 613, -510, 616, -511, 616, -510, 616, -537, 589, -515, 612, -511, 615, -1633, 619, -1633, 620, -1633, 619, -1634, 616, -1636, 617, -1635, 617, -1635, 618]), | |
("Output A/Input 3\n0x00/0x02", [9042, -4475, 593, -536, 590, -564, 563, -534, 591, -539, 584, -538, 590, -536, 591, -537, |
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
TIME="07:30" | |
NEW_VOLUME="36%" | |
WAKE_VOLUME="45%" | |
# Check if the time is still today or tomorrow | |
if [ $(($(date -d "$TIME" +%s)-$(date +%s))) -lt 0 ] | |
then | |
TOMORROW="TOMORROW" | |
fi |
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
// Install the LoRa library by Sandeep Mistry via the Arduino interface (https://github.com/sandeepmistry/arduino-LoRa) | |
#include <SPI.h> | |
#include <LoRa.h> | |
int counter = 0; | |
void setup() { | |
Serial.begin(115200); | |
while (!Serial); |
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/interrupt.h> | |
#include <avr/sleep.h> | |
#define LED PB0 | |
#define LED_POWER 100 // From 0 to 255 | |
volatile uint8_t flag = 0; | |
// See Table 9-3. Watchdog Timer Prescale Select in ATtiny9 datasheet for Watchdog Timeout values | |
ISR(WDT_vect) { |
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
uint8_t r; | |
void setup() { | |
pinMode(0, OUTPUT); | |
pinMode(1, OUTPUT); | |
pinMode(2, OUTPUT); | |
pinMode(3, OUTPUT); | |
pinMode(4, OUTPUT); | |
pinMode(5, OUTPUT); | |
pinMode(6, OUTPUT); |
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 <bitset> | |
#include <cstdint> | |
#include <iostream> | |
using namespace std; | |
struct __attribute__((packed)) Data { | |
uint32_t timestamp : 32; | |
uint32_t gpsLat : 24; | |
uint32_t gpsLong : 24; |
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 numpy as np | |
import matplotlib.pyplot as plt | |
left = list() | |
right = list() | |
# Read data from a file | |
# dataread = np.fromfile("test.wav", dtype='<i2') | |
# for i in range(22, 198): | |
# if i%2: |