-
Hello, I've been using firmata for a while using my own prototype circuit using a arduino nano + A4988 stepper motor driver and have recently decided to move away from "own circuits" to transition to arduino & motor shields to avoid debugging my poor circuit design and have something more reliable, as well as to transition to telemetrix which I like more (documentation, features, good support from author) the stack is as follows : if my research is correct, Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 1 reply
-
Oh I think I just know why it doesn't work... the shield is normally driven by specific code from its driver library... |
Beta Was this translation helpful? Give feedback.
-
Hi, The original intent for this library was to include an AccelStepper implementation. However, AccelStepper is not currently compatible with the Uno R4. I reported this to the AccelStepper author, but the problem still needs to be corrected. If you are using the Nano, then telemetrix and Telemetrix4Arduino should work. The telemetrix library has the accelstepper interface included. However, I only tested using a TB6600 driver and not the A4988. For the motor drivers, I don't believe either use I2C when controlling stepper motors. For the Adafruit board, I believe I2C is for controlling servo motors and not steppers. Therefore, SDA and SCL are not used for control. If you still need help, please let me know if you are using a UNO R4 or the Nano and if you are using it in conjunction with the A4988 or Adafruit driver. Thanks, |
Beta Was this translation helpful? Give feedback.
-
I just saw your second comment. For the Adafruit board, the documentation states that it should work with the AccelStepper library. I am unsure if that means that you may not need to use their Arduino library at all. My implementation of AccelStepper may support both the Adafruit board and the A4988. Again, for the UNO R4, stepper motors are not supported at this time. Here is a telemetrix stepper example. |
Beta Was this translation helpful? Give feedback.
-
Hello Alan, Thanks very much for your first replies, I'll have a look in more detail soon. I thought I'd clarify a bit my path. I can already confirm that telemetrix was indeed working on my "own" build which was an arduino nano + A4988, at least intermittently. It's the fact it wasnt' working consistently that got me looking at ready made circuits to isolate my poor craftman skills from the debugging process.
Regarding "For the Adafruit board, I believe I2C is for controlling servo motors and not steppers. Therefore, SDA and SCL are not used for control.", note in the page of the featherwing the following passage "Since the FeatherWing only uses the I2C (SDA & SCL pins), it works with any and all Feathers. ". Also, on their older page for their V1 library (deprecated), they mention " V2 of the shield uses i2c only and works with anything that has I2C support (e.g. all arduinos) without endless incompatibilities and porting requirements". https://adafruit.github.io/Adafruit_Motor_Shield_V2_Library/html/index.html My first goal now, is to have a nice simple way to have the stepper motor work using telemetrix with these shields. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the clarification. To reiterate, the UNO R4 currently does not support the AccelStepper library. For the Nano, you may be able to use the Adafruit Motor Shield v2 without any changes to telemetrix or Telemetrix4Arduino. However, you will need to figure out the direction and pulse pin the board uses for each motor. I looked at the Adafruit code, and it is very poorly commented, so you could contact Adafruit and ask them what PINs they are using. For the LCD display, I do not understand how that board connects to the motor shield and the software that drives it. To use that board with telemetrix, assuming it uses an i2c interface, you would need to port the Adafruit i2c code to telemetrix Python. I do have support for simpler i2c LCD display. You may find the code here. |
Beta Was this translation helpful? Give feedback.
-
I quickly looked at the Adafruit feather ESP32-S2 Reverse TFT and could not find its Arduino source code. The control for this board is accomplished with CircuitPython. Using this board with telemetrix may be extremely difficult, if not impossible. If I can help in any way, please let me know. |
Beta Was this translation helpful? Give feedback.
-
Thanks.!
I still have that nano and an R3
I gave a quick try with the R3, I did try reading through
https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library/blob/master/Adafruit_MotorShield.cpp#L178
and tried to map to DIR & STEP as "bypass" hoping Telemetrix4arduino would
then behave natively and carry over these to AccelStepper but no luck.
Frankly, by now it's just pure random trials. Adafruit wrote code to handle
that TB6612 in its lib and doesn't seem to be using AccelStepper at all so
just sending data over "some" pin is probably not going to cut it I'm
afraid :'(. Besides, I don't even know if the shield's pins are accessed
like this.
About the ESP32 S2 reverse, I thought it was either running micropython or
arduino. It's just a matter of bootloader. I tried both and use it
currently plainly in the arduino IDE.
So I initially intended to use the sexy ESP32 S2 with tft display with a
telemetrix I'd overload with LCD but was willing to start "simple" with a
plain UNO R4. Now neither R4 or this ESP32 board are fully compatible with
either telemetrix or accelstepper... hmmm
So... my options...
a- either I go deeper in the
https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library/blob/master/Adafruit_MotorShield.cpp
understanding and port some of it to work for R4, then going LCD later with
R4
b- back to nano & A4988 , my initial circuit, hoping I can do some
c- give a try to another "native" config with a TB6612 chip
I fear A is a dangerous part to non standard non maintainable code and too
little experience so b or c..
What do you think ?
…On Sun, 29 Oct 2023, 16:26 Alan Yorinks, ***@***.***> wrote:
I quickly looked at the Adafruit feather ESP32-S2 Reverse TFT and could
not find its Arduino source code. The control for this board is
accomplished with CircuitPython. Using this board with telemetrix may be
extremely difficult, if not impossible.
If I can help in any way, please let me know.
—
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXKQKGVW6ZYATM6JSA6LJC3YBZYUDAVCNFSM6AAAAAA6UDDGV2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TIMJWGMZDC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
There was option "d", implement serial comms between client and server
myself but seemed dumb when proper libs exist ;)..
…On Sun, 29 Oct 2023, 23:01 Sylvain Goffin, ***@***.***> wrote:
Thanks.!
I still have that nano and an R3
I gave a quick try with the R3, I did try reading through
https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library/blob/master/Adafruit_MotorShield.cpp#L178
and tried to map to DIR & STEP as "bypass" hoping Telemetrix4arduino would
then behave natively and carry over these to AccelStepper but no luck.
Frankly, by now it's just pure random trials. Adafruit wrote code to
handle that TB6612 in its lib and doesn't seem to be using AccelStepper at
all so just sending data over "some" pin is probably not going to cut it
I'm afraid :'(. Besides, I don't even know if the shield's pins are
accessed like this.
About the ESP32 S2 reverse, I thought it was either running micropython or
arduino. It's just a matter of bootloader. I tried both and use it
currently plainly in the arduino IDE.
So I initially intended to use the sexy ESP32 S2 with tft display with a
telemetrix I'd overload with LCD but was willing to start "simple" with a
plain UNO R4. Now neither R4 or this ESP32 board are fully compatible with
either telemetrix or accelstepper... hmmm
So... my options...
a- either I go deeper in the
https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library/blob/master/Adafruit_MotorShield.cpp
understanding and port some of it to work for R4, then going LCD later with
R4
b- back to nano & A4988 , my initial circuit, hoping I can do some
c- give a try to another "native" config with a TB6612 chip
I fear A is a dangerous part to non standard non maintainable code and too
little experience so b or c..
What do you think ?
On Sun, 29 Oct 2023, 16:26 Alan Yorinks, ***@***.***> wrote:
> I quickly looked at the Adafruit feather ESP32-S2 Reverse TFT and could
> not find its Arduino source code. The control for this board is
> accomplished with CircuitPython. Using this board with telemetrix may be
> extremely difficult, if not impossible.
>
> If I can help in any way, please let me know.
>
> —
> Reply to this email directly, view it on GitHub
> <#67 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXKQKGVW6ZYATM6JSA6LJC3YBZYUDAVCNFSM6AAAAAA6UDDGV2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TIMJWGMZDC>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
Looking at the Adafruit documentation in more detail, I am not qualified to advise you on using the motor shield with telemetrix. I cannot vouch for this article, but it states:
Essentially, Adafruit developed its own custom interface. If you could reverse engineer their code, adding it to Telemetrx4Arduino might not be worth it. However, I can advise you on what needs to be done from the point of view of the Telemetrix4Arduino architecture, but I would be of little help with the actual driving code. The only stepper driver that I have tested with telemetrix is this one. I found this article on interfacing the A4988 to the Arduino. It includes a section on using AccelStepper. If you can reproduce the author's results, then it might be worthwhile trying telemetrix with that setup. As far as the LCD, I don't see a way to control it with telemetrix since the display sits on top of an ESP32. Please let me know if I can help in any way with your project. |
Beta Was this translation helpful? Give feedback.
Looking at the Adafruit documentation in more detail, I am not qualified to advise you on using the motor shield with telemetrix. I cannot vouch for this article, but it states: