Skip to content
mrcory edited this page Aug 4, 2019 · 8 revisions

Blynk Settings

Set the blynk connections settings in "blynk.h" to connect to your server.

The current version of my Blynk app is available here.

Stepper Setup

You will need to configure mtrPin1 through 4 with the pins that connect to your driver board.

Fill in shade[5] with the step positions that you want your shade to stop at. 0 is the top and 3 is the bottom.

Finding Step Positions

Using the serial monitor you can use the command move <val>. Fill in <val> with a number. This will be an absolute position in steps for the stepper motor.

Example: int shade[5] = {0,20500,41000,61500,0};(The last int is for a scaled position that is set from a slider in the Blynk app. It is figured automatically.

Button Values

Analog buttons allows multiple buttons on a single pin. To do this, you use different value resistors to alter what analogRead() returns. You must get the value of each button by testing it with a sketch. You can use the below sketch to get the values. Hold the button for a bit to let the value stabilize.

//analog button test sketch

void setup() {
//The pin that is connected to your buttons
#define analogPin A0

Serial.begin(115200);
}

void loop() {
//Just to slow the serial monitor a bit
delay(250);

//Read and return the current read value
Serial.println(analogRead(A0));
}

You can then fill the values in config.h

Clone this wiki locally