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 <virtuabotixRTC.h> | |
#include <SevSeg.h> | |
SevSeg sevseg; | |
// Clock DS1302 on analog pins 0 to 2 | |
virtuabotixRTC myRTC(14, 15, 16); | |
void setup() { |
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 <DHT.h> | |
#include <SevSeg.h> | |
// DHT data wire connected on A0 | |
#define DHTPIN 14 | |
#define DHTTYPE DHT11 | |
SevSeg sevseg; | |
DHT dht(DHTPIN, DHTTYPE); |
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
// Pin pinA - CLK pin, | |
// Pin pinB - DT pin | |
// rotate(int i) - callback receiving -1 or 1 | |
inputA = gpio.provisionDigitalInputPin(pinA, "PinA", PinPullResistance.PULL_UP); | |
inputB = gpio.provisionDigitalInputPin(pinB, "PinB", PinPullResistance.PULL_UP); | |
inputA.addListener(new GpioPinListenerDigital() { | |
int lastA; | |
@Override |
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
bool isOn = false; | |
void setup() { | |
pinMode(2, OUTPUT); | |
digitalWrite(2, isOn ? HIGH : LOW); | |
} | |
int th = 40; | |
void toggle() { |
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> | |
void setup() { | |
pinMode(4, OUTPUT); | |
} | |
void water(int ms) { | |
digitalWrite(4, HIGH); | |
delay(ms); |
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
package com.slowvideoc; | |
import com.arthenica.mobileffmpeg.Config; | |
import com.arthenica.mobileffmpeg.FFmpeg; | |
import android.Manifest; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.database.Cursor; | |
import android.net.Uri; |
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
// https://github.com/kachurovskiy/nanoels | |
/* Change values in this section to suit your hardware. */ | |
// Define your hardware parameters here. Don't remove the ".0" at the end. | |
#define ENCODER_STEPS 600.0 // 600 step spindle optical rotary encoder | |
#define MOTOR_STEPS 200.0 // 200 step stepper motor, no microstepping | |
#define LEAD_SCREW_HMM 200.0 // 2mm lead screw | |
#define MOTOR_X_STEPS 200.0 // 200 step stepper motor, no microstepping |
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
#define STEP 12 | |
void setup() { | |
// 200 step per revolution motor driver on this pin. | |
pinMode(STEP, OUTPUT); | |
} | |
void topSpeed_1Turn() { | |
for (int i = 0; i < 200; i++) { | |
// Issue 1 step. |
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
#define STEP 12 | |
#define ENA 13 | |
// How fast we want to accelerate the stepper. Reasonable values 5 - 200. | |
#define ACCELERATION 5 | |
// Time between the STEP pulses when starting slow. 400 pulses per second. | |
#define DELAY_US_MAX 2500 | |
// Time between the STEP pulses at highest speed. 25*400 pulses per second. | |
#define DELAY_US_MIN 100 | |
// Maximum size of the acceleration table. Arduino has little memory. |
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 <SPI.h> | |
#include <Wire.h> | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(21, 48, 47, 38, 39, 40, 41, 42, 2, 1); | |
void setup() { | |
lcd.begin(20, 4); | |
lcd.setCursor(0, 3); | |
} |
OlderNewer