- https://thepihut.com/blogs/raspberry-pi-tutorials/how-do-i-power-my-arduino (MOVE TO CIRCUITS FILE)
- install arduino extension
- to access library manager - f1, then type library manager
- to install custom libraries - install through arduino ide
- setup for arduino type and serial port is on the bottom right of the window - click the plug to change the port
- you can only have one file in a folder at a time to be able to send and run it
- setSegments(segments[ ], length, position)
- showNumberDecEx(number, dots, leading_zeros, length, position)
- setBrightness(brightness, true/false)
// turn the motor 5 times
for (int i = 0; i < 5 * stepsPerRevolution; i++) {
// These four lines result in 1 step:
digitalWrite(stepPin, HIGH);
delayMicroseconds(500);
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
}
- Make sure to always connect sleep to reset pin
- Current Limit = Vref ÷ (8 × Rcs), set this on the pot on the stepper motor driver
- The Rcs is the current sense resistance. Drivers sold after Jan 2017 have 0.068 Ω current sense resistors.
- So this means that for a current limit of 1.5A for a board with 0.068 Ω current sense resistors, the Vref should be 0.816 mV.