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 <Servo.h> | |
Servo myservo; | |
const int servoPin = 9; | |
const int ledPin = 13; | |
void setup() { | |
myservo.attach(servoPin); | |
pinMode(ledPin, 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
import SwiftUI | |
struct ContentView : View { | |
var body: some View { | |
PKCanvasRepresentation() | |
} | |
} | |
#if DEBUG | |
struct ContentView_Previews : PreviewProvider { |
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 <Servo.h> | |
#include <LowPower.h> | |
#include <EventManager.h> | |
#include <ThreeWire.h> | |
#include <RtcDS1302.h> | |
#define EI_NOTINT0 | |
#define EI_NOTINT1 | |
#define EI_ARDUINO_INTERRUPTED_PIN | |
#include <EnableInterrupt.h> |
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 <Servo.h> | |
#define second 1000 | |
#define minute 60000 | |
#define hour 3600000 | |
Servo servo; | |
const int servoPin = 9; | |
const int buttonDispensePin = 7; | |
const int buttonMinusPin = 6; | |
const int buttonPlusPin = 8; |
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
2019-03-04 09:32:41,686 - octoprint.server.heartbeat - INFO - Server heartbeat <3 | |
2019-03-04 09:32:41,700 - octoprint.server - INFO - --- Log roll over detected --------------------------------------------------- | |
2019-03-04 09:32:41,701 - octoprint.server - INFO - OctoPrint 1.3.10 | |
2019-03-04 09:32:41,706 - octoprint.plugin.core - INFO - 21 plugin(s) registered with the system: | |
| Action Command Prompt Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt | |
| Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements | |
| Anonymous Usage Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking | |
| Application Keys Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/appkeys | |
| Backup & Restore (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup | |
| Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/pl |
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
void setup() { | |
pinMode(A0, INPUT); | |
digitalWrite(A0, HIGH); | |
pinMode(A2, OUTPUT); | |
digitalWrite(A2, LOW); | |
} | |
void loop() { | |
delay(50); | |
int waterLevel = digitalRead(A0); // Read sensor |
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 | |
pid_file="/var/run/stream.pid" | |
case "$1" in | |
restart) | |
/etc/init.d/stream stop | |
/etc/init.d/stream start | |
;; | |
start) | |
rm $pid_file |
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 <NewPing.h> | |
#define TRIGGER_PIN 5 // Arduino pin tied to trigger pin on the ultrasonic sensor. | |
#define ECHO_PIN 4 // Arduino pin tied to echo pin on the ultrasonic sensor. | |
#define MAX_DISTANCE 400 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. | |
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. | |
int usual_dist; | |
float acc_dist; |
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 <Servo.h> | |
Servo myservo; | |
const int servoPin = 9; | |
const int buttonPin = 12; | |
const int ledPin = 13; | |
void setup() { | |
myservo.attach(servoPin); |
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
generateNLTexture() { | |
this.mainBMD = new Phaser.BitmapData(this.game, this.game.rnd.uuid().toString(), this.thickness, this.length); | |
this.mainBMD.context.fillStyle = this.buildGradient(this.mainBMD.context); | |
this.mainBMD.context.fillRect(0, 0, this.thickness, this.length); | |
this.maskBMD = new Phaser.BitmapData(this.game, this.game.rnd.uuid().toString(), this.thickness, this.length); | |
this.maskBMD.context.fillStyle = this.buildMask(this.maskBMD.context); | |
this.maskBMD.context.fillRect(0, 0, this.thickness, this.length); | |
this.texBMD = new Phaser.BitmapData(this.game, this.game.rnd.uuid().toString(), this.thickness, this.length); |
NewerOlder