GUIslice
AccelStepper
GUIslice | AccelStepper | |
---|---|---|
7 | 18 | |
1,092 | 139 | |
- | - | |
5.0 | 0.0 | |
about 1 month ago | 4 months ago | |
C | C++ | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
GUIslice
- Display and Touch Driver not supported by GUIslice
-
Visual editor for a TFT Touchscreen with Arduino Mega
Here's one I used for a project: https://github.com/ImpulseAdventure/GUIslice
-
Looking For Help Adapting a Library to SAMD21 - "iAccelstepper"
I am working on a project that uses an adafruit metro m0 express development board (using the ATSAMD21G18 ARM Cortex M0 processor) to drive a stepper motor. I have elected to use the Accelstepper library as it is well documented and makes controlling the stepper simple. The project also is driving a touchscreen display with the GUIslice library. Now - the Accelstepper library uses the main polling loop() function to repeatedly call the .run() method from the library to produce pulses to the stepper driver and move the motor. I have noted that when having the GUIslice function for polling the display in the same loop() function, it can hang the stepper motion for a split second as the processor is taking time to perform those functions (rightfully so).
-
Help me, Reddit…
which, for Arduino boards, can be found here.
-
Co-ordinates when programming a screen - trial and error?
guislice. I use it a lot for openhasp/home assistant touchscreens
AccelStepper
-
most simple way to fix stepper motor jitter!
Steppers need acceleration if you want 'em to go fast
-
Trying to get a bldc motor and stepper motor to work on an rc project
#include //library for PPM receiver input https://github.com/dimag0g/PPM-reader #include //library for stepper motor https://github.com/waspinator/AccelStepper const int interruptPin = 23; //ppm pin const int channelAmount = 8; //amount of channels const int motorPwmPin = 12; //motor pwm pin const int motorDirPin = 13; //motor direction pin const int stepDirPin = 34; //stepper motor driver direction pin const int stepPin = 35; //stepper motor driver step pulse pin const int sleepPin = 32; //stepper motor driver sleep pin const int resetPin = 33; //stepper motor driver reset pin const int m2Pin = 25; //stepper motor driver microstep pin const int m1Pin = 26; //stepper motor driver microstep pin const int m0Pin = 27; //stepper motor driver microstep pin const int enablePin = 14; //stepper motor driver enable pin const int navPin = 21; //navigation lights const int strobePin = 19; //strobe light const int intLightsPin = 18; //interior lights const int hornPin = 5; //horn const int batteryPin = 39; //battery voltage (voltage divider, 4S input) const int motorPwmChannel = 0; //pwm channel for motor speed const int lightsPwmChannel = 1; //pwm channel for interior light const int hornPwmChannel = 2; //pwm channel for horn sound unsigned long timer = 0; //timer for reading input and setting outputs unsigned long hornTimer = 0; //timer for horn sounds int hornCheck = 0; //horn sound state (high freq / low freq / off) const int voltageMeasurements = 100; //number of voltage measurements int voltage[voltageMeasurements]; //measurement array int voltageCounter = 0; //array index long voltageTotal = 0L; //total sum of measurements float batteryVoltage = 0.0; unsigned long voltageTimer = 0; //timer for starting a new measurement AccelStepper stepper(1, stepPin, stepDirPin); //stepper motor object PPMReader ppm(interruptPin, channelAmount); //ppm object int PWM[channelAmount]; //ppm values array void setup() { pinMode(sleepPin, OUTPUT); //set sleep/reset/enable pins digitalWrite(sleepPin, HIGH); pinMode(resetPin, OUTPUT); digitalWrite(resetPin, HIGH); pinMode(enablePin, OUTPUT); digitalWrite(enablePin, LOW); pinMode(m0Pin, OUTPUT); //set 1/32 microstepping digitalWrite(m0Pin, HIGH); pinMode(m1Pin, OUTPUT); digitalWrite(m1Pin, HIGH); pinMode(m2Pin, OUTPUT); digitalWrite(m2Pin, HIGH); pinMode(navPin, OUTPUT); //set bjt output pins pinMode(strobePin, OUTPUT); pinMode(intLightsPin, OUTPUT); pinMode(hornPin, OUTPUT); stepper.setMaxSpeed(1500); //set stepper motor speed/acc/pos stepper.setAcceleration(1000); stepper.setCurrentPosition(0); ledcSetup(motorPwmChannel, 500, 8); //motor pwm setup ledcAttachPin(motorPwmPin, motorPwmChannel); ledcSetup(lightsPwmChannel, 500, 8); //headlights pwm setup ledcAttachPin(intLightsPin, lightsPwmChannel); ledcSetup(hornPwmChannel, 2500, 8); //horn pwm setup ledcAttachPin(hornPin, hornPwmChannel); Serial.begin(115200); //Arduino <-> PC baudrate } void loop() { stepper.run(); //run stepper motor if necessary if(millis() - timer >= 20){ //obtain new control values if available timer = millis(); for (byte channel = 1; channel <= channelAmount; ++channel) { //loop over channels PWM[channel-1] = ppm.latestValidChannelValue(channel, 0); //obtain channels } PWM[0] = map(PWM[0], 1080, 1920, -100, 100)*16; //map ppm value to stepper motor angle PWM[0] = constrain(PWM[0], -1600, 1600); //constrain stepper motor angle PWM[1] = map(PWM[1], 1080, 1920, -100, 100); //map gearbox to 8 bit value PWM[1] = constrain(PWM[1], -100, 100); //constrain gearbox value PWM[2] = map(PWM[2], 1080, 1920, 0, 255); //map motor speed to 8 bit value PWM[2] = constrain(PWM[2], 0, 255); //constrain motor speed value PWM[3] = map(PWM[2], 1080, 1920, -100, 100); //map horn value PWM[3] = constrain(PWM[2], -100, 100); //constrain horn value PWM[4] = map(PWM[4], 1080, 1920, 0, 255); //map potmeter values to 8 bit value for lights PWM[4] = constrain(PWM[4], 0, 100); //constrain values PWM[5] = map(PWM[5], 1080, 1920, 0, 100); //map potmeter values PWM[5] = constrain(PWM[5], 0, 100); //constrain switch value PWM[6] = map(PWM[6], 1080, 1920, 0, 100); //map potmeter values PWM[6] = constrain(PWM[6], 0, 100); //constrain values PWM[7] = map(PWM[7], 1080, 1920, 0, 10); //map gear switch to boolean value PWM[7] = constrain(PWM[7], 0, 1); //constrain values if(PWM[1] > 50) digitalWrite(motorDirPin, HIGH); //forwards state if(PWM[1] < -50) digitalWrite(motorDirPin, LOW); //backwards state ledcWrite(motorPwmChannel, PWM[2]); //generate motor pwm value stepper.moveTo(PWM[0]); //set new rudder angle if(PWM[4] > 5) ledcWrite(lightsPwmChannel, PWM[4]); //write value for interior lights else digitalWrite(intLightsPin, LOW); //turn off lights if(PWM[3] < -50){ //sound horn if activated if(hornCheck == 0){ //when off, set high freq ledcWriteTone(hornPwmChannel, 3000); //sound the horn at high freq hornTimer = millis(); //start counting hornCheck = 1; //set status to 1 (high freq) } if(hornCheck == 1 && (millis() - hornTimer) > 100){ //when high freq, set low freq after 100ms ledcWriteTone(hornPwmChannel, 2500); //sound the horn at low freq hornTimer = millis(); //reset timer hornCheck = 2; //set status to 2 (low freq) } if(hornCheck == 2 && (millis() - hornTimer) > 100){ //when low freq, set high freq after 100ms ledcWriteTone(hornPwmChannel, 3000); //sound the horn at high freq hornTimer = millis(); //reset timer hornCheck = 1; //set status to 1 (high freq) } } else{ ledcWrite(hornPwmChannel, 0); //stop horn sound hornCheck = 0; //set status to 0 (off) } } }
-
Controlling a stepper motor with integrated encoder using C++ on Windows
Something like the Tic T825 you looked at might be fine. An Arudino-compatible microcontroller with the AccelStepper library would be similar but give you more flexibility in choosing any driver that takes step/direction signals.
-
Looking For Help Adapting a Library to SAMD21 - "iAccelstepper"
I am working on a project that uses an adafruit metro m0 express development board (using the ATSAMD21G18 ARM Cortex M0 processor) to drive a stepper motor. I have elected to use the Accelstepper library as it is well documented and makes controlling the stepper simple. The project also is driving a touchscreen display with the GUIslice library. Now - the Accelstepper library uses the main polling loop() function to repeatedly call the .run() method from the library to produce pulses to the stepper driver and move the motor. I have noted that when having the GUIslice function for polling the display in the same loop() function, it can hang the stepper motion for a split second as the processor is taking time to perform those functions (rightfully so).
-
How would one run two motors simultaneously at different speeds?
For stepper motors instead that is equally possible by just calling setSpeed(speed) with a different speed value on each motor (assuming the use of the AccelStepper library).
-
working async lib for drv8255/a4988
Tested: https://www.airspayce.com/mikem/arduino/AccelStepper/ - not working for me Tested: https://github.com/laurb9/StepperDriver/blob/master/src/BasicStepperDriver.h - not working correctly
-
I have some a4988 stepper driver and esp 32 but no driver .How can i code for a diy cnc with these? What will be the instructions?
Hi there. Not sure of what your goal is. I assume you have basic knowledge of electronics. The first step is learning how to step a motor. The https://github.com/waspinator/AccelStepper library can help.
-
Simultaneously running stepper motors
Others have mentioned the AccelStepper library and I wanted to second this and also give you some example code you can get started with. The following Arduino sketch will spin 2 steppers motors simultaneousy and will hopefully get you started towards what you want to make!
-
Task Scheduler?
I'm making a Rube Goldberg machine assisted by an Arduino. There's lots of different motors and timed events, so I want to streamline things using a library like . Thing is, I have processes that have to run the whole time, like a rotary encoder reader ( library used), a PID controller ( library used), and a stepper motor ( library used).
-
Help. Stepper Motor not spinning when I increase the speed
AccelStepper may interest you, and I think Teacup can go even faster.
What are some alternatives?
GUIslice-Builder - Cross-platform drag & drop GUI builder for GUIslice
grbl - An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
lvgl - Embedded graphics library to create beautiful UIs for any MCU, MPU and display type.
FluidNC - The next generation of motion control firmware
esp32-smartdisplay - PlatformIO library LVGL Drivers for Sunton Smart display boards (CYD Cheap Yellow Display). This library supports these boards without any effort. ESP32-2432S024N/R/C, ESP32-2432S028R/C, ESP32-3248S035R/C, ESP32_8048S070N/C
TMCStepper
psp-controller - Remotely control Wi-Fi based microcontrollers with the PSP.
StepperDriver - Arduino library for A4988, DRV8825, DRV8834, DRV8880 and generic two-pin (DIR/STEP) stepper motor drivers
TeensyCNC - Simple CNC setup for hacking my Wife's Cricut Mini
Teacup_Firmware - Firmware for RepRap and other 3D printers
iAccelStepper - interrupt driven stepper controller inherited from AccelStepper