vid28's People
Forkers
abhigkar viamonkey davidlulu scaredycat timostr nerdiyde fabrimt jimmeye bruce17 russellsproutsvid28's Issues
How to connect a VID28 with 4 Pins?
Hi,
beginner here. I have a VID28-05 / BKA30D-R5 motor and I am using an ESP32.
The motor has 4 connectors, your code only offers 3 pins, am I still able to use the motor with you lib?
If so, can you give me a quick hint how to do so?
Best
s256
Standalone example?
Could you provide an example of how to use this standalone?
I would like to try it with an x27 stepper motor. I will let you know if it's compatible.
setTime en seconds() is 4 times slower
Hi,
I am controlling 2 motors, and using your repo as arduino framework.
It looks like it works, but when using the functions setTime ( ) and call the current time with seconds(), the seconds() only updates every 4 seconds, or the time is running 4 times slower then my stopwatch.
this is my setup code:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
setPrescaler(0, 1);
setPrescaler(1, 1);
setPrescaler(2, 1);
setTime(1, 0, 0, 1, 1, 1);
}
and this is my loop code
void loop(void)
{
// the motor only moves when you call update()
motor.update();
if(second() != currentS){
//move to next second
currentS = second();
motor.setPosition(currentS * 72);
}
}
when I disable the line setPrescaler(0, 1);
it runs perfectly, but activating it, suddenly slows down the clock by a factor 4
No TCCR2B on Arduino Leonardo, Atmega32u4
/Users/hugo/Documents/Arduino/libraries/MotorVID28/src/util/util.c: In function 'setPrescaler':
/Users/hugo/Documents/Arduino/libraries/MotorVID28/src/util/util.c:40:5: error: 'TCCR2B' undeclared (first use in this function); did you mean 'TCCR0B'?
TCCR2B = TCCR2B & 0b11111000 | mode;
According to datasheet, Timer/Counter2 not available (https://ww1.microchip.com/downloads/en/devicedoc/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf page 95)
Pin connection?
The README says:
N.B. The motors do have four pins, but from the datasheet it can be seen that pin 2 and 3 are simultaneously high and low during the complete step cycle. Therefore i did connet pin 3 and 4 of the motor to the same I/O pin on the Arduino.
Shouldn't it be connecting pin 2 and 3 to the same I/O pin?
The VID28 datasheet has labelled pins 1, 2, 3, 4. What should the corresponding pins be mapped in the MotorVID28 constructor? Also why is pin1 not unsigned?
Connect the pins
Hi,
I am really sorry, but I don't understand how to connect the pins only using 3 cables. I understand that the pins 2 and 3 of the motor should be controlled by the same pin on the Arduino, but not in which order.
Imagine this is my constructor (as in the example):
MotorVID28 motor(360*3*4, true, 9, 11, 10);
Does that mean:
Arduino pin 9 -> motor pin 1
Arduino pin 10 -> motor pin 2 and motor pin 3
Arduino pin 11 -> motor pin 4
Or is there another configuration?
if you can point me to the place in your code how I could have known this, that would help me in learning.
ESP8266 / ESP32: util/atomic.h: No such file or directory
Hello!
I would like to use your library with an ESP8266 and/or ESP32.
While compiling for ESP32 I get the following Error:
Arduino: 1.8.13 Hourly Build 2020/06/12 06:33 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
D:\Eigene Dateien\Dokumente\Arduino\libraries\MotorVID28\src\util\util .c:2:25: fatal error: util/atomic.h: No such file or directory
compilation terminated.
exit status 1
Arduino: 1.8.13 Hourly Build 2020/06/12 06:33 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
ESP8266:
D:\Eigene Dateien\Dokumente\Arduino\libraries\MotorVID28\src\util\util .c:2:10: fatal error: util/atomic.h: No such file or directory
2 | #include <util/atomic.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Thank you!
One pointer is more noisy than the other pointer - timer0 issue?
Hi,
very inventive libriary to run VID28 steppers directly from atmege386p.
Is setting prescaler for timer0 to 1 really needed to get smooth movements?
Two questions:
- One pointer is more noisy than the other pointer. Is this related to run timer0 in fast-pwm-mode and not in phase-correct-pwm-mode like timer1 and timer2?
- I noticed in my code no difference, if I patch wiring.c with your code. Is it actually needed, if I don't use anything like delay(), millis()? This is somehow strange, because you are using micros() in your code.
- Is it possible to leave the arduino framework as it is and still use prescaler 1 for timer0, if a correction factor to micros is applied (i.e. millis() / 64)?
Thanks,
Timo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.