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. | |
const int ENCODER_PPR = 600; // 600 step spindle optical rotary encoder. Fractional values not supported. | |
const int ENCODER_BACKLASH = 3; // Numer of impulses encoder can issue without movement of the spindle | |
// Spindle rotary encoder pins. Swap values if the rotation direction is wrong. | |
#define ENC_A 7 |
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. | |
const int ENCODER_STEPS_INT = 600; // 600 step spindle optical rotary encoder. Fractional values not supported. | |
const int ENCODER_BACKLASH = 3; // Numer of impulses encoder can issue without movement of the spindle | |
// Spindle rotary encoder pins. Swap values if the rotation direction is wrong. | |
#define ENC_A 7 |
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
const int potPin = A0; | |
const int enaPin = 4; | |
const int dirPin = 5; | |
const int stepPin = 6; | |
const int fwdPin = 12; | |
const int revPin = 11; | |
const int maxSpeed = 700; // RPM | |
const int stepsPerRevolution = 200; | |
const int minPotValue = 20; // Minimum pot value to start the motor |
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); | |
} |
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
#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
// 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
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
#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
bool isOn = false; | |
void setup() { | |
pinMode(2, OUTPUT); | |
digitalWrite(2, isOn ? HIGH : LOW); | |
} | |
int th = 40; | |
void toggle() { |
NewerOlder