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
| #!/usr/bin/env python3 | |
| import minimalmodbus | |
| import serial | |
| powerMeter = minimalmodbus.Instrument('/dev/ttyUSB0', 1) | |
| powerMeter.serial.baudrate = 9600 | |
| powerMeter.serial.bytesize = 8 | |
| powerMeter.serial.parity = serial.PARITY_NONE | |
| powerMeter.serial.stopbits = 1 | |
| powerMeter.mode = minimalmodbus.MODE_RTU |
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 osascript | |
| scpt = ''' | |
| set vol to ((output volume of (get volume settings)) + 5) | |
| if (vol > 100) then set vol to 100 | |
| set volume output volume (vol) | |
| display notification ((vol) as string) | |
| ''' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 re | |
| import urllib.request | |
| import markovify | |
| from time import sleep | |
| def scrape(): | |
| originalLyrics = open('lyrics.txt', 'w') | |
| url = "https://www.azlyrics.com/l/linkinpark.html" | |
| artistHtml = urllib.request.urlopen(url) |
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
| So I'm bright in the middle of it, middle of it Man, who are you? | |
| I don't win, if I'm wrong, then I'm halfway right I know I'm not the one that you don't know what to do When all I know what to do was slow down But I was the only one And there's nothing more fucked up I could stand up and take Fuck it Are you listening? | |
| So, one last lie I can tell Should've played it safer from the top to the bottom! | |
| You know she had to find out for y'all in the design Of the line. | |
| And it can't be outrun. |
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 apsync.*; //for syncing data with arduino; SerialEvent fails in processing hence this library helps!! | |
| import processing.serial.*; | |
| import processing.sound.*; | |
| Serial myPort; // Create object from Serial class | |
| AP_Sync streamer; | |
| public int distance; | |
| PImage backdrop, eggo; |
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
| #include <AP_Sync.h> //for syncing data to processing; SerialEvent fails in processing hence this library helps!! | |
| AP_Sync streamer(Serial); | |
| const int pingPin = 9; // Trigger Pin of Ultrasonic Sensor | |
| const int echoPin = 11; // Echo Pin of Ultrasonic Sensor | |
| void setup() { | |
| Serial.begin(9600); // Starting Serial Terminal | |
| } |
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
| #include <SoftPWM.h> | |
| #include <FastLED.h> | |
| #include <CapacitiveSensor.h> | |
| const int led1[] = {3, 4, 5}; | |
| const int led2[] = {6, 7, 8}; | |
| const int led3[] = {9, 10, 11}; | |
| static uint8_t hue; | |
| CapacitiveSensor cs_4_2 = CapacitiveSensor(12, 2); |
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
| #include <Wire.h> | |
| #include <LiquidCrystal_I2C.h> | |
| #define PIN1 8 | |
| #define PIN2 7 | |
| #define ANALOG_PIN A0 | |
| #define SWITCH 2 | |
| #define LED 13 | |
| LiquidCrystal_I2C lcd(0x27, 16, 2); |
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
| #include <Servo.h> | |
| int potPin = 0; | |
| int servoPin = 9; | |
| Servo servo; | |
| void setup() | |
| { | |
| servo.attach(servoPin); | |
| } |
NewerOlder